Skip to contentSkip to conversation

drm/hisilicon/hibmc: fix 'xset dpms force off' fail

PATCH Applied Zhihui Chen 2 participants 2 messages Dec 20, 2019 – Feb 13, 2020

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

PATCH 1/1 drm/hisilicon/hibmc: fix 'xset dpms force off' fail

both crtc_state->adjusted_mode.hdisplay and crtc_state->adjusted_mode.vdisplay are 0 when switch dpms off, return -EINVAL cause switch dpms off fail.

---
 drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c +3 -0
index 6527a97f68a3..722e369f30d4 100644
@@ -80,6 +80,9 @@ static int hibmc_plane_atomic_check(struct drm_plane *plane,
 		return -EINVAL;
 	}
 
+	if (!crtc_state->enable)
+		return 0;
+
 	if (state->crtc_x + state->crtc_w >
 	    crtc_state->adjusted_mode.hdisplay ||
 	    state->crtc_y + state->crtc_h >
Signature · 7 lines
2.20.1


_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Acked-by on v1 1/1 Applied
#1 lore raw
Quoted 6 lines · Zhihui Chen

both crtc_state->adjusted_mode.hdisplay and crtc_state->adjusted_mode.vdisplay are 0 when switch dpms off, return -EINVAL cause switch dpms off fail.

Thanks for the patch.

Applied to drm-misc-next.

Quoted 20 lines
---
 drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c +3 -0
index 6527a97f68a3..722e369f30d4 100644
@@ -80,6 +80,9 @@ static int hibmc_plane_atomic_check(struct drm_plane
 *plane,
                return -EINVAL;
        }
 
+       if (!crtc_state->enable)
+               return 0;
+
        if (state->crtc_x + state->crtc_w >
            crtc_state->adjusted_mode.hdisplay ||
            state->crtc_y + state->crtc_h >
Quoted 5 lines

--
2.20.1

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