drm/amd/display: do not send commands to DMUB if DMUB is inactive from S3
authorSamson Tam <samson.tam@amd.com>
Tue, 28 Nov 2023 21:53:12 +0000 (16:53 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 15 Dec 2023 17:16:58 +0000 (12:16 -0500)
commit0f657938e4345a77be871d906f3e0de3c58a7a49
tree1d2a4c42dbe03592edccb2096217994e2b4d1dd2
parent7046ca9c1ba64938f1b498026419d47b0993c69f
drm/amd/display: do not send commands to DMUB if DMUB is inactive from S3

[Why]
On resume from S3, may get apply_idle_optimizations call while DMUB
is inactive which will just time out.

[How]
Set and track power state in dmub_srv and check power state before
sending commands to DMUB.  Add interface in both dmub_srv and
dc_dmub_srv

Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Acked-by: Wayne Lin <wayne.lin@amd.com>
Signed-off-by: Samson Tam <samson.tam@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c
drivers/gpu/drm/amd/display/dc/dc_dmub_srv.h
drivers/gpu/drm/amd/display/dmub/dmub_srv.h
drivers/gpu/drm/amd/display/dmub/src/dmub_srv.c