linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: John Garry <john.garry@huawei.com>
To: <z.liuxinliang@hisilicon.com>, <kong.kongxinwei@hisilicon.com>,
	<puck.chen@hisilicon.com>, <airlied@linux.ie>
Cc: <linuxarm@huawei.com>, <chris@chris-wilson.co.uk>,
	<dri-devel@lists.freedesktop.org>, <baowenyi@huawei.com>,
	<linux-kernel@vger.kernel.org>, <zourongrong@gmail.com>,
	<daniel.vetter@ffwll.ch>, John Garry <john.garry@huawei.com>
Subject: [PATCH 2/3] drm/hisilicon: hibmc: Don't overwrite fb helper surface depth
Date: Sat, 22 Sep 2018 01:25:26 +0800	[thread overview]
Message-ID: <1537550727-21257-3-git-send-email-john.garry@huawei.com> (raw)
In-Reply-To: <1537550727-21257-1-git-send-email-john.garry@huawei.com>

Currently the driver overwrites the surface depth provided by the fb
helper to give an invalid bpp/surface depth combination.

This has been exposed by commit 70109354fed2 ("drm: Reject unknown legacy
bpp and depth for drm_mode_addfb ioctl"), which now causes the driver to
fail to probe.

Fix by not overwriting the surface depth.

Fixes: d1667b86795a ("drm/hisilicon/hibmc: Add support for frame buffer")
Signed-off-by: John Garry <john.garry@huawei.com>
---
 drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_fbdev.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_fbdev.c b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_fbdev.c
index 8bd2907..edcca17 100644
--- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_fbdev.c
+++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_fbdev.c
@@ -71,7 +71,6 @@ static int hibmc_drm_fb_create(struct drm_fb_helper *helper,
 	DRM_DEBUG_DRIVER("surface width(%d), height(%d) and bpp(%d)\n",
 			 sizes->surface_width, sizes->surface_height,
 			 sizes->surface_bpp);
-	sizes->surface_depth = 32;
 
 	bytes_per_pixel = DIV_ROUND_UP(sizes->surface_bpp, 8);
 
-- 
1.9.1


  parent reply	other threads:[~2018-09-21 17:28 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-21 17:25 [PATCH 0/3] HiBMC driver fixes John Garry
2018-09-21 17:25 ` [PATCH 1/3] drm/hisilicon: hibmc: Do not carry error code in HiBMC framebuffer pointer John Garry
2018-09-21 17:25 ` John Garry [this message]
2018-09-21 17:25 ` [PATCH 3/3] drm/hisilicon: hibmc: Use HUAWEI PCI vendor ID macro John Garry
2018-09-26  3:00 ` [PATCH 0/3] HiBMC driver fixes Xinliang Liu
2018-09-26  8:46   ` John Garry
2018-09-26  9:41     ` Xinliang Liu
2018-09-26  9:53       ` John Garry
2018-09-27  8:42         ` 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=1537550727-21257-3-git-send-email-john.garry@huawei.com \
    --to=john.garry@huawei.com \
    --cc=airlied@linux.ie \
    --cc=baowenyi@huawei.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kong.kongxinwei@hisilicon.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=puck.chen@hisilicon.com \
    --cc=z.liuxinliang@hisilicon.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).