Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Zimmermann <tzimmermann@suse.de>2018-11-06 13:40:23 +0100
committerThomas Zimmermann <tzimmermann@suse.de>2018-11-06 13:53:17 +0100
commit18a42b9333544319fe912723c50e23572f32f3e8 (patch)
tree5d03fd46897926d6ffa8cc47115a83493a0cd6df
parentc66cde5da314764bcdbf6fe7d4427a9ae130fff5 (diff)
drm/hisilicon: hibmc: Don't overwrite fb helper surface depth (bsc#1113766)
-rw-r--r--patches.fixes/0001-drm-hisilicon-hibmc-Don-t-overwrite-fb-helper-surfac.patch41
-rw-r--r--series.conf1
2 files changed, 42 insertions, 0 deletions
diff --git a/patches.fixes/0001-drm-hisilicon-hibmc-Don-t-overwrite-fb-helper-surfac.patch b/patches.fixes/0001-drm-hisilicon-hibmc-Don-t-overwrite-fb-helper-surfac.patch
new file mode 100644
index 0000000000..ba480ab984
--- /dev/null
+++ b/patches.fixes/0001-drm-hisilicon-hibmc-Don-t-overwrite-fb-helper-surfac.patch
@@ -0,0 +1,41 @@
+From 0ff9f49646353ce31312411e7e7bd2281492a40e Mon Sep 17 00:00:00 2001
+From: John Garry <john.garry@huawei.com>
+Date: Sat, 22 Sep 2018 01:25:26 +0800
+Subject: drm/hisilicon: hibmc: Don't overwrite fb helper surface depth
+Git-commit: 0ff9f49646353ce31312411e7e7bd2281492a40e
+Patch-mainline: v4.20-rc1
+References: bsc#1113766
+
+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>
+Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
+---
+ 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 8bd29075ae4e..edcca1761500 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);
+
+--
+2.19.1
+
diff --git a/series.conf b/series.conf
index 9629d762ec..581627f262 100644
--- a/series.conf
+++ b/series.conf
@@ -17694,6 +17694,7 @@
patches.suse/hwrng-core-document-the-quality-field.patch
patches.fixes/0001-drm-virtio-fix-bounds-check-in-virtio_gpu_cmd_get_ca.patch
patches.fixes/0001-drm-hisilicon-hibmc-Do-not-carry-error-code-in-HiBMC.patch
+ patches.fixes/0001-drm-hisilicon-hibmc-Don-t-overwrite-fb-helper-surfac.patch
patches.fixes/0001-fbdev-fix-broken-menu-dependencies.patch
patches.fixes/0001-memory_hotplug-cond_resched-in-__remove_pages.patch
# end of sorted patches