]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
drm/amd/display: Null check aconnector in event_property_validate
authorBhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Mon, 25 Nov 2019 15:34:13 +0000 (10:34 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 26 Nov 2019 19:50:38 +0000 (14:50 -0500)
[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: b1abe5586ffc ("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>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c

index f6864a51891aafa3a9bdfd87b4ea300f50e17208..ae329335dfcc7aa9ce3e8204e918737fb00c30b5 100644 (file)
@@ -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;