aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_edid.c
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2010-08-03 14:38:18 -0400
committerDave Airlie <airlied@redhat.com>2010-08-09 20:46:58 -0400
commitcbba98f8f651a763fe9fd167efa65cd7b1fa22d9 (patch)
treeba25a4baf0cb267102973e697f0d5c552a7c826a /drivers/gpu/drm/drm_edid.c
parent4d76a22134d5a5ad259fd667f3d2b215b7e71d10 (diff)
drm/edid: Add detailed block walk for VTB extensions
Signed-off-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/drm_edid.c')
-rw-r--r--drivers/gpu/drm/drm_edid.c16
1 files changed, 16 insertions, 0 deletions
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
@@ -712,6 +712,19 @@ cea_for_each_detailed_block(u8 *ext, detailed_cb *cb, void *closure)
712} 712}
713 713
714static void 714static void
715vtb_for_each_detailed_block(u8 *ext, detailed_cb *cb, void *closure)
716{
717 unsigned int i, n = min((int)ext[0x02], 6);
718 u8 *det_base = ext + 5;
719
720 if (ext[0x01] != 1)
721 return; /* unknown version */
722
723 for (i = 0; i < n; i++)
724 cb((struct detailed_timing *)(det_base + 18 * i), closure);
725}
726
727static void
715drm_for_each_detailed_block(u8 *raw_edid, detailed_cb *cb, void *closure) 728drm_for_each_detailed_block(u8 *raw_edid, detailed_cb *cb, void *closure)
716{ 729{
717 int i; 730 int i;
@@ -729,6 +742,9 @@ drm_for_each_detailed_block(u8 *raw_edid, detailed_cb *cb, void *closure)
729 case CEA_EXT: 742 case CEA_EXT:
730 cea_for_each_detailed_block(ext, cb, closure); 743 cea_for_each_detailed_block(ext, cb, closure);
731 break; 744 break;
745 case VTB_EXT:
746 vtb_for_each_detailed_block(ext, cb, closure);
747 break;
732 default: 748 default:
733 break; 749 break;
734 } 750 }