All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zhihui Chen <chenzhihui4@huawei.com>
To: <chenzhihui244@msn.com>, <xinliang.liu@linaro.org>,
	<zourongrong@gmail.com>, <dri-devel@lists.freedesktop.org>
Cc: puck.chen@hisilicon.com, kong.kongxinwei@hisilicon.com,
	baowenyi@huawei.com, Zhihui Chen <chenzhihui4@huawei.com>,
	allan.wang@siliconmotion.com
Subject: [PATCH] drm/hisilicon/hibmc: fix 'xset dpms force off' fail
Date: Fri, 20 Dec 2019 10:30:04 +0800	[thread overview]
Message-ID: <20191220023004.2658-1-chenzhihui4@huawei.com> (raw)

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

             reply	other threads:[~2019-12-20  2:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-20  2:30 Zhihui Chen [this message]
2020-02-13 10:09 ` [PATCH] drm/hisilicon/hibmc: fix 'xset dpms force off' fail Xinliang Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191220023004.2658-1-chenzhihui4@huawei.com \
    --to=chenzhihui4@huawei.com \
    --cc=allan.wang@siliconmotion.com \
    --cc=baowenyi@huawei.com \
    --cc=chenzhihui244@msn.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kong.kongxinwei@hisilicon.com \
    --cc=puck.chen@hisilicon.com \
    --cc=xinliang.liu@linaro.org \
    --cc=zourongrong@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.