diff options
author | Chiawen Huang <chiawen.huang@amd.com> | 2024-05-20 11:17:42 +0800 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2024-06-14 15:24:10 -0400 |
commit | abb3f19cad93a8f85dc1d595be456396843ef73e (patch) | |
tree | bf79787ece746bf556cc4f315e815569715c8990 | |
parent | 6172d39be2545ef3d71c4007065832a5219d2885 (diff) |
drm/amd/display: add set ips disable
[How&Why]
Once IPS active, all the DCN resources are
not be allowed to access.
It needs to a function for 3rd party to
on/off IPS.
Reviewed-by: Duncan Ma <duncan.ma@amd.com>
Acked-by: Zaeem Mohamed <zaeem.mohamed@amd.com>
Signed-off-by: Chiawen Huang <chiawen.huang@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r-- | drivers/gpu/drm/amd/display/dc/core/dc.c | 10 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/display/dc/dc.h | 2 |
2 files changed, 12 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c index 0d97611c4817..25a498f65c1c 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc.c @@ -5332,6 +5332,16 @@ bool dc_set_replay_allow_active(struct dc *dc, bool active) return true; } +/* set IPS disable state */ +bool dc_set_ips_disable(struct dc *dc, unsigned int disable_ips) +{ + dc_exit_ips_for_hw_access(dc); + + dc->config.disable_ips = disable_ips; + + return true; +} + void dc_allow_idle_optimizations_internal(struct dc *dc, bool allow, char const *caller_name) { if (dc->debug.disable_idle_power_optimizations) diff --git a/drivers/gpu/drm/amd/display/dc/dc.h b/drivers/gpu/drm/amd/display/dc/dc.h index 86a76c582f2e..f4ba91600362 100644 --- a/drivers/gpu/drm/amd/display/dc/dc.h +++ b/drivers/gpu/drm/amd/display/dc/dc.h @@ -2468,6 +2468,8 @@ bool dc_set_psr_allow_active(struct dc *dc, bool enable); bool dc_set_replay_allow_active(struct dc *dc, bool active); +bool dc_set_ips_disable(struct dc *dc, unsigned int disable_ips); + void dc_z10_restore(const struct dc *dc); void dc_z10_save_init(struct dc *dc); |