]> Gentwo Git Trees - linux/.git/commit
drm/amd/display: Support possibly NULL link for should_use_dmub_lock
authorNicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Tue, 16 Sep 2025 17:57:17 +0000 (13:57 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 13 Oct 2025 18:14:31 +0000 (14:14 -0400)
commit7f74931c9c6ba900739658a83fce3ae71c78366f
tree520975552e66f4a8638a7a717fde1ed72f66a0c6
parenteeab74ee6917d6e9ddd43cc5799b23393f031092
drm/amd/display: Support possibly NULL link for should_use_dmub_lock

[Why]
It's possible to have a stream enabled without a link or link encoder.

There are cases where we'd still like to interlock the driver
programming from firmware programming to ensure that we don't put the
hardware in an undefined (or error) state if two programming sequences
are simultaneously executed on the same hardware blocks.

[How]
Add an explicit DC parameter to should_use_dmub_lock().

Make pointers to should_use_dmub_lock() const since it's a checker
function that shouldn't modify state.

Update the callsites to pass in DC explicitly.

Check that the link is non-NULL before deferencing and performing link
based checks.

Reviewed-by: Alvin Lee <alvin.lee2@amd.com>
Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Signed-off-by: Roman Li <roman.li@amd.com>
Tested-by: Dan Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/core/dc.c
drivers/gpu/drm/amd/display/dc/dce/dmub_hw_lock_mgr.c
drivers/gpu/drm/amd/display/dc/dce/dmub_hw_lock_mgr.h
drivers/gpu/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c
drivers/gpu/drm/amd/display/dc/hwss/dcn20/dcn20_hwseq.c
drivers/gpu/drm/amd/display/dc/link/accessories/link_dp_cts.c