[PATCH] drm/amd/display: Null check aconnector in event_property_validate
Kazlauskas, Nicholas
nicholas.kazlauskas at amd.com
Mon Nov 25 15:42:10 UTC 2019
On 2019-11-25 10:40 a.m., Bhawanpreet Lakha wrote:
> [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
This should be:
Fixes: cc5dae9f6286 ("drm/amd/display: Refactor HDCP to handle multiple
displays per link")
> Signed-off-by: Bhawanpreet Lakha <Bhawanpreet.Lakha at amd.com>
With that fixed this change is:
Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas at amd.com>
Nicholas Kazlauskas
> ---
> 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;
>
More information about the amd-gfx
mailing list