drm/amd/display: Add a check for idle power optimization
authorSung Joon Kim <Sungjoon.Kim@amd.com>
Sun, 24 Sep 2023 16:34:11 +0000 (12:34 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 4 Oct 2023 22:42:17 +0000 (18:42 -0400)
commit434cf7af492fcacf7ca93c05e0bafd266b2e7cbb
tree2bbe9c780832258e1ba48df03e8287bd0f8669ca
parent05b78277ef0efc1deebc8a22384fffec29a3676e
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.

Signed-off-by: Sung Joon Kim <Sungjoon.Kim@amd.com>
Acked-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
Reviewed-by: Rodrigo Siqueira <Rodrigo.Siqueira@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/dmub/src/dmub_srv.c