diff options
author | Jan Beulich <JBeulich@novell.com> | 2005-09-13 04:25:45 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-13 11:22:32 -0400 |
commit | 438e5c5e2dae30359b53514a02f5827fb6e552c7 (patch) | |
tree | e37500967d80cd7740da5b7d9b87540dc79144b6 /drivers/video/matrox | |
parent | 2f4516dbd048f25eba78e115e8e73e1e8f04e7f9 (diff) |
[PATCH] matroxfb adjustments
Some adjustments to the matroxfb code, for one part preventing the display
to be disabled for longer than necessary, and for the other part to make
information about the frame buffer position available so that a kernel
debugger might obtain that before the initial mode change.
Finally, some return code corrections to fit the generic fb code.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Acked-by: Petr Vandrovec <vandrove@vc.cvut.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/video/matrox')
-rw-r--r-- | drivers/video/matrox/matroxfb_base.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/video/matrox/matroxfb_base.c b/drivers/video/matrox/matroxfb_base.c index 98e00d8601e5..e02da41f1b26 100644 --- a/drivers/video/matrox/matroxfb_base.c +++ b/drivers/video/matrox/matroxfb_base.c | |||
@@ -1285,7 +1285,7 @@ static int matroxfb_getmemory(WPMINFO unsigned int maxSize, unsigned int *realSi | |||
1285 | vaddr_t vm; | 1285 | vaddr_t vm; |
1286 | unsigned int offs; | 1286 | unsigned int offs; |
1287 | unsigned int offs2; | 1287 | unsigned int offs2; |
1288 | unsigned char store; | 1288 | unsigned char store, orig; |
1289 | unsigned char bytes[32]; | 1289 | unsigned char bytes[32]; |
1290 | unsigned char* tmp; | 1290 | unsigned char* tmp; |
1291 | 1291 | ||
@@ -1298,7 +1298,8 @@ static int matroxfb_getmemory(WPMINFO unsigned int maxSize, unsigned int *realSi | |||
1298 | if (maxSize > 0x2000000) maxSize = 0x2000000; | 1298 | if (maxSize > 0x2000000) maxSize = 0x2000000; |
1299 | 1299 | ||
1300 | mga_outb(M_EXTVGA_INDEX, 0x03); | 1300 | mga_outb(M_EXTVGA_INDEX, 0x03); |
1301 | mga_outb(M_EXTVGA_DATA, mga_inb(M_EXTVGA_DATA) | 0x80); | 1301 | orig = mga_inb(M_EXTVGA_DATA); |
1302 | mga_outb(M_EXTVGA_DATA, orig | 0x80); | ||
1302 | 1303 | ||
1303 | store = mga_readb(vm, 0x1234); | 1304 | store = mga_readb(vm, 0x1234); |
1304 | tmp = bytes; | 1305 | tmp = bytes; |
@@ -1323,7 +1324,7 @@ static int matroxfb_getmemory(WPMINFO unsigned int maxSize, unsigned int *realSi | |||
1323 | mga_writeb(vm, 0x1234, store); | 1324 | mga_writeb(vm, 0x1234, store); |
1324 | 1325 | ||
1325 | mga_outb(M_EXTVGA_INDEX, 0x03); | 1326 | mga_outb(M_EXTVGA_INDEX, 0x03); |
1326 | mga_outb(M_EXTVGA_DATA, mga_inb(M_EXTVGA_DATA) & ~0x80); | 1327 | mga_outb(M_EXTVGA_DATA, orig); |
1327 | 1328 | ||
1328 | *realSize = offs - 0x100000; | 1329 | *realSize = offs - 0x100000; |
1329 | #ifdef CONFIG_FB_MATROX_MILLENIUM | 1330 | #ifdef CONFIG_FB_MATROX_MILLENIUM |
@@ -1858,6 +1859,8 @@ static int initMatrox2(WPMINFO struct board* b){ | |||
1858 | to yres_virtual * xres_virtual < 2^32 */ | 1859 | to yres_virtual * xres_virtual < 2^32 */ |
1859 | } | 1860 | } |
1860 | matroxfb_init_fix(PMINFO2); | 1861 | matroxfb_init_fix(PMINFO2); |
1862 | ACCESS_FBINFO(fbcon.screen_base) = vaddr_va(ACCESS_FBINFO(video.vbase)); | ||
1863 | matroxfb_update_fix(PMINFO2); | ||
1861 | /* Normalize values (namely yres_virtual) */ | 1864 | /* Normalize values (namely yres_virtual) */ |
1862 | matroxfb_check_var(&vesafb_defined, &ACCESS_FBINFO(fbcon)); | 1865 | matroxfb_check_var(&vesafb_defined, &ACCESS_FBINFO(fbcon)); |
1863 | /* And put it into "current" var. Do NOT program hardware yet, or we'll not take over | 1866 | /* And put it into "current" var. Do NOT program hardware yet, or we'll not take over |
@@ -2010,11 +2013,11 @@ static int matroxfb_probe(struct pci_dev* pdev, const struct pci_device_id* dumm | |||
2010 | } | 2013 | } |
2011 | /* not match... */ | 2014 | /* not match... */ |
2012 | if (!b->vendor) | 2015 | if (!b->vendor) |
2013 | return -1; | 2016 | return -ENODEV; |
2014 | if (dev > 0) { | 2017 | if (dev > 0) { |
2015 | /* not requested one... */ | 2018 | /* not requested one... */ |
2016 | dev--; | 2019 | dev--; |
2017 | return -1; | 2020 | return -ENODEV; |
2018 | } | 2021 | } |
2019 | pci_read_config_dword(pdev, PCI_COMMAND, &cmd); | 2022 | pci_read_config_dword(pdev, PCI_COMMAND, &cmd); |
2020 | if (pci_enable_device(pdev)) { | 2023 | if (pci_enable_device(pdev)) { |