提交 0ff9f496 编写于 作者: J John Garry 提交者: Xinliang Liu

drm/hisilicon: hibmc: Don't overwrite fb helper surface depth

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 70109354 ("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: d1667b86 ("drm/hisilicon/hibmc: Add support for frame buffer")
Signed-off-by: NJohn Garry <john.garry@huawei.com>
Reviewed-by: NXinliang Liu <z.liuxinliang@hisilicon.com>
Signed-off-by: NXinliang Liu <z.liuxinliang@hisilicon.com>
上级 331d880b
...@@ -71,7 +71,6 @@ static int hibmc_drm_fb_create(struct drm_fb_helper *helper, ...@@ -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", DRM_DEBUG_DRIVER("surface width(%d), height(%d) and bpp(%d)\n",
sizes->surface_width, sizes->surface_height, sizes->surface_width, sizes->surface_height,
sizes->surface_bpp); sizes->surface_bpp);
sizes->surface_depth = 32;
bytes_per_pixel = DIV_ROUND_UP(sizes->surface_bpp, 8); bytes_per_pixel = DIV_ROUND_UP(sizes->surface_bpp, 8);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册