From: John Garry Subject: [PATCH 2/3] drm/hisilicon: hibmc: Don't overwrite fb helper surface depth Date: Sat, 22 Sep 2018 01:25:26 +0800 Message-ID: <1537550727-21257-3-git-send-email-john.garry@huawei.com> References: <1537550727-21257-1-git-send-email-john.garry@huawei.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: In-Reply-To: <1537550727-21257-1-git-send-email-john.garry@huawei.com> Sender: linux-kernel-owner@vger.kernel.org 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 List-Id: dri-devel@lists.freedesktop.org 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 --- 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