Skip to content

Commit 8894b92

Browse files
Roman Lialexdeucher
authored andcommitted
drm/amd/display: Disable ips before dc interrupt setting
[Why] While in IPS2 an access to dcn registers is not allowed. If interrupt results in dc call, we should disable IPS. [How] Safeguard register access in IPS2 by disabling idle optimization before calling dc interrupt setting api. Signed-off-by: Roman Li <Roman.Li@amd.com> Tested-by: Mark Broadworth <mark.broadworth@amd.com> Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent f37f797 commit 8894b92

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -711,7 +711,7 @@ static inline int dm_irq_state(struct amdgpu_device *adev,
711711
{
712712
bool st;
713713
enum dc_irq_source irq_source;
714-
714+
struct dc *dc = adev->dm.dc;
715715
struct amdgpu_crtc *acrtc = adev->mode_info.crtcs[crtc_id];
716716

717717
if (!acrtc) {
@@ -729,6 +729,9 @@ static inline int dm_irq_state(struct amdgpu_device *adev,
729729

730730
st = (state == AMDGPU_IRQ_STATE_ENABLE);
731731

732+
if (dc && dc->caps.ips_support && dc->idle_optimizations_allowed)
733+
dc_allow_idle_optimizations(dc, false);
734+
732735
dc_interrupt_set(adev->dm.dc, irq_source, st);
733736
return 0;
734737
}

0 commit comments

Comments
 (0)