]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
drm/hisilicon: hibmc: Don't overwrite fb helper surface depth
authorJohn Garry <john.garry@huawei.com>
Fri, 21 Sep 2018 17:25:26 +0000 (01:25 +0800)
committerKhalid Elmously <khalid.elmously@canonical.com>
Fri, 14 Feb 2020 05:29:37 +0000 (00:29 -0500)
commitd3eb1d8004af9eba3a83b036f4d676455d23737d
treed4273811905a2e965006248d06e8d5d7d0625487
parent35604255a768f9ff75f32936f32bccf3e03b9c44
drm/hisilicon: hibmc: Don't overwrite fb helper surface depth

BugLink: https://bugs.launchpad.net/bugs/1863019
[ Upstream commit 0ff9f49646353ce31312411e7e7bd2281492a40e ]

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>
Reviewed-by: Xinliang Liu <z.liuxinliang@hisilicon.com>
Signed-off-by: Xinliang Liu <z.liuxinliang@hisilicon.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_fbdev.c