All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/hisilicon/hibmc: fix 'xset dpms force off' fail
@ 2019-12-20  2:30 Zhihui Chen
  2020-02-13 10:09 ` Xinliang Liu
  0 siblings, 1 reply; 2+ messages in thread
From: Zhihui Chen @ 2019-12-20  2:30 UTC (permalink / raw)
  To: chenzhihui244, xinliang.liu, zourongrong, dri-devel
  Cc: puck.chen, kong.kongxinwei, baowenyi, Zhihui Chen, allan.wang

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.

Signed-off-by: Zhihui Chen <chenzhihui4@huawei.com>
---
 drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c
index 6527a97f68a3..722e369f30d4 100644
--- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c
+++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c
@@ -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 >
-- 
2.20.1


_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-02-13 10:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-20  2:30 [PATCH] drm/hisilicon/hibmc: fix 'xset dpms force off' fail Zhihui Chen
2020-02-13 10:09 ` Xinliang Liu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.