drm/amd/display: Add a check for idle power optimization
authorSung Joon Kim <sungkim@amd.com>
Fri, 29 Sep 2023 16:12:47 +0000 (12:12 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 26 Oct 2023 22:57:15 +0000 (18:57 -0400)
commitd591284288c29f04e52ae4f3d605e2f39c3e316c
treed46674f745ac712311fee096c24f5b9dff54204a
parentd5f9a92bd1e234b8a7cf6f350b5bc0169221ae59
drm/amd/display: Add a check for idle power optimization

[why]
Need a helper function to check idle power is allowed
so that dc doesn't access any registers that are power-gated.

[how]
Implement helper function to check idle power optimization.
Enable a hook to check if detection is allowed.

V2:
Add function hooks for set and get idle states.
Check if function hook was properly initialized.

Reviewed-by: Aric Cyr <aric.cyr@amd.com>
Reviewed-by: Nicholas Choi <nicholas.choi@amd.com>
Acked-by: Roman Li <roman.li@amd.com>
Signed-off-by: Sung Joon Kim <sungkim@amd.com>
Tested-by: Daniel 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/dc.h
drivers/gpu/drm/amd/display/dc/hwss/dcn31/dcn31_hwseq.c
drivers/gpu/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c
drivers/gpu/drm/amd/display/dc/hwss/hw_sequencer.h
drivers/gpu/drm/amd/display/dc/inc/hw/clk_mgr.h
drivers/gpu/drm/amd/display/dmub/src/dmub_srv.c