]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/amd/display: Change HDCP update sequence for DM
authorBhawanpreet Lakha <bhawanpreet.lakha@amd.com>
Mon, 24 Jul 2023 20:32:47 +0000 (16:32 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 9 May 2025 07:41:46 +0000 (09:41 +0200)
commite07ed98515836fbbdc88df85c9618d9f67a74226
tree6fa0ae86cf517993a3b00627e6659576a02c0638
parente56b7400e9d7c28431aa7ede8967e9e79c31aed9
drm/amd/display: Change HDCP update sequence for DM

[ Upstream commit 393e83484839970e4975dfa1f0666f939a6f3e3d ]

Refactor the sequence in hdcp_update_display() to use
mod_hdcp_update_display().

Previous sequence:
- remove()->add()

This Sequence was used to update the display, (mod_hdcp_update_display
didn't exist at the time). This meant for any hdcp updates (type changes,
enable/disable) we would remove, reconstruct, and add. This leads to
unnecessary calls to psp eventually

New Sequence using mod_hdcp_update_display():
- add() once when stream is enabled
- use update() for all updates

The update function checks for prev == new states and will not
unnecessarily end up calling psp via add/remove.

Reviewed-by: Qingqing Zhuo <qingqing.zhuo@amd.com>
Acked-by: Tom Chung <chiahsuan.chung@amd.com>
Signed-off-by: Bhawanpreet Lakha <bhawanpreet.lakha@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Stable-dep-of: be593d9d91c5 ("drm/amd/display: Fix slab-use-after-free in hdcp")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c