All of lore.kernel.org
 help / color / mirror / Atom feed
From: Meng Yi <meng.yi@nxp.com>
To: Dongsheng Wang <Dongsheng.Wang@freescale.com>,
	"airlied@linux.ie" <airlied@linux.ie>
Cc: "dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	Yi Meng-B56799 <B56799@freescale.com>
Subject: 答复: [RESEND 1/3] drm: fsl-dcu: Fix no fb check bug
Date: Thu, 24 Dec 2015 05:28:52 +0000	[thread overview]
Message-ID: <HE1PR04MB1051408944D97C4E306D7A17ECE70@HE1PR04MB1051.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <1448957749-12337-1-git-send-email-dongsheng.wang@freescale.com>

Tested-by: Meng Yi <meng.yi@nxp.com>

-----邮件原件-----
发件人: Dongsheng Wang [mailto:Dongsheng.Wang@freescale.com] 
发送时间: Tuesday, December 01, 2015 4:16 PM
收件人: airlied@linux.ie
抄送: stefan@agner.ch; dri-devel@lists.freedesktop.org; Jianwei Wang <jianwei.wang.chn@gmail.com>; Yi Meng-B56799 <B56799@freescale.com>; Wang Dongsheng-B40534 <Dongsheng.Wang@freescale.com>
主题: [RESEND 1/3] drm: fsl-dcu: Fix no fb check bug

From: Jianwei Wang <jianwei.wang.chn@gmail.com>

For state->fb may be NULL in fsl_dcu_drm_plane_atomic_check function, if so, return -EINVAL. No need check in fsl_dcu_drm_plane_atomic_update anymore.

Signed-off-by: Jianwei Wang <jianwei.wang.chn@gmail.com>
Signed-off-by: Yi Meng <b56799@freescale.com>
Signed-off-by: Wang Dongsheng <dongsheng.wang@freescale.com>
Tested-by: Stefan Agner <stefan@agner.ch>

diff --git a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c
index 51daaea..a8932a8 100644
--- a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c
+++ b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c
@@ -41,6 +41,9 @@ static int fsl_dcu_drm_plane_atomic_check(struct drm_plane *plane,  {
 	struct drm_framebuffer *fb = state->fb;
 
+	if (!fb)
+		return -EINVAL;
+
 	switch (fb->pixel_format) {
 	case DRM_FORMAT_RGB565:
 	case DRM_FORMAT_RGB888:
@@ -85,9 +88,6 @@ static void fsl_dcu_drm_plane_atomic_update(struct drm_plane *plane,
 	unsigned int alpha, bpp;
 	int index, ret;
 
-	if (!fb)
-		return;
-
 	index = fsl_dcu_drm_plane_index(plane);
 	if (index < 0)
 		return;
--
2.1.0.27.g96db324

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

  reply	other threads:[~2015-12-24  7:03 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-01  8:15 [RESEND 1/3] drm: fsl-dcu: Fix no fb check bug Dongsheng Wang
2015-12-24  5:28 ` Meng Yi [this message]
2015-12-27  3:54   ` 答复: " Stefan Agner
2015-12-28 15:14     ` Daniel Stone
2015-12-30  7:37     ` 答复: " Meng Yi
2016-01-01 15:10       ` Daniel Stone
2016-01-04  6:07         ` Stefan Agner
2016-01-04  6:48         ` Meng Yi
2015-12-24 13:37 ` Daniel Stone

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=HE1PR04MB1051408944D97C4E306D7A17ECE70@HE1PR04MB1051.eurprd04.prod.outlook.com \
    --to=meng.yi@nxp.com \
    --cc=B56799@freescale.com \
    --cc=Dongsheng.Wang@freescale.com \
    --cc=airlied@linux.ie \
    --cc=dri-devel@lists.freedesktop.org \
    /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.