]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
drm/amd/display: Avoid HDCP initialization in devices without output
authorRodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Tue, 17 Nov 2020 20:25:48 +0000 (15:25 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 2 Dec 2020 07:51:48 +0000 (08:51 +0100)
commit d661155bfca329851a27bb5120fab027db43bd23 upstream.

The HDCP feature requires at least one connector attached to the device;
however, some GPUs do not have a physical output, making the HDCP
initialization irrelevant. This patch disables HDCP initialization when
the graphic card does not have output.

Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

index 6beccd5a0941abcf649c81206ea74e13a6c3680d..640cbafdde101baea3e6632986fbe43098bf508f 100644 (file)
@@ -960,7 +960,7 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)
        amdgpu_dm_init_color_mod();
 
 #ifdef CONFIG_DRM_AMD_DC_HDCP
-       if (adev->asic_type >= CHIP_RAVEN) {
+       if (adev->dm.dc->caps.max_links > 0 && adev->asic_type >= CHIP_RAVEN) {
                adev->dm.hdcp_workqueue = hdcp_create_workqueue(adev, &init_params.cp_psp, adev->dm.dc);
 
                if (!adev->dm.hdcp_workqueue)