[PATCH 05/14] drm/cirrus: initialize start and size fields

Varad Gautam varadgautam at gmail.com
Fri Aug 18 15:49:10 UTC 2017


From: Dominik Behr <dbehr at chromium.org>

initialize start and size fields in fb info
so user space drivers like fbdev can map the memory

cherry-pick from 3.14 to 3.18 kernel to let VMtest pass

dmesg now shows proper size and fb start

initially reviewed for chromiumos at:
https://chromium-review.googlesource.com/167396
https://chromium-review.googlesource.com/282933
https://chromium-review.googlesource.com/339092

Signed-off-by: Dominik Behr <dbehr at chromium.org>
Signed-off-by: Zhuo-hao Lee <zhuo-hao.lee at intel.com>
Signed-off-by: Stéphane Marchesin <marcheu at chromium.org>
---
 drivers/gpu/drm/cirrus/cirrus_fbdev.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/cirrus/cirrus_fbdev.c b/drivers/gpu/drm/cirrus/cirrus_fbdev.c
index ed96dae1c205..4bc7d8f60e97 100644
--- a/drivers/gpu/drm/cirrus/cirrus_fbdev.c
+++ b/drivers/gpu/drm/cirrus/cirrus_fbdev.c
@@ -232,6 +232,9 @@ static int cirrusfb_create(struct drm_fb_helper *helper,
 	info->screen_base = sysram;
 	info->screen_size = size;
 
+	info->fix.smem_start = cdev->dev->mode_config.fb_base;
+	info->fix.smem_len = size;
+
 	info->fix.mmio_start = 0;
 	info->fix.mmio_len = 0;
 
-- 
2.13.1



More information about the dri-devel mailing list