diff options
author | Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com> | 2019-09-04 23:52:20 +0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2019-11-19 18:12:53 +0300 |
commit | 45375a501f1387567cccd4bbd78d6bbea8d5b68c (patch) | |
tree | b72f61425eed97a326fe3c9b8b20bf746ad6efc8 /drivers/gpu/drm/amd/display/modules/hdcp | |
parent | 23eb41917fc9f2d8d77ecd557646deb577ec8270 (diff) | |
download | linux-45375a501f1387567cccd4bbd78d6bbea8d5b68c.tar.xz |
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>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/display/modules/hdcp')
-rw-r--r-- | drivers/gpu/drm/amd/display/modules/hdcp/hdcp.c | 18 |
1 files changed, 14 insertions, 4 deletions
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; |