Skip to content

Commit a76d6f2

Browse files
superm1alexdeucher
authored andcommitted
drm/amd/display: Increase EDID read retries
[WHY] When monitor is still booting EDID read can fail while DPCD read is successful. In this case no EDID data will be returned, and this could happen for a while. [HOW] Increase number of attempts to read EDID in dm_helpers_read_local_edid() to 25. Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4672 Cc: Mario Limonciello <mario.limonciello@amd.com> Cc: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Alex Hung <alex.hung@amd.com> Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org> Signed-off-by: Alex Hung <alex.hung@amd.com> Tested-by: Dan Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent 0563d17 commit a76d6f2

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -998,8 +998,8 @@ enum dc_edid_status dm_helpers_read_local_edid(
998998
struct amdgpu_dm_connector *aconnector = link->priv;
999999
struct drm_connector *connector = &aconnector->base;
10001000
struct i2c_adapter *ddc;
1001-
int retry = 3;
1002-
enum dc_edid_status edid_status;
1001+
int retry = 25;
1002+
enum dc_edid_status edid_status = EDID_NO_RESPONSE;
10031003
const struct drm_edid *drm_edid;
10041004
const struct edid *edid;
10051005

@@ -1029,7 +1029,7 @@ enum dc_edid_status dm_helpers_read_local_edid(
10291029
}
10301030

10311031
if (!drm_edid)
1032-
return EDID_NO_RESPONSE;
1032+
continue;
10331033

10341034
edid = drm_edid_raw(drm_edid); // FIXME: Get rid of drm_edid_raw()
10351035
if (!edid ||
@@ -1047,7 +1047,7 @@ enum dc_edid_status dm_helpers_read_local_edid(
10471047
&sink->dc_edid,
10481048
&sink->edid_caps);
10491049

1050-
} while (edid_status == EDID_BAD_CHECKSUM && --retry > 0);
1050+
} while ((edid_status == EDID_BAD_CHECKSUM || edid_status == EDID_NO_RESPONSE) && --retry > 0);
10511051

10521052
if (edid_status != EDID_OK)
10531053
DRM_ERROR("EDID err: %d, on connector: %s",

0 commit comments

Comments
 (0)