dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] udldrmfb: Fix EDID not working with monitors with EDID extension blocks
@ 2013-01-11 11:08 Hans de Goede
  2013-01-11 11:08 ` [PATCH 2/3] udldrmfb: udl_get_edid: usb_control_msg buffer must not be on the stack Hans de Goede
  2013-01-11 11:08 ` [PATCH 3/3] udldrmfb: udl_get_edid: drop unneeded i-- Hans de Goede
  0 siblings, 2 replies; 3+ messages in thread
From: Hans de Goede @ 2013-01-11 11:08 UTC (permalink / raw)
  To: Dave Airlie; +Cc: Hans de Goede, dri-devel

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>
---
 drivers/gpu/drm/udl/udl_connector.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/gpu/drm/udl/udl_connector.c b/drivers/gpu/drm/udl/udl_connector.c
index b3b2ced..86538c9 100644
--- a/drivers/gpu/drm/udl/udl_connector.c
+++ b/drivers/gpu/drm/udl/udl_connector.c
@@ -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);
-- 
1.8.0.2

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-01-11 11:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-11 11:08 [PATCH 1/3] udldrmfb: Fix EDID not working with monitors with EDID extension blocks Hans de Goede
2013-01-11 11:08 ` [PATCH 2/3] udldrmfb: udl_get_edid: usb_control_msg buffer must not be on the stack Hans de Goede
2013-01-11 11:08 ` [PATCH 3/3] udldrmfb: udl_get_edid: drop unneeded i-- Hans de Goede

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).