Commit d3da3f40 authored by Jani Nikula's avatar Jani Nikula

drm/edid: convert extension block read to EDID block read helper

Use the EDID block read helper also for extension block reads, making
edid_block_read() the only place with the read retry logic.

Note: We observe that drm_do_get_edid() does not use invalid extension
blocks to flag the EDID as corrupt.
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/a6328b898db40235b85ad4635374bc0768b5a970.1649685475.git.jani.nikula@intel.com
parent c12561ce
......@@ -2143,18 +2143,17 @@ struct edid *drm_do_get_edid(struct drm_connector *connector,
for (j = 1; j <= edid->extensions; j++) {
void *block = edid + j;
int try;
for (try = 0; try < 4; try++) {
if (read_block(context, block, j, EDID_LENGTH))
goto out;
if (drm_edid_block_valid(block, j, false, NULL))
break;
}
status = edid_block_read(block, j, read_block, context);
if (try == 4)
edid_block_status_print(status, block, j);
if (!edid_block_status_valid(status, edid_block_tag(block))) {
if (status == EDID_BLOCK_READ_FAIL)
goto out;
invalid_blocks++;
}
}
if (invalid_blocks) {
connector_bad_edid(connector, edid, edid->extensions + 1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment