aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/matrox/matroxfb_base.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/matrox/matroxfb_base.c')
-rw-r--r--drivers/video/matrox/matroxfb_base.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/video/matrox/matroxfb_base.c b/drivers/video/matrox/matroxfb_base.c
index 1734438f7d7c..a780bb30ffc0 100644
--- a/drivers/video/matrox/matroxfb_base.c
+++ b/drivers/video/matrox/matroxfb_base.c
@@ -1283,7 +1283,7 @@ static int matroxfb_getmemory(WPMINFO unsigned int maxSize, unsigned int *realSi
1283 vaddr_t vm; 1283 vaddr_t vm;
1284 unsigned int offs; 1284 unsigned int offs;
1285 unsigned int offs2; 1285 unsigned int offs2;
1286 unsigned char store, orig; 1286 unsigned char orig;
1287 unsigned char bytes[32]; 1287 unsigned char bytes[32];
1288 unsigned char* tmp; 1288 unsigned char* tmp;
1289 1289
@@ -1299,16 +1299,12 @@ static int matroxfb_getmemory(WPMINFO unsigned int maxSize, unsigned int *realSi
1299 orig = mga_inb(M_EXTVGA_DATA); 1299 orig = mga_inb(M_EXTVGA_DATA);
1300 mga_outb(M_EXTVGA_DATA, orig | 0x80); 1300 mga_outb(M_EXTVGA_DATA, orig | 0x80);
1301 1301
1302 store = mga_readb(vm, 0x1234);
1303 tmp = bytes; 1302 tmp = bytes;
1304 for (offs = 0x100000; offs < maxSize; offs += 0x200000) 1303 for (offs = 0x100000; offs < maxSize; offs += 0x200000)
1305 *tmp++ = mga_readb(vm, offs); 1304 *tmp++ = mga_readb(vm, offs);
1306 for (offs = 0x100000; offs < maxSize; offs += 0x200000) 1305 for (offs = 0x100000; offs < maxSize; offs += 0x200000)
1307 mga_writeb(vm, offs, 0x02); 1306 mga_writeb(vm, offs, 0x02);
1308 if (ACCESS_FBINFO(features.accel.has_cacheflush)) 1307 mga_outb(M_CACHEFLUSH, 0x00);
1309 mga_outb(M_CACHEFLUSH, 0x00);
1310 else
1311 mga_writeb(vm, 0x1234, 0x99);
1312 for (offs = 0x100000; offs < maxSize; offs += 0x200000) { 1308 for (offs = 0x100000; offs < maxSize; offs += 0x200000) {
1313 if (mga_readb(vm, offs) != 0x02) 1309 if (mga_readb(vm, offs) != 0x02)
1314 break; 1310 break;
@@ -1319,7 +1315,6 @@ static int matroxfb_getmemory(WPMINFO unsigned int maxSize, unsigned int *realSi
1319 tmp = bytes; 1315 tmp = bytes;
1320 for (offs2 = 0x100000; offs2 < maxSize; offs2 += 0x200000) 1316 for (offs2 = 0x100000; offs2 < maxSize; offs2 += 0x200000)
1321 mga_writeb(vm, offs2, *tmp++); 1317 mga_writeb(vm, offs2, *tmp++);
1322 mga_writeb(vm, 0x1234, store);
1323 1318
1324 mga_outb(M_EXTVGA_INDEX, 0x03); 1319 mga_outb(M_EXTVGA_INDEX, 0x03);
1325 mga_outb(M_EXTVGA_DATA, orig); 1320 mga_outb(M_EXTVGA_DATA, orig);