aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/video/matrox/matroxfb_base.c13
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)) {