mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 17:30:02 +00:00
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>
This commit is contained in:
parent
4d76a22134
commit
cbba98f8f6
1 changed files with 16 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue