diff options
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4509-drm-amd-display-Refactor-HDCP-encryption-status-upda.patch')
-rw-r--r-- | meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4509-drm-amd-display-Refactor-HDCP-encryption-status-upda.patch | 94 |
1 files changed, 94 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4509-drm-amd-display-Refactor-HDCP-encryption-status-upda.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4509-drm-amd-display-Refactor-HDCP-encryption-status-upda.patch new file mode 100644 index 00000000..d7deda01 --- /dev/null +++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4509-drm-amd-display-Refactor-HDCP-encryption-status-upda.patch @@ -0,0 +1,94 @@ +From e3fa5bc34929d64e2706634adbd8a6c369a7bbbe Mon Sep 17 00:00:00 2001 +From: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com> +Date: Wed, 4 Sep 2019 16:52:20 -0400 +Subject: [PATCH 4509/4736] drm/amd/display: Refactor HDCP encryption status + update + +[Why] +The old way was to poll PSP and update the properties. But due to a +limitation in the PSP interface this doesn't work for MST. + +[How] +According to PSP if set_encryption return success, the link is encrypted +and the only way it will not be is if we get a link loss(which we handle +already). + +So this method should be good enough to report HDCP status. + +Signed-off-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com> +Reviewed-by: Harry Wentland <harry.wentland@amd.com> +--- + .../drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c | 3 +-- + .../gpu/drm/amd/display/modules/hdcp/hdcp.c | 18 ++++++++++++++---- + .../gpu/drm/amd/display/modules/inc/mod_hdcp.h | 4 ++-- + 3 files changed, 17 insertions(+), 8 deletions(-) + +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 244a8e80334a..f6864a51891a 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 +@@ -85,6 +85,7 @@ static void process_output(struct hdcp_workqueue *hdcp_work) + schedule_delayed_work(&hdcp_work->watchdog_timer_dwork, + msecs_to_jiffies(output.watchdog_timer_delay)); + ++ schedule_delayed_work(&hdcp_work->property_validate_dwork, msecs_to_jiffies(0)); + } + + void hdcp_update_display(struct hdcp_workqueue *hdcp_work, +@@ -234,8 +235,6 @@ static void event_property_validate(struct work_struct *work) + schedule_work(&hdcp_work->property_update_work); + } + +- schedule_delayed_work(&hdcp_work->property_validate_dwork, msecs_to_jiffies(DRM_HDCP_CHECK_PERIOD_MS)); +- + mutex_unlock(&hdcp_work->mutex); + } + +diff --git a/drivers/gpu/drm/amd/display/modules/hdcp/hdcp.c b/drivers/gpu/drm/amd/display/modules/hdcp/hdcp.c +index 0f2f242710b3..cbb5e9c063ec 100644 +--- a/drivers/gpu/drm/amd/display/modules/hdcp/hdcp.c ++++ b/drivers/gpu/drm/amd/display/modules/hdcp/hdcp.c +@@ -417,10 +417,20 @@ enum mod_hdcp_status mod_hdcp_query_display(struct mod_hdcp *hdcp, + query->trace = &hdcp->connection.trace; + query->encryption_status = MOD_HDCP_ENCRYPTION_STATUS_HDCP_OFF; + +- if (is_hdcp1(hdcp)) +- mod_hdcp_hdcp1_get_link_encryption_status(hdcp, &query->encryption_status); +- else if (is_hdcp2(hdcp)) +- mod_hdcp_hdcp2_get_link_encryption_status(hdcp, &query->encryption_status); ++ if (is_display_encryption_enabled(display)) { ++ if (is_hdcp1(hdcp)) { ++ query->encryption_status = MOD_HDCP_ENCRYPTION_STATUS_HDCP1_ON; ++ } else if (is_hdcp2(hdcp)) { ++ if (query->link->adjust.hdcp2.force_type == MOD_HDCP_FORCE_TYPE_0) ++ query->encryption_status = MOD_HDCP_ENCRYPTION_STATUS_HDCP2_TYPE0_ON; ++ else if (query->link->adjust.hdcp2.force_type == MOD_HDCP_FORCE_TYPE_1) ++ query->encryption_status = MOD_HDCP_ENCRYPTION_STATUS_HDCP2_TYPE1_ON; ++ else ++ query->encryption_status = MOD_HDCP_ENCRYPTION_STATUS_HDCP2_ON; ++ } ++ } else { ++ query->encryption_status = MOD_HDCP_ENCRYPTION_STATUS_HDCP_OFF; ++ } + + out: + return status; +diff --git a/drivers/gpu/drm/amd/display/modules/inc/mod_hdcp.h b/drivers/gpu/drm/amd/display/modules/inc/mod_hdcp.h +index ff2bb2bfbb53..f2a0e1a064da 100644 +--- a/drivers/gpu/drm/amd/display/modules/inc/mod_hdcp.h ++++ b/drivers/gpu/drm/amd/display/modules/inc/mod_hdcp.h +@@ -191,9 +191,9 @@ struct mod_hdcp_trace { + enum mod_hdcp_encryption_status { + MOD_HDCP_ENCRYPTION_STATUS_HDCP_OFF = 0, + MOD_HDCP_ENCRYPTION_STATUS_HDCP1_ON, +- MOD_HDCP_ENCRYPTION_STATUS_HDCP2_ON, + MOD_HDCP_ENCRYPTION_STATUS_HDCP2_TYPE0_ON, +- MOD_HDCP_ENCRYPTION_STATUS_HDCP2_TYPE1_ON ++ MOD_HDCP_ENCRYPTION_STATUS_HDCP2_TYPE1_ON, ++ MOD_HDCP_ENCRYPTION_STATUS_HDCP2_ON + }; + + /* per link events dm has to notify to hdcp module */ +-- +2.17.1 + |