Skip to content

Commit 1202f79

Browse files
effective-lightalexdeucher
authored andcommitted
drm/amd/display: fix IPX enablement
We need to re-enable idle power optimizations after entering PSR. Since, we get kicked out of idle power optimizations before entering PSR (entering PSR requires us to write to DCN registers, which isn't allowed while we are in IPS). Fixes: a9b1a4f ("drm/amd/display: Add more checks for exiting idle in DC") Tested-by: Mark Broadworth <[email protected]> Reviewed-by: Nicholas Kazlauskas <[email protected]> Signed-off-by: Hamza Mahfooz <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent ca299b4 commit 1202f79

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_psr.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,8 @@ bool amdgpu_dm_link_setup_psr(struct dc_stream_state *stream)
141141
* amdgpu_dm_psr_enable() - enable psr f/w
142142
* @stream: stream state
143143
*
144-
* Return: true if success
145144
*/
146-
bool amdgpu_dm_psr_enable(struct dc_stream_state *stream)
145+
void amdgpu_dm_psr_enable(struct dc_stream_state *stream)
147146
{
148147
struct dc_link *link = stream->link;
149148
unsigned int vsync_rate_hz = 0;
@@ -190,7 +189,10 @@ bool amdgpu_dm_psr_enable(struct dc_stream_state *stream)
190189
if (link->psr_settings.psr_version < DC_PSR_VERSION_SU_1)
191190
power_opt |= psr_power_opt_z10_static_screen;
192191

193-
return dc_link_set_psr_allow_active(link, &psr_enable, false, false, &power_opt);
192+
dc_link_set_psr_allow_active(link, &psr_enable, false, false, &power_opt);
193+
194+
if (link->ctx->dc->caps.ips_support)
195+
dc_allow_idle_optimizations(link->ctx->dc, true);
194196
}
195197

196198
/*

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_psr.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
#define AMDGPU_DM_PSR_ENTRY_DELAY 5
3333

3434
void amdgpu_dm_set_psr_caps(struct dc_link *link);
35-
bool amdgpu_dm_psr_enable(struct dc_stream_state *stream);
35+
void amdgpu_dm_psr_enable(struct dc_stream_state *stream);
3636
bool amdgpu_dm_link_setup_psr(struct dc_stream_state *stream);
3737
bool amdgpu_dm_psr_disable(struct dc_stream_state *stream);
3838
bool amdgpu_dm_psr_disable_all(struct amdgpu_display_manager *dm);

0 commit comments

Comments
 (0)