Skip to contentSkip to conversation

drm/amdgpu/display: fix build with CONFIG_DRM_AMD_DC_DCN disabled

PATCH In review Alex Deucher 2 participants 2 messages Jan 8, 2021

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +2 -0
index 318eb12f8de7..2dc8493793e0 100644
@@ -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);
 
Signature · 6 lines
2.29.2

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · Alex Deucher

dc_allow_idle_optimizations() needs to be protected by CONFIG_DRM_AMD_DC_DCN.

Regards,
Nicholas Kazlauskas

Quoted 12 lines
---
  drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 ++
  1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +0 -0
index 318eb12f8de7..2dc8493793e0 100644
@@ -5490,10 +5490,12 @@ static inline int dm_set_vblank(struct drm_crtc *crtc, bool enable)
  	else
  		dm->active_vblank_irq_count--;

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c static inline int dm_set_vblank(struct drm_crtc *crtc, bool enable) · line 5501

Quoted 10 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +2 -0
 
+#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);
 

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx