From: Greg Kroah-Hartman Date: Thu, 29 Nov 2018 13:58:22 +0000 (+0100) Subject: 3.18-stable patches X-Git-Tag: v4.19.6~8 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f925d492b3fa6cb56d30ddcd6701e7f1bfdf0bbb;p=thirdparty%2Fkernel%2Fstable-queue.git 3.18-stable patches added patches: drm-ast-remove-existing-framebuffers-before-loading-driver.patch --- diff --git a/queue-3.18/drm-ast-remove-existing-framebuffers-before-loading-driver.patch b/queue-3.18/drm-ast-remove-existing-framebuffers-before-loading-driver.patch new file mode 100644 index 00000000000..7042d9398f1 --- /dev/null +++ b/queue-3.18/drm-ast-remove-existing-framebuffers-before-loading-driver.patch @@ -0,0 +1,63 @@ +From 5478ad10e7850ce3d8b7056db05ddfa3c9ddad9a Mon Sep 17 00:00:00 2001 +From: Thomas Zimmermann +Date: Thu, 15 Nov 2018 11:42:16 +0100 +Subject: drm/ast: Remove existing framebuffers before loading driver + +From: Thomas Zimmermann + +commit 5478ad10e7850ce3d8b7056db05ddfa3c9ddad9a upstream. + +If vesafb attaches to the AST device, it configures the framebuffer memory +for uncached access by default. When ast.ko later tries to attach itself to +the device, it wants to use write-combining on the framebuffer memory, but +vesefb's existing configuration for uncached access takes precedence. This +results in reduced performance. + +Removing the framebuffer's configuration before loding the AST driver fixes +the problem. Other DRM drivers already contain equivalent code. + +Link: https://bugzilla.opensuse.org/show_bug.cgi?id=1112963 +Signed-off-by: Thomas Zimmermann +Cc: +Tested-by: Y.C. Chen +Reviewed-by: Jean Delvare +Tested-by: Jean Delvare +Signed-off-by: Dave Airlie +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/ast/ast_drv.c | 21 +++++++++++++++++++++ + 1 file changed, 21 insertions(+) + +--- a/drivers/gpu/drm/ast/ast_drv.c ++++ b/drivers/gpu/drm/ast/ast_drv.c +@@ -60,8 +60,29 @@ static const struct pci_device_id pciidl + + MODULE_DEVICE_TABLE(pci, pciidlist); + ++static void ast_kick_out_firmware_fb(struct pci_dev *pdev) ++{ ++ struct apertures_struct *ap; ++ bool primary = false; ++ ++ ap = alloc_apertures(1); ++ if (!ap) ++ return; ++ ++ ap->ranges[0].base = pci_resource_start(pdev, 0); ++ ap->ranges[0].size = pci_resource_len(pdev, 0); ++ ++#ifdef CONFIG_X86 ++ primary = pdev->resource[PCI_ROM_RESOURCE].flags & IORESOURCE_ROM_SHADOW; ++#endif ++ remove_conflicting_framebuffers(ap, "astdrmfb", primary); ++ kfree(ap); ++} ++ + static int ast_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) + { ++ ast_kick_out_firmware_fb(pdev); ++ + return drm_get_pci_dev(pdev, ent, &driver); + } + diff --git a/queue-3.18/series b/queue-3.18/series index 8b91adcbab3..91a46c4c001 100644 --- a/queue-3.18/series +++ b/queue-3.18/series @@ -80,3 +80,4 @@ scsi-qla2xxx-do-not-queue-commands-when-unloading.patch tty-wipe-buffer.patch tty-wipe-buffer-if-not-echoing-data.patch af_unix-move-unix_mknod-out-of-bindlock.patch +drm-ast-remove-existing-framebuffers-before-loading-driver.patch