]> Gentwo Git Trees - linux/.git/commit
drm/amd/display: Optimize amdgpu_dm_atomic_commit_tail()
authorMario Limonciello <mario.limonciello@amd.com>
Tue, 29 Jul 2025 12:38:24 +0000 (18:08 +0530)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 18 Aug 2025 20:57:10 +0000 (16:57 -0400)
commit63a16df7eb58f0ef699c9f08f3276791261b853a
treee3339e826a12b2dfa26488ead22f76d42ca0b62e
parentbdd34a647e842695f86294efa442f5c4d162d705
drm/amd/display: Optimize amdgpu_dm_atomic_commit_tail()

[WHY]
The first two loops of for_each_oldnew_connector_in_state() both operate
on an HDCP queue.  If one isn't setup then each connector is iterated but
skipped TWICE.  This is wasteful for the majority of cases.

[HOW]
Combine the two HDCP related loops of for_each_oldnew_connector_in_state()
and check for the HDCP workqueue before even running either of them. This
should avoid running the functions in most cases, and if HDCP is setup only
run once.

Reviewed-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Alex Hung <alex.hung@amd.com>
Tested-by: Dan Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c