Commit 94c322c30bd14ae6cdd369cb4a1f94c5c3809ac9

Authored by David Miller
Committed by Paul Mundt
1 parent 0144a2568c

s3fb: Compute VGA base iomem pointer explicitly.

This allows the driver to work in multi-domain PCI
configurations.

Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>

Showing 1 changed file with 11 additions and 0 deletions Side-by-side Diff

drivers/video/s3fb.c
... ... @@ -934,6 +934,8 @@
934 934  
935 935 static int __devinit s3_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
936 936 {
  937 + struct pci_bus_region bus_reg;
  938 + struct resource vga_res;
937 939 struct fb_info *info;
938 940 struct s3fb_info *par;
939 941 int rc;
... ... @@ -982,6 +984,15 @@
982 984 dev_err(info->device, "iomap for framebuffer failed\n");
983 985 goto err_iomap;
984 986 }
  987 +
  988 + bus_reg.start = 0;
  989 + bus_reg.end = 64 * 1024;
  990 +
  991 + vga_res.flags = IORESOURCE_IO;
  992 +
  993 + pcibios_bus_to_resource(dev, &vga_res, &bus_reg);
  994 +
  995 + par->state.vgabase = (void __iomem *) vga_res.start;
985 996  
986 997 /* Unlock regs */
987 998 cr38 = vga_rcrt(par->state.vgabase, 0x38);