aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorDavid Vrabel <dvrabel@arcom.com>2006-01-14 16:21:23 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-14 21:27:14 -0500
commita80da7389891d0eeacbd568a9b54f665fd424d14 (patch)
tree1f0629804d83692546c9db0223236331cb70a44e /drivers/video
parent4836f5749e55663f884ea25920ff88de7822f0a8 (diff)
[PATCH] gx1fb: (try to) play nicer with various BIOSes
Seems that the CS5530A chip used in Geode GX1 systems has some crazy feature that causes SMI traps when accessing the PCI configuration space of the video device. Various GX1 BIOSes seem to use this 'feature' to hide the real BARs of the device. This patch disables these traps (in an early PCI fixup) so that Linux sees the real, physical BARs and not the virtual ones provided by the BIOS. This should allow the GX1 framebuffer driver to work on more systems that have different BIOSes as the driver no longer guesses at what the virtual BARs mean. I'm not entirely sure it the correct solution as I can neither test regular VGA console nor the X's 'cyrix' video driver so there might be some breakage there -- probably best to get some more testers before applying it. Signed-off-by: Antonino Daplas <adaplas@pol.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/geode/gx1fb_core.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/video/geode/gx1fb_core.c b/drivers/video/geode/gx1fb_core.c
index 8e8da7433994..20e69156d728 100644
--- a/drivers/video/geode/gx1fb_core.c
+++ b/drivers/video/geode/gx1fb_core.c
@@ -215,11 +215,11 @@ static int __init gx1fb_map_video_memory(struct fb_info *info, struct pci_dev *d
215 if (ret < 0) 215 if (ret < 0)
216 return ret; 216 return ret;
217 217
218 ret = pci_request_region(dev, 1, "gx1fb (video)"); 218 ret = pci_request_region(dev, 0, "gx1fb (video)");
219 if (ret < 0) 219 if (ret < 0)
220 return ret; 220 return ret;
221 par->vid_regs = ioremap(pci_resource_start(dev, 1), 221 par->vid_regs = ioremap(pci_resource_start(dev, 0),
222 pci_resource_len(dev, 1)); 222 pci_resource_len(dev, 0));
223 if (!par->vid_regs) 223 if (!par->vid_regs)
224 return -ENOMEM; 224 return -ENOMEM;
225 225
@@ -229,12 +229,9 @@ static int __init gx1fb_map_video_memory(struct fb_info *info, struct pci_dev *d
229 if (!par->dc_regs) 229 if (!par->dc_regs)
230 return -ENOMEM; 230 return -ENOMEM;
231 231
232 ret = pci_request_region(dev, 0, "gx1fb (frame buffer)");
233 if (ret < 0 )
234 return -EBUSY;
235 if ((fb_len = gx1_frame_buffer_size()) < 0) 232 if ((fb_len = gx1_frame_buffer_size()) < 0)
236 return -ENOMEM; 233 return -ENOMEM;
237 info->fix.smem_start = pci_resource_start(dev, 0); 234 info->fix.smem_start = gx_base + 0x800000;
238 info->fix.smem_len = fb_len; 235 info->fix.smem_len = fb_len;
239 info->screen_base = ioremap(info->fix.smem_start, info->fix.smem_len); 236 info->screen_base = ioremap(info->fix.smem_start, info->fix.smem_len);
240 if (!info->screen_base) 237 if (!info->screen_base)