diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2021-01-08 11:32:11 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2021-01-08 15:18:52 -0500 |
commit | 4928b480cbed50da28eba06bff7eec6a274a3914 (patch) | |
tree | aba38b5d1d326808c50e1dc2e158e465dd2cba14 /drivers/gpu/drm/amd | |
parent | 08da4fcd6d98745fb1b97e37bc02e665eda8d420 (diff) |
drm/amdgpu/display: fix build with CONFIG_DRM_AMD_DC_DCN disabled
dc_allow_idle_optimizations() needs to be protected by
CONFIG_DRM_AMD_DC_DCN.
Fixes: 71338cb4a7c2 ("drm/amd/display: enable idle optimizations for linux (MALL stutter)")
Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd')
-rw-r--r-- | drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index 318eb12f8de7..2dc8493793e0 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -5490,10 +5490,12 @@ static inline int dm_set_vblank(struct drm_crtc *crtc, bool enable) else dm->active_vblank_irq_count--; +#if defined(CONFIG_DRM_AMD_DC_DCN) dc_allow_idle_optimizations( adev->dm.dc, dm->active_vblank_irq_count == 0 ? true : false); DRM_DEBUG_DRIVER("Allow idle optimizations (MALL): %d\n", dm->active_vblank_irq_count == 0); +#endif mutex_unlock(&dm->dc_lock); |