aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/matrox
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pobox.com>2005-11-07 22:51:47 -0500
committerJeff Garzik <jgarzik@pobox.com>2005-11-07 22:51:47 -0500
commit6b995751c2e851d2bc9c277b5884d0adb519e31d (patch)
tree7a15b41b5d8ce612915584a0773c670d5c0ab5b8 /drivers/video/matrox
parent6c2f4267833f453156f8f439cc32eb4c92f357b4 (diff)
parentd27ba47e7e8c466c18983a1779d611f82d6a354f (diff)
Merge branch 'master'
Diffstat (limited to 'drivers/video/matrox')
-rw-r--r--drivers/video/matrox/matroxfb_DAC1064.c4
-rw-r--r--drivers/video/matrox/matroxfb_accel.c2
-rw-r--r--drivers/video/matrox/matroxfb_base.c29
-rw-r--r--drivers/video/matrox/matroxfb_base.h5
-rw-r--r--drivers/video/matrox/matroxfb_crtc2.c1
5 files changed, 18 insertions, 23 deletions
diff --git a/drivers/video/matrox/matroxfb_DAC1064.c b/drivers/video/matrox/matroxfb_DAC1064.c
index 149680f8bcf0..0fbd9b5149f1 100644
--- a/drivers/video/matrox/matroxfb_DAC1064.c
+++ b/drivers/video/matrox/matroxfb_DAC1064.c
@@ -657,7 +657,6 @@ static int MGA1064_preinit(WPMINFO2) {
657 /* ACCESS_FBINFO(capable.cfb4) = 0; ... preinitialized by 0 */ 657 /* ACCESS_FBINFO(capable.cfb4) = 0; ... preinitialized by 0 */
658 ACCESS_FBINFO(capable.text) = 1; 658 ACCESS_FBINFO(capable.text) = 1;
659 ACCESS_FBINFO(capable.vxres) = vxres_mystique; 659 ACCESS_FBINFO(capable.vxres) = vxres_mystique;
660 ACCESS_FBINFO(features.accel.has_cacheflush) = 1;
661 660
662 ACCESS_FBINFO(outputs[0]).output = &m1064; 661 ACCESS_FBINFO(outputs[0]).output = &m1064;
663 ACCESS_FBINFO(outputs[0]).src = ACCESS_FBINFO(outputs[0]).default_src; 662 ACCESS_FBINFO(outputs[0]).src = ACCESS_FBINFO(outputs[0]).default_src;
@@ -842,7 +841,6 @@ static int MGAG100_preinit(WPMINFO2) {
842 /* ACCESS_FBINFO(capable.cfb4) = 0; ... preinitialized by 0 */ 841 /* ACCESS_FBINFO(capable.cfb4) = 0; ... preinitialized by 0 */
843 ACCESS_FBINFO(capable.text) = 1; 842 ACCESS_FBINFO(capable.text) = 1;
844 ACCESS_FBINFO(capable.vxres) = vxres_g100; 843 ACCESS_FBINFO(capable.vxres) = vxres_g100;
845 ACCESS_FBINFO(features.accel.has_cacheflush) = 1;
846 ACCESS_FBINFO(capable.plnwt) = ACCESS_FBINFO(devflags.accelerator) == FB_ACCEL_MATROX_MGAG100 844 ACCESS_FBINFO(capable.plnwt) = ACCESS_FBINFO(devflags.accelerator) == FB_ACCEL_MATROX_MGAG100
847 ? ACCESS_FBINFO(devflags.sgram) : 1; 845 ? ACCESS_FBINFO(devflags.sgram) : 1;
848 846
@@ -980,7 +978,7 @@ static void MGAG100_reset(WPMINFO2) {
980 hw->MXoptionReg |= 0x40; /* FIXME... */ 978 hw->MXoptionReg |= 0x40; /* FIXME... */
981 pci_write_config_dword(ACCESS_FBINFO(pcidev), PCI_OPTION_REG, hw->MXoptionReg); 979 pci_write_config_dword(ACCESS_FBINFO(pcidev), PCI_OPTION_REG, hw->MXoptionReg);
982 } 980 }
983 mga_setr(M_EXTVGA_INDEX, 0x06, 0x50); 981 mga_setr(M_EXTVGA_INDEX, 0x06, 0x00);
984 } 982 }
985 } 983 }
986 if (ACCESS_FBINFO(devflags.g450dac)) { 984 if (ACCESS_FBINFO(devflags.g450dac)) {
diff --git a/drivers/video/matrox/matroxfb_accel.c b/drivers/video/matrox/matroxfb_accel.c
index c7f3e1321224..a5c825d99466 100644
--- a/drivers/video/matrox/matroxfb_accel.c
+++ b/drivers/video/matrox/matroxfb_accel.c
@@ -122,7 +122,7 @@ void matrox_cfbX_init(WPMINFO2) {
122 ACCESS_FBINFO(fbops).fb_copyarea = cfb_copyarea; 122 ACCESS_FBINFO(fbops).fb_copyarea = cfb_copyarea;
123 ACCESS_FBINFO(fbops).fb_fillrect = cfb_fillrect; 123 ACCESS_FBINFO(fbops).fb_fillrect = cfb_fillrect;
124 ACCESS_FBINFO(fbops).fb_imageblit = cfb_imageblit; 124 ACCESS_FBINFO(fbops).fb_imageblit = cfb_imageblit;
125 ACCESS_FBINFO(fbops).fb_cursor = soft_cursor; 125 ACCESS_FBINFO(fbops).fb_cursor = NULL;
126 126
127 accel = (ACCESS_FBINFO(fbcon).var.accel_flags & FB_ACCELF_TEXT) == FB_ACCELF_TEXT; 127 accel = (ACCESS_FBINFO(fbcon).var.accel_flags & FB_ACCELF_TEXT) == FB_ACCELF_TEXT;
128 128
diff --git a/drivers/video/matrox/matroxfb_base.c b/drivers/video/matrox/matroxfb_base.c
index e02da41f1b26..1e74f4cca53b 100644
--- a/drivers/video/matrox/matroxfb_base.c
+++ b/drivers/video/matrox/matroxfb_base.c
@@ -264,7 +264,6 @@ static void matroxfb_disable_irq(WPMINFO2) {
264} 264}
265 265
266int matroxfb_wait_for_sync(WPMINFO u_int32_t crtc) { 266int matroxfb_wait_for_sync(WPMINFO u_int32_t crtc) {
267 wait_queue_t __wait;
268 struct matrox_vsync *vs; 267 struct matrox_vsync *vs;
269 unsigned int cnt; 268 unsigned int cnt;
270 int ret; 269 int ret;
@@ -286,7 +285,6 @@ int matroxfb_wait_for_sync(WPMINFO u_int32_t crtc) {
286 if (ret) { 285 if (ret) {
287 return ret; 286 return ret;
288 } 287 }
289 init_waitqueue_entry(&__wait, current);
290 288
291 cnt = vs->cnt; 289 cnt = vs->cnt;
292 ret = wait_event_interruptible_timeout(vs->wait, cnt != vs->cnt, HZ/10); 290 ret = wait_event_interruptible_timeout(vs->wait, cnt != vs->cnt, HZ/10);
@@ -500,10 +498,6 @@ static int matroxfb_pitch_adjust(CPMINFO int xres, int bpp) {
500 } else { 498 } else {
501 xres_new = matroxfb_test_and_set_rounding(PMINFO xres, bpp); 499 xres_new = matroxfb_test_and_set_rounding(PMINFO xres, bpp);
502 } 500 }
503 if (!xres_new) return 0;
504 if (xres != xres_new) {
505 printk(KERN_INFO "matroxfb: cannot set xres to %d, rounded up to %d\n", xres, xres_new);
506 }
507 return xres_new; 501 return xres_new;
508} 502}
509 503
@@ -1285,7 +1279,7 @@ static int matroxfb_getmemory(WPMINFO unsigned int maxSize, unsigned int *realSi
1285 vaddr_t vm; 1279 vaddr_t vm;
1286 unsigned int offs; 1280 unsigned int offs;
1287 unsigned int offs2; 1281 unsigned int offs2;
1288 unsigned char store, orig; 1282 unsigned char orig;
1289 unsigned char bytes[32]; 1283 unsigned char bytes[32];
1290 unsigned char* tmp; 1284 unsigned char* tmp;
1291 1285
@@ -1301,16 +1295,12 @@ static int matroxfb_getmemory(WPMINFO unsigned int maxSize, unsigned int *realSi
1301 orig = mga_inb(M_EXTVGA_DATA); 1295 orig = mga_inb(M_EXTVGA_DATA);
1302 mga_outb(M_EXTVGA_DATA, orig | 0x80); 1296 mga_outb(M_EXTVGA_DATA, orig | 0x80);
1303 1297
1304 store = mga_readb(vm, 0x1234);
1305 tmp = bytes; 1298 tmp = bytes;
1306 for (offs = 0x100000; offs < maxSize; offs += 0x200000) 1299 for (offs = 0x100000; offs < maxSize; offs += 0x200000)
1307 *tmp++ = mga_readb(vm, offs); 1300 *tmp++ = mga_readb(vm, offs);
1308 for (offs = 0x100000; offs < maxSize; offs += 0x200000) 1301 for (offs = 0x100000; offs < maxSize; offs += 0x200000)
1309 mga_writeb(vm, offs, 0x02); 1302 mga_writeb(vm, offs, 0x02);
1310 if (ACCESS_FBINFO(features.accel.has_cacheflush)) 1303 mga_outb(M_CACHEFLUSH, 0x00);
1311 mga_outb(M_CACHEFLUSH, 0x00);
1312 else
1313 mga_writeb(vm, 0x1234, 0x99);
1314 for (offs = 0x100000; offs < maxSize; offs += 0x200000) { 1304 for (offs = 0x100000; offs < maxSize; offs += 0x200000) {
1315 if (mga_readb(vm, offs) != 0x02) 1305 if (mga_readb(vm, offs) != 0x02)
1316 break; 1306 break;
@@ -1321,7 +1311,6 @@ static int matroxfb_getmemory(WPMINFO unsigned int maxSize, unsigned int *realSi
1321 tmp = bytes; 1311 tmp = bytes;
1322 for (offs2 = 0x100000; offs2 < maxSize; offs2 += 0x200000) 1312 for (offs2 = 0x100000; offs2 < maxSize; offs2 += 0x200000)
1323 mga_writeb(vm, offs2, *tmp++); 1313 mga_writeb(vm, offs2, *tmp++);
1324 mga_writeb(vm, 0x1234, store);
1325 1314
1326 mga_outb(M_EXTVGA_INDEX, 0x03); 1315 mga_outb(M_EXTVGA_INDEX, 0x03);
1327 mga_outb(M_EXTVGA_DATA, orig); 1316 mga_outb(M_EXTVGA_DATA, orig);
@@ -1430,6 +1419,20 @@ static struct board {
1430 MGA_1164, 1419 MGA_1164,
1431 &vbMystique, 1420 &vbMystique,
1432 "Mystique 220 (PCI)"}, 1421 "Mystique 220 (PCI)"},
1422 {PCI_VENDOR_ID_MATROX, PCI_DEVICE_ID_MATROX_MYS_AGP, 0x02,
1423 0, 0,
1424 DEVF_VIDEO64BIT | DEVF_CROSS4MB,
1425 180000,
1426 MGA_1064,
1427 &vbMystique,
1428 "Mystique (AGP)"},
1429 {PCI_VENDOR_ID_MATROX, PCI_DEVICE_ID_MATROX_MYS_AGP, 0xFF,
1430 0, 0,
1431 DEVF_VIDEO64BIT | DEVF_SWAPS | DEVF_CROSS4MB,
1432 220000,
1433 MGA_1164,
1434 &vbMystique,
1435 "Mystique 220 (AGP)"},
1433#endif 1436#endif
1434#ifdef CONFIG_FB_MATROX_G 1437#ifdef CONFIG_FB_MATROX_G
1435 {PCI_VENDOR_ID_MATROX, PCI_DEVICE_ID_MATROX_G100_MM, 0xFF, 1438 {PCI_VENDOR_ID_MATROX, PCI_DEVICE_ID_MATROX_G100_MM, 0xFF,
diff --git a/drivers/video/matrox/matroxfb_base.h b/drivers/video/matrox/matroxfb_base.h
index 85a0b2558452..a8c47ad2cdb6 100644
--- a/drivers/video/matrox/matroxfb_base.h
+++ b/drivers/video/matrox/matroxfb_base.h
@@ -272,10 +272,6 @@ struct matrox_DAC1064_features {
272 u_int8_t xmiscctrl; 272 u_int8_t xmiscctrl;
273}; 273};
274 274
275struct matrox_accel_features {
276 int has_cacheflush;
277};
278
279/* current hardware status */ 275/* current hardware status */
280struct mavenregs { 276struct mavenregs {
281 u_int8_t regs[256]; 277 u_int8_t regs[256];
@@ -440,7 +436,6 @@ struct matrox_fb_info {
440 struct { 436 struct {
441 struct matrox_pll_features pll; 437 struct matrox_pll_features pll;
442 struct matrox_DAC1064_features DAC1064; 438 struct matrox_DAC1064_features DAC1064;
443 struct matrox_accel_features accel;
444 } features; 439 } features;
445 struct { 440 struct {
446 spinlock_t DAC; 441 spinlock_t DAC;
diff --git a/drivers/video/matrox/matroxfb_crtc2.c b/drivers/video/matrox/matroxfb_crtc2.c
index 429047ac615a..d52d7d825c41 100644
--- a/drivers/video/matrox/matroxfb_crtc2.c
+++ b/drivers/video/matrox/matroxfb_crtc2.c
@@ -576,7 +576,6 @@ static struct fb_ops matroxfb_dh_ops = {
576 .fb_fillrect = cfb_fillrect, 576 .fb_fillrect = cfb_fillrect,
577 .fb_copyarea = cfb_copyarea, 577 .fb_copyarea = cfb_copyarea,
578 .fb_imageblit = cfb_imageblit, 578 .fb_imageblit = cfb_imageblit,
579 .fb_cursor = soft_cursor,
580}; 579};
581 580
582static struct fb_var_screeninfo matroxfb_dh_defined = { 581static struct fb_var_screeninfo matroxfb_dh_defined = {