From: jsg Date: Thu, 4 Apr 2024 07:27:46 +0000 (+0000) Subject: drm/amd/display: Return the correct HDCP error code X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=225d5703f112057951205e0f95859c862219f6d7;p=openbsd drm/amd/display: Return the correct HDCP error code From Rodrigo Siqueira c7c855fd3d5af01496aaa8be93a1e9811166cf11 in linux-6.6.y/6.6.24 e64b3f55e458ce7e2087a0051f47edabf74545e7 in mainline linux --- diff --git a/sys/dev/pci/drm/amd/display/modules/hdcp/hdcp_psp.c b/sys/dev/pci/drm/amd/display/modules/hdcp/hdcp_psp.c index ee67a35c2a8..ff930a71e49 100644 --- a/sys/dev/pci/drm/amd/display/modules/hdcp/hdcp_psp.c +++ b/sys/dev/pci/drm/amd/display/modules/hdcp/hdcp_psp.c @@ -513,6 +513,9 @@ enum mod_hdcp_status mod_hdcp_hdcp2_create_session(struct mod_hdcp *hdcp) hdcp_cmd = (struct ta_hdcp_shared_memory *)psp->hdcp_context.context.mem_context.shared_buf; memset(hdcp_cmd, 0, sizeof(struct ta_hdcp_shared_memory)); + if (!display) + return MOD_HDCP_STATUS_DISPLAY_NOT_FOUND; + hdcp_cmd->in_msg.hdcp2_create_session_v2.display_handle = display->index; if (hdcp->connection.link.adjust.hdcp2.force_type == MOD_HDCP_FORCE_TYPE_0)