lkml.org 
[lkml]   [1999]   [Jan]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Date
SubjectRe: 2.2.0-pre7 report: aic7xxx and matroxfb problems
Hello Riccardo,
> 2) matroxfb ... yersterday I have installed on my PC a second video card.
> I am using matroxfb dual-head and set up the XF86_FBDev X11 server.
> Some times (not every time) when I start up the FBDev server the system
> lock up hard. I don't know what is really going on because the machine
> is completely death. No sysrq at all.
there were problems with SW cursor, which is enabled by FBDev (or
fbset -accel false). There are two problems with it - first, there was
bug in cursor switch code, which forget to disable fbcon cursor, and second,
software cursor flashing code calls driver's fbcon_revc procedure from
BH time. It is true that code should disable cursor everytime when
it enters to lowlevel fb code, but maybe that there is some forget way :-(
Could you try patch from Scott Wood, posted Jan 16 in linux-kernel,
whether it fixes problem, or, better this patch, which disables SW cursor
completely unless otherwise said by 'nohwcursor'?
Thanks,
Petr Vandrovec
vandrove@vc.cvut.cz
diff -urdN linux/Documentation/fb/matroxfb.txt linux/Documentation/fb/matroxfb.txt
--- linux/Documentation/fb/matroxfb.txt Thu Jan 7 21:18:09 1999
+++ linux/Documentation/fb/matroxfb.txt Fri Jan 15 18:01:05 1999
@@ -180,8 +180,10 @@
from `fh' and `fv' options.
sync:X - sync. pulse - bit 0 inverts HSYNC polarity, bit 1 VSYNC polarity.
If bit 3 (value 0x08) is set, composite sync instead of HSYNC is generated.
- If bit 5 (value 0x20) is set, sync on green is turned on.
- Default depends on `vesa'.
+ If bit 5 (value 0x20) is set, sync on green is turned on. Do not
+ forget, that if you want sync on green, you also probably want
+ composite sync.
+ Default depends on `vesa' value.
depth:X - Bits per pixel: 0=text, 4,8,15,16,24 or 32. Default depends on `vesa'.
If you know capabilities of your monitor, you can specify some (or all) of `pixclk', `fh'
and `fv'. In this case, `pixclock' is computed so that pixclock <= maxclk, real_fh <= fh
@@ -198,8 +200,6 @@

There are known and unknown bugs, features and misfeatures.
Currently there are following known bugs:
- + G100 support does not work as expected, I'm still investigating this one.
- Using `noinit' option works, but only for `first' head :-(
+ SVGALib does not restore screen on exit
+ generic fbcon-cfbX procedures do not work on Alphas. Due to this,
`noaccel' (and cfb4 accel) driver does not work on Alpha. So everyone
diff -urdN linux/drivers/video/matroxfb.c linux/drivers/video/matroxfb.c
--- linux/drivers/video/matroxfb.c Thu Jan 7 21:20:05 1999
+++ linux/drivers/video/matroxfb.c Fri Jan 15 20:58:08 1999
@@ -543,6 +543,7 @@
const int* vxres;
int cross4MB;
int text;
+ int plnwt;
} capable;
struct {
unsigned int size;
@@ -1099,7 +1100,8 @@
mga_fifo(8);
mga_outl(M_PITCH, mpitch);
mga_outl(M_YDSTORG, curr_ydstorg(MINFO));
- mga_outl(M_PLNWT, -1);
+ if (ACCESS_FBINFO(capable.plnwt))
+ mga_outl(M_PLNWT, -1);
mga_outl(M_OPMODE, mopmode);
mga_outl(M_CXBNDRY, 0xFFFF0000);
mga_outl(M_YTOP, 0);
@@ -2433,10 +2435,7 @@
}
}
dprintk(KERN_INFO "matroxfb: acceleration disabled\n");
- p->dispsw = swtmp;
- return;
- }
- if (p->type == FB_TYPE_TEXT) {
+ } else if (p->type == FB_TYPE_TEXT) {
swtmp = &matroxfb_text;
} else {
switch (p->var.bits_per_pixel) {
@@ -2473,7 +2472,6 @@
return;
}
}
- dprintk(KERN_INFO "matroxfb: now accelerated\n");
memcpy(&ACCESS_FBINFO(dispsw), swtmp, sizeof(ACCESS_FBINFO(dispsw)));
p->dispsw = &ACCESS_FBINFO(dispsw);
if ((p->type != FB_TYPE_TEXT) && ACCESS_FBINFO(devflags.hwcursor)) {
@@ -3959,11 +3957,21 @@

DBG("MGAG100_preinit")

+ /* there are some instabilities if in_div > 19 && vco < 61000 */
+ ACCESS_FBINFO(features.pll.vco_freq_min) = 62000;
+ ACCESS_FBINFO(features.pll.ref_freq) = 27000;
+ ACCESS_FBINFO(features.pll.feed_div_min) = 7;
+ ACCESS_FBINFO(features.pll.feed_div_max) = 127;
+ ACCESS_FBINFO(features.pll.in_div_min) = 1;
+ ACCESS_FBINFO(features.pll.in_div_max) = 31;
+ ACCESS_FBINFO(features.pll.post_shift_max) = 3;
+ ACCESS_FBINFO(features.DAC1064.xvrefctrl) = DAC1064_XVREFCTRL_G100_DEFAULT;
/* ACCESS_FBINFO(capable.cfb4) = 0; ... preinitialized by 0 */
ACCESS_FBINFO(capable.text) = 1;
ACCESS_FBINFO(capable.vxres) = vxres_g100;
ACCESS_FBINFO(features.accel.has_cacheflush) = 1;
ACCESS_FBINFO(cursor.timer.function) = matroxfb_DAC1064_flashcursor;
+ ACCESS_FBINFO(capable.plnwt) = ACCESS_FBINFO(devflags.accelerator) != FB_ACCEL_MATROX_MGAG100;

if (ACCESS_FBINFO(devflags.noinit))
return 0;
@@ -3979,10 +3987,13 @@
pci_read_config_dword(ACCESS_FBINFO(pcidev), 0x50, &reg50);
reg50 &= ~0x3000;
pci_write_config_dword(ACCESS_FBINFO(pcidev), 0x50, reg50);
+
+ DAC1064_setmclk(PMINFO hw, DAC1064_OPT_MDIV2 | DAC1064_OPT_GDIV3 | DAC1064_OPT_SCLK_PCI, 133333);
+
if (ACCESS_FBINFO(devflags.accelerator) == FB_ACCEL_MATROX_MGAG100) {
- hw->MXoptionReg |= 0x5080;
+ hw->MXoptionReg |= 0x1080;
pci_write_config_dword(ACCESS_FBINFO(pcidev), PCI_OPTION_REG, hw->MXoptionReg);
- mga_outl(M_CTLWTST, 0x01032521);
+ mga_outl(M_CTLWTST, 0x00000300);
/* mga_outl(M_CTLWTST, 0x03258A31); */
udelay(100);
mga_outb(0x1C05, 0x00);
@@ -4002,9 +4013,11 @@
mga_writeb(ACCESS_FBINFO(video.vbase), 0x0000, 0xAA);
mga_writeb(ACCESS_FBINFO(video.vbase), 0x0800, 0x55);
mga_writeb(ACCESS_FBINFO(video.vbase), 0x4000, 0x55);
+#if 0
if (mga_readb(ACCESS_FBINFO(video.vbase), 0x0000) != 0xAA) {
hw->MXoptionReg &= ~0x1000;
}
+#endif
} else {
hw->MXoptionReg |= 0x00000C00;
if (ACCESS_FBINFO(devflags.sgram))
@@ -4028,15 +4041,6 @@

DBG("MGAG100_reset")

- /* there are some instabilities if in_div > 19 && vco < 61000 */
- ACCESS_FBINFO(features.pll.vco_freq_min) = 62000;
- ACCESS_FBINFO(features.pll.ref_freq) = 27000;
- ACCESS_FBINFO(features.pll.feed_div_min) = 7;
- ACCESS_FBINFO(features.pll.feed_div_max) = 127;
- ACCESS_FBINFO(features.pll.in_div_min) = 1;
- ACCESS_FBINFO(features.pll.in_div_max) = 31;
- ACCESS_FBINFO(features.pll.post_shift_max) = 3;
- ACCESS_FBINFO(features.DAC1064.xvrefctrl) = DAC1064_XVREFCTRL_G100_DEFAULT;
ACCESS_FBINFO(features.DAC1064.cursorimage) = ACCESS_FBINFO(video.len_usable) - 1024;
if (ACCESS_FBINFO(devflags.hwcursor))
ACCESS_FBINFO(video.len_usable) -= 1024;
@@ -4851,7 +4855,7 @@
static int no_pci_retry = 0; /* "matrox:nopciretry" */
static int novga = 0; /* "matrox:novga" */
static int nobios = 0; /* "matrox:nobios" */
-static int noinit = 1; /* "matrox:noinit" */
+static int noinit = 1; /* "matrox:init" */
static int inverse = 0; /* "matrox:inverse" */
static int hwcursor = 1; /* "matrox:nohwcursor" */
static int blink = 1; /* "matrox:noblink" */
@@ -5320,6 +5324,7 @@
ACCESS_FBINFO(max_pixel_clock) = b->maxclk;

printk(KERN_INFO "matroxfb: Matrox %s detected\n", b->name);
+ ACCESS_FBINFO(capable.plnwt) = 1;
ACCESS_FBINFO(devflags.video64bits) = b->flags & DEVF_VIDEO64BIT;
if (b->flags & DEVF_TEXT4B) {
ACCESS_FBINFO(devflags.vgastep) = 4;
\
 
 \ /
  Last update: 2005-03-22 13:49    [from the cache]
©2003-2011 Jasper Spaans