aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4598-drm-amd-display-Null-check-aconnector-in-event_prope.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4598-drm-amd-display-Null-check-aconnector-in-event_prope.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4598-drm-amd-display-Null-check-aconnector-in-event_prope.patch42
1 files changed, 42 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4598-drm-amd-display-Null-check-aconnector-in-event_prope.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4598-drm-amd-display-Null-check-aconnector-in-event_prope.patch
new file mode 100644
index 00000000..280900f7
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4598-drm-amd-display-Null-check-aconnector-in-event_prope.patch
@@ -0,0 +1,42 @@
+From a274fbfefeca017c09c8536ac85dce2fcf9866c7 Mon Sep 17 00:00:00 2001
+From: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
+Date: Mon, 25 Nov 2019 10:34:13 -0500
+Subject: [PATCH 4598/4736] drm/amd/display: Null check aconnector in
+ event_property_validate
+
+[Why]
+previously event_property_validate was only called after we enabled the display.
+But after "Refactor HDCP to handle multiple displays per link" this function
+can be called at any time. In certain cases we don't have a aconnector
+
+[How]
+Null check aconnector and exit early. This is ok because we only need to check the
+ENABLED->DESIRED transition if a connector exists.
+
+Fixes: cc5dae9f6286 ("drm/amd/display: Refactor HDCP to handle multiple
+displays per link")
+
+Signed-off-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
+Reviewed-by: Zhan Liu <zhan.liu@amd.com>
+Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
+---
+ drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c
+index f6864a51891a..ae329335dfcc 100644
+--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c
++++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c
+@@ -225,6 +225,9 @@ static void event_property_validate(struct work_struct *work)
+ struct mod_hdcp_display_query query;
+ struct amdgpu_dm_connector *aconnector = hdcp_work->aconnector;
+
++ if (!aconnector)
++ return;
++
+ mutex_lock(&hdcp_work->mutex);
+
+ query.encryption_status = MOD_HDCP_ENCRYPTION_STATUS_HDCP_OFF;
+--
+2.17.1
+