Skip to contentSkip to conversation

drm/amdgpu: Remove warning for virtual_display

PATCH In review Emily.Deng 2 participants 2 messages Oct 9, 2020

Subsystems (2)
lore
Share & tools
lore

Emily.Deng

author
#0 lore raw

PATCH 1/1 drm/amdgpu: Remove warning for virtual_display

Remove the virtual_display warning in drm_crtc_vblank_off when dev->num_crtcs is null.

Change-Id I755150a32478d8c128eed7ed98a71175d2b3aefc
---
 drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/dce_virtual.c +3 -1
index 469c05fd43d5..b4d4b76538d2 100644
@@ -174,8 +174,10 @@ static void dce_virtual_crtc_commit(struct drm_crtc *crtc)
 static void dce_virtual_crtc_disable(struct drm_crtc *crtc)
 {
 	struct amdgpu_crtc *amdgpu_crtc = to_amdgpu_crtc(crtc);
+	struct drm_device *dev = crtc->dev;
 
-	drm_crtc_vblank_off(crtc);
+	if (dev->num_crtcs)
+		drm_crtc_vblank_off(crtc);
 
 	amdgpu_crtc->enabled = false;
 	amdgpu_crtc->pll_id = ATOM_PPLL_INVALID;
Signature · 6 lines
2.25.1

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

Andrey

Quoted 15 lines · Emily.Deng

Remove the virtual_display warning in drm_crtc_vblank_off when dev->num_crtcs is null.

Change-Id I755150a32478d8c128eed7ed98a71175d2b3aefc
---
  drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/dce_virtual.c +0 -0
index 469c05fd43d5..b4d4b76538d2 100644
@@ -174,8 +174,10 @@ static void dce_virtual_crtc_commit(struct drm_crtc *crtc)
  static void dce_virtual_crtc_disable(struct drm_crtc *crtc)

drivers/gpu/drm/amd/amdgpu/dce_virtual.c static void dce_virtual_crtc_commit(struct drm_crtc *crtc) · line 183

Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/dce_virtual.c +3 -1
  {
  	struct amdgpu_crtc *amdgpu_crtc = to_amdgpu_crtc(crtc);
+	struct drm_device *dev = crtc->dev;
 
-	drm_crtc_vblank_off(crtc);
+	if (dev->num_crtcs)
+		drm_crtc_vblank_off(crtc);
 
  	amdgpu_crtc->enabled = false;
  	amdgpu_crtc->pll_id = ATOM_PPLL_INVALID;

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