From: jsg Date: Wed, 26 Jul 2023 06:26:05 +0000 (+0000) Subject: drm/amd/display: edp do not add non-edid timings X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=628c346c43c70f9cc3e2c23f26b11fd0cbcb853e;p=openbsd drm/amd/display: edp do not add non-edid timings From Hersen Wu c4629c757528f87ee22ea8fe16c645e471b9cbf6 in linux-6.1.y/6.1.40 7a0e005c7957931689a327b2a4e7333a19f13f95 in mainline linux --- diff --git a/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c index 188708ec0c4..21e07a101aa 100644 --- a/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -6974,7 +6974,13 @@ static int amdgpu_dm_connector_get_modes(struct drm_connector *connector) drm_add_modes_noedid(connector, 640, 480); } else { amdgpu_dm_connector_ddc_get_modes(connector, edid); - amdgpu_dm_connector_add_common_modes(encoder, connector); + /* most eDP supports only timings from its edid, + * usually only detailed timings are available + * from eDP edid. timings which are not from edid + * may damage eDP + */ + if (connector->connector_type != DRM_MODE_CONNECTOR_eDP) + amdgpu_dm_connector_add_common_modes(encoder, connector); amdgpu_dm_connector_add_freesync_modes(connector, edid); } amdgpu_dm_fbc_init(connector);