mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/
synced 2026-04-18 06:33:43 -04:00
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>
This commit is contained in:
committed by
Alex Deucher
parent
2a0f92700f
commit
da3fd7ac0b
@@ -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);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user