diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2021-12-19 01:33:27 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2021-12-19 01:33:27 +0000 |
commit | e434076cc40132cd1b3798cfb58360feae464e67 (patch) | |
tree | f6f7701d1a00dc556fa8da20c957d0b6108113fa | |
parent | 68192c01b63474730562a8113ebf33e467a7b6be (diff) |
drm/amd/display: add connector type check for CRC source set
From Perry Yuan
f35f7f04aa80587bfe00c5e679df054918e79a63 in linux 5.10.y/5.10.87
2da34b7bb59e1caa9a336e0e20a76b8b6a4abea2 in mainline linux
-rw-r--r-- | sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c b/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c index e00a30e7d25..04c20ce6e94 100644 --- a/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c +++ b/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c @@ -226,6 +226,14 @@ int amdgpu_dm_crtc_set_crc_source(struct drm_crtc *crtc, const char *src_name) ret = -EINVAL; goto cleanup; } + + if ((aconn->base.connector_type != DRM_MODE_CONNECTOR_DisplayPort) && + (aconn->base.connector_type != DRM_MODE_CONNECTOR_eDP)) { + DRM_DEBUG_DRIVER("No DP connector available for CRC source\n"); + ret = -EINVAL; + goto cleanup; + } + } if (amdgpu_dm_crtc_configure_crc_source(crtc, crtc_state, source)) { |