mirror of https://gitee.com/openkylin/linux.git
drm_edid_to_eld: check for CEA data blocks only from structure revision 3 on
CEA datablocks are only defined from revision 3 onwards. Only check for them if the revision says so. Signed-of-by: Christian Schmidt <schmidt@digadd.de> Tested-by: James Cloos <cloos@jhcloos.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
parent
54ac76f851
commit
a0ab734d62
|
@ -1474,15 +1474,18 @@ void drm_edid_to_eld(struct drm_connector *connector, struct edid *edid)
|
|||
eld[18] = edid->prod_code[0];
|
||||
eld[19] = edid->prod_code[1];
|
||||
|
||||
if (cea[1] >= 3)
|
||||
for (db = cea + 4; db < cea + cea[2]; db += dbl + 1) {
|
||||
dbl = db[0] & 0x1f;
|
||||
|
||||
switch ((db[0] & 0xe0) >> 5) {
|
||||
case AUDIO_BLOCK: /* Audio Data Block, contains SADs */
|
||||
case AUDIO_BLOCK:
|
||||
/* Audio Data Block, contains SADs */
|
||||
sad_count = dbl / 3;
|
||||
memcpy(eld + 20 + mnl, &db[1], dbl);
|
||||
break;
|
||||
case SPEAKER_BLOCK: /* Speaker Allocation Data Block */
|
||||
case SPEAKER_BLOCK:
|
||||
/* Speaker Allocation Data Block */
|
||||
eld[7] = db[1];
|
||||
break;
|
||||
case VENDOR_BLOCK:
|
||||
|
|
Loading…
Reference in New Issue