Commit a3e50776 authored by Thomas Zimmermann's avatar Thomas Zimmermann Committed by Greg Kroah-Hartman
Browse files

drm/ast: Remove existing framebuffers before loading driver

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.


Signed-off-by: default avatarThomas Zimmermann <>
Cc: <>
Tested-by: default avatarY.C. Chen <>
Reviewed-by: default avatarJean Delvare <>
Tested-by: default avatarJean Delvare <>
Signed-off-by: default avatarDave Airlie <>
Signed-off-by: default avatarGreg Kroah-Hartman <>
parent 3921d5b8
......@@ -60,8 +60,29 @@ static const struct pci_device_id pciidlist[] = {
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)
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;
remove_conflicting_framebuffers(ap, "astdrmfb", primary);
static int ast_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
return drm_get_pci_dev(pdev, ent, &driver);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment