]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.10-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 1 Mar 2016 05:14:10 +0000 (21:14 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 1 Mar 2016 05:14:10 +0000 (21:14 -0800)
added patches:
drm-ast-initialized-data-needed-to-map-fbdev-memory.patch

queue-3.10/drm-ast-initialized-data-needed-to-map-fbdev-memory.patch [new file with mode: 0644]
queue-3.10/series

diff --git a/queue-3.10/drm-ast-initialized-data-needed-to-map-fbdev-memory.patch b/queue-3.10/drm-ast-initialized-data-needed-to-map-fbdev-memory.patch
new file mode 100644 (file)
index 0000000..5f64066
--- /dev/null
@@ -0,0 +1,71 @@
+From 28fb4cb7fa6f63dc2fbdb5f2564dcbead8e3eee0 Mon Sep 17 00:00:00 2001
+From: Egbert Eich <eich@suse.de>
+Date: Wed, 11 Jun 2014 14:59:55 +0200
+Subject: drm/ast: Initialized data needed to map fbdev memory
+
+From: Egbert Eich <eich@suse.de>
+
+commit 28fb4cb7fa6f63dc2fbdb5f2564dcbead8e3eee0 upstream.
+
+Due to a missing initialization there was no way to map fbdev memory.
+Thus for example using the Xserver with the fbdev driver failed.
+This fix adds initialization for fix.smem_start and fix.smem_len
+in the fb_info structure, which fixes this problem.
+
+Requested-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
+Signed-off-by: Egbert Eich <eich@suse.de>
+[pulled from SuSE tree by me - airlied]
+Signed-off-by: Dave Airlie <airlied@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/ast/ast_drv.h  |    1 +
+ drivers/gpu/drm/ast/ast_fb.c   |    7 +++++++
+ drivers/gpu/drm/ast/ast_main.c |    1 +
+ drivers/gpu/drm/ast/ast_mode.c |    2 ++
+ 4 files changed, 11 insertions(+)
+
+--- a/drivers/gpu/drm/ast/ast_drv.h
++++ b/drivers/gpu/drm/ast/ast_drv.h
+@@ -296,6 +296,7 @@ int ast_framebuffer_init(struct drm_devi
+ int ast_fbdev_init(struct drm_device *dev);
+ void ast_fbdev_fini(struct drm_device *dev);
+ void ast_fbdev_set_suspend(struct drm_device *dev, int state);
++void ast_fbdev_set_base(struct ast_private *ast, unsigned long gpu_addr);
+ struct ast_bo {
+       struct ttm_buffer_object bo;
+--- a/drivers/gpu/drm/ast/ast_fb.c
++++ b/drivers/gpu/drm/ast/ast_fb.c
+@@ -366,3 +366,10 @@ void ast_fbdev_set_suspend(struct drm_de
+       fb_set_suspend(ast->fbdev->helper.fbdev, state);
+ }
++
++void ast_fbdev_set_base(struct ast_private *ast, unsigned long gpu_addr)
++{
++      ast->fbdev->helper.fbdev->fix.smem_start =
++              ast->fbdev->helper.fbdev->apertures->ranges[0].base + gpu_addr;
++      ast->fbdev->helper.fbdev->fix.smem_len = ast->vram_size - gpu_addr;
++}
+--- a/drivers/gpu/drm/ast/ast_main.c
++++ b/drivers/gpu/drm/ast/ast_main.c
+@@ -359,6 +359,7 @@ int ast_driver_load(struct drm_device *d
+       dev->mode_config.min_height = 0;
+       dev->mode_config.preferred_depth = 24;
+       dev->mode_config.prefer_shadow = 1;
++      dev->mode_config.fb_base = pci_resource_start(ast->dev->pdev, 0);
+       if (ast->chip == AST2100 ||
+           ast->chip == AST2200 ||
+--- a/drivers/gpu/drm/ast/ast_mode.c
++++ b/drivers/gpu/drm/ast/ast_mode.c
+@@ -509,6 +509,8 @@ static int ast_crtc_do_set_base(struct d
+               ret = ttm_bo_kmap(&bo->bo, 0, bo->bo.num_pages, &bo->kmap);
+               if (ret)
+                       DRM_ERROR("failed to kmap fbcon\n");
++              else
++                      ast_fbdev_set_base(ast, gpu_addr);
+       }
+       ast_bo_unreserve(bo);
index b67d82e5ddd8eb18ae4d639f70f79bfbc7178d31..80382e6e498316efef84fae6510591f4382dfb44 100644 (file)
@@ -1 +1,2 @@
 tracepoints-do-not-trace-when-cpu-is-offline.patch
+drm-ast-initialized-data-needed-to-map-fbdev-memory.patch