diff options
author | Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com> | 2019-08-29 15:26:54 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2019-11-19 10:12:53 -0500 |
commit | 23eb41917fc9f2d8d77ecd557646deb577ec8270 (patch) | |
tree | 203205f8885cbcdea7e3380b011af49ff569fcd7 /drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c | |
parent | b1abe5586ffcb15cc51668bd1a0f97adfbfb0acd (diff) | |
download | linux-23eb41917fc9f2d8d77ecd557646deb577ec8270.tar.bz2 |
drm/amd/display: add force Type0/1 flag
[Why]
Before we had a disable_type1 flag, this forced HDCP 2.2 to type0
There was no way to force type1.
[How]
Remove disable_type1 flag and instead add a flag to force type0/1.
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/amdgpu_dm/amdgpu_dm_hdcp.c')
-rw-r--r-- | drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c | 12 |
1 files changed, 9 insertions, 3 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 53e382bff54d..244a8e80334a 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 @@ -90,7 +90,7 @@ static void process_output(struct hdcp_workqueue *hdcp_work) void hdcp_update_display(struct hdcp_workqueue *hdcp_work, unsigned int link_index, struct amdgpu_dm_connector *aconnector, - bool disable_type1, + uint8_t content_type, bool enable_encryption) { struct hdcp_workqueue *hdcp_w = &hdcp_work[link_index]; @@ -108,9 +108,15 @@ void hdcp_update_display(struct hdcp_workqueue *hdcp_work, memcpy(display, query.display, sizeof(struct mod_hdcp_display)); mod_hdcp_remove_display(&hdcp_w->hdcp, aconnector->base.index, &hdcp_w->output); + hdcp_w->link.adjust.hdcp2.force_type = MOD_HDCP_FORCE_TYPE_0; + if (enable_encryption) { display->adjust.disable = 0; - hdcp_w->link.adjust.hdcp2.disable_type1 = disable_type1; + if (content_type == DRM_MODE_HDCP_CONTENT_TYPE0) + hdcp_w->link.adjust.hdcp2.force_type = MOD_HDCP_FORCE_TYPE_0; + else if (content_type == DRM_MODE_HDCP_CONTENT_TYPE1) + hdcp_w->link.adjust.hdcp2.force_type = MOD_HDCP_FORCE_TYPE_1; + schedule_delayed_work(&hdcp_w->property_validate_dwork, msecs_to_jiffies(DRM_HDCP_CHECK_PERIOD_MS)); } else { @@ -308,7 +314,7 @@ static void update_config(void *handle, struct cp_psp_stream_config *config) display->adjust.disable = 1; link->adjust.auth_delay = 2; - hdcp_update_display(hdcp_work, link_index, aconnector, false, false); + hdcp_update_display(hdcp_work, link_index, aconnector, DRM_MODE_HDCP_CONTENT_TYPE0, false); } struct hdcp_workqueue *hdcp_create_workqueue(void *psp_context, struct cp_psp *cp_psp, struct dc *dc) |