Skip to content

Commit

Permalink
udldrmfb: Fix EDID not working with monitors with EDID extension blocks
Browse files Browse the repository at this point in the history
udldrmfb only reads the main EDID block, and if that advertises extensions
the drm_edid code expects them to be present, and starts reading beyond the
buffer udldrmfb passes it.

Although it may be possible to read more EDID info with the udl we simpy don't
know how, and even if trial and error gets it working on one device, that is
no guarantee it will work on other revisions. So this patch does a simple fix
in the form of patching the EDID info to report 0 extension blocks, this
fixes udldrmfb only doing 1024x768 on monitors with EDID extension blocks.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Cc: stable@vger.kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
  • Loading branch information
Hans de Goede authored and Dave Airlie committed Jan 13, 2013
1 parent 7d00813 commit c930812
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions drivers/gpu/drm/udl/udl_connector.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,14 @@ static int udl_get_modes(struct drm_connector *connector)

edid = (struct edid *)udl_get_edid(udl);

/*
* We only read the main block, but if the monitor reports extension
* blocks then the drm edid code expects them to be present, so patch
* the extension count to 0.
*/
edid->checksum += edid->extensions;
edid->extensions = 0;

drm_mode_connector_update_edid_property(connector, edid);
ret = drm_add_edid_modes(connector, edid);
kfree(edid);
Expand Down

0 comments on commit c930812

Please sign in to comment.