summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c
diff options
context:
space:
mode:
authorHarry Wentland <harry.wentland@amd.com>2023-12-01 06:25:25 -0700
committerAlex Deucher <alexander.deucher@amd.com>2023-12-06 15:22:34 -0500
commit7db7ade270ae8e177cc8bd09753745e7c2dc92e7 (patch)
tree582c03fcd8350bf352af9ead1381ee726447efb2 /drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c
parentdfc03588cf8ce2af8ef810cd226dc98ee4fbac38 (diff)
downloadlinux-7db7ade270ae8e177cc8bd09753745e7c2dc92e7.tar.gz
linux-7db7ade270ae8e177cc8bd09753745e7c2dc92e7.tar.bz2
linux-7db7ade270ae8e177cc8bd09753745e7c2dc92e7.zip
drm/amd/display: Skip writeback connector when we get amdgpu_dm_connector
[WHY] Writeback connectors are based on a different object: drm_writeback_connector, and are therefore different from amdgpu_dm_connector. We need to be careful to ensure code designed for amdgpu_dm_connector doesn't inadvertently try to operate on a drm_writeback_connector. [HOW] Skip them when connector type is DRM_MODE_CONNECTOR_WRITEBACK. Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Reviewed-by: Alex Hung <alex.hung@amd.com> Signed-off-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Alex Hung <alex.hung@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c')
-rw-r--r--drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c
index 52ecfa746b54..f936a35fa9eb 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c
@@ -326,6 +326,9 @@ int amdgpu_dm_crtc_set_crc_source(struct drm_crtc *crtc, const char *src_name)
if (!connector->state || connector->state->crtc != crtc)
continue;
+ if (connector->connector_type == DRM_MODE_CONNECTOR_WRITEBACK)
+ continue;
+
aconn = to_amdgpu_dm_connector(connector);
break;
}