diff options
author | Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com> | 2019-06-10 16:06:05 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2019-10-03 09:10:58 -0500 |
commit | da3fd7ac0bcf372cc57117bdfcd725cca7ef975a (patch) | |
tree | a3b6ad6d717b5c707b9a71ce448e4775a778c0c3 /drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | |
parent | 2a0f92700fe348fd5785f87e4730ab1c5398157a (diff) |
drm/amd/display: Update CP property based on HW query
[Why]
We need to use HW state to set content protection to ENABLED.
This way we know that the link is encrypted from the HW side
[How]
Create a workqueue that queries the HW every ~2seconds, and sets it to
ENABLED or DESIRED based on the result from the hardware
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.c')
-rw-r--r-- | drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index bb74c3adc030..f64a01eecb15 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -5436,19 +5436,9 @@ static void update_content_protection(struct drm_connector_state *state, const s { struct amdgpu_dm_connector *aconnector = to_amdgpu_dm_connector(connector); - if (state->content_protection == DRM_MODE_CONTENT_PROTECTION_DESIRED) { - hdcp_add_display(hdcp_w, aconnector->dc_link->link_index); - - /* - * TODO: ENABLED should be verified using psp, it is planned later. - * Just set this to ENABLED for now - */ - state->content_protection = DRM_MODE_CONTENT_PROTECTION_ENABLED; - - return; - } - - if (state->content_protection == DRM_MODE_CONTENT_PROTECTION_UNDESIRED) + if (state->content_protection == DRM_MODE_CONTENT_PROTECTION_DESIRED) + hdcp_add_display(hdcp_w, aconnector->dc_link->link_index, aconnector); + else if (state->content_protection == DRM_MODE_CONTENT_PROTECTION_UNDESIRED) hdcp_remove_display(hdcp_w, aconnector->dc_link->link_index, aconnector->base.index); } |