From: Adam Jackson Date: Tue, 3 Aug 2010 18:38:18 +0000 (-0400) Subject: drm/edid: Add detailed block walk for VTB extensions X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=cbba98f8f651a763fe9fd167efa65cd7b1fa22d9;p=openwrt%2Fstaging%2Fblogic.git drm/edid: Add detailed block walk for VTB extensions Signed-off-by: Adam Jackson Signed-off-by: Dave Airlie --- diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c index 30b286ba16c4..1bf81b91b70f 100644 --- a/drivers/gpu/drm/drm_edid.c +++ b/drivers/gpu/drm/drm_edid.c @@ -711,6 +711,19 @@ cea_for_each_detailed_block(u8 *ext, detailed_cb *cb, void *closure) cb((struct detailed_timing *)(det_base + 18 * i), closure); } +static void +vtb_for_each_detailed_block(u8 *ext, detailed_cb *cb, void *closure) +{ + unsigned int i, n = min((int)ext[0x02], 6); + u8 *det_base = ext + 5; + + if (ext[0x01] != 1) + return; /* unknown version */ + + for (i = 0; i < n; i++) + cb((struct detailed_timing *)(det_base + 18 * i), closure); +} + static void drm_for_each_detailed_block(u8 *raw_edid, detailed_cb *cb, void *closure) { @@ -729,6 +742,9 @@ drm_for_each_detailed_block(u8 *raw_edid, detailed_cb *cb, void *closure) case CEA_EXT: cea_for_each_detailed_block(ext, cb, closure); break; + case VTB_EXT: + vtb_for_each_detailed_block(ext, cb, closure); + break; default: break; }