2001-04-11 18:12:28

by Petr Vandrovec

[permalink] [raw]
Subject: [PATCH] matroxfb and mga XF4 driver coexistence...

Hi,
Alan, Linus, please apply this patch to matroxfb. It fixes complaints
from people that screen is black after they exit from X back to console.
Matrox driver does not know that it should return hardware state back to
initial state after switch, but matroxfb relies on that (XF3 did that...).
So now it reprograms hardware always from scratch...
Thanks,
Petr Vandrovec
[email protected]

diff -urdN linux/drivers/video/matrox/matroxfb_DAC1064.c linux/drivers/video/matrox/matroxfb_DAC1064.c
--- linux/drivers/video/matrox/matroxfb_DAC1064.c Tue Apr 10 22:56:19 2001
+++ linux/drivers/video/matrox/matroxfb_DAC1064.c Wed Apr 11 11:45:50 2001
@@ -418,7 +418,12 @@
outDAC1064(PMINFO DAC1064_XSYSPLLM, hw->DACclk[3]);
outDAC1064(PMINFO DAC1064_XSYSPLLN, hw->DACclk[4]);
outDAC1064(PMINFO DAC1064_XSYSPLLP, hw->DACclk[5]);
- if (!oldhw || memcmp(hw->DACreg, oldhw->DACreg, sizeof(MGA1064_DAC_regs))) {
+ /*
+ * We must ALWAYS reprogram hardware due to broken XF4 matrox drivers...
+ *
+ * if (!oldhw || memcmp(hw->DACreg, oldhw->DACreg, sizeof(MGA1064_DAC_regs)))
+ */
+ {
unsigned int i;

for (i = 0; i < sizeof(MGA1064_DAC_regs); i++) {


2001-04-11 18:43:14

by Chris Meadors

[permalink] [raw]
Subject: Re: [PATCH] matroxfb and mga XF4 driver coexistence...

On Wed, 11 Apr 2001, Petr Vandrovec wrote:

> Hi,
> Alan, Linus, please apply this patch to matroxfb. It fixes complaints
> from people that screen is black after they exit from X back to console.
> Matrox driver does not know that it should return hardware state back to
> initial state after switch, but matroxfb relies on that (XF3 did that...).
> So now it reprograms hardware always from scratch...

I would like to see this fixed as much as anyone (even complained to the
XFree people from SuSE last ALS). But I don't think the fix should be in
the kernel. XF4 needs to be fixed. The problem doesn't just effect the
maxtroxfb, but also the vgacon video mode selection.

If I put anything other than "normal" or "extended" in the "vga=" line of
my lilo.conf the machine starts okay, but upon exiting X bad stuff
happens. The screen doesn't just go black. Probally the majority of
Matrox owners have multisync monitors, but I'm stuck with an old monosync,
and it looses sync when trying to return to a VESA text mode.

I don't use the matroxfb driver so this patch wouldn't help me, and is
also why I say XFree 4.0 needs to be fixed.

-Chris
--
Two penguins were walking on an iceberg. The first penguin said to the
second, "you look like you are wearing a tuxedo." The second penguin
said, "I might be..." --David Lynch, Twin Peaks

2001-04-12 11:02:35

by Petr Vandrovec

[permalink] [raw]
Subject: Re: [PATCH] matroxfb and mga XF4 driver coexistence...

On 11 Apr 01 at 14:55, Chris Meadors wrote:
>
> I would like to see this fixed as much as anyone (even complained to the
> XFree people from SuSE last ALS). But I don't think the fix should be in
> the kernel. XF4 needs to be fixed. The problem doesn't just effect the
> maxtroxfb, but also the vgacon video mode selection.

But only users using matroxfb complains to me and/or to linux-kernel ;-)
You know, it worked last week, but it does not work anymore today. And
only thing I changed was kernel. So it must be in kernel...

> If I put anything other than "normal" or "extended" in the "vga=" line of
> my lilo.conf the machine starts okay, but upon exiting X bad stuff

It is first time I see that other drivers than mga one has troubles.

> I don't use the matroxfb driver so this patch wouldn't help me, and is
> also why I say XFree 4.0 needs to be fixed.

Buy matrox and use matroxfb. It will fix problem for you, then...
Petr Vandrovec
[email protected]

2001-04-12 13:06:25

by Rafael E. Herrera

[permalink] [raw]
Subject: Re: [PATCH] matroxfb and mga XF4 driver coexistence...

Petr Vandrovec wrote:
>
> On 11 Apr 01 at 14:55, Chris Meadors wrote:
> >
> > I would like to see this fixed as much as anyone (even complained to the
> > XFree people from SuSE last ALS). But I don't think the fix should be in
> > the kernel. XF4 needs to be fixed. The problem doesn't just effect the
> > maxtroxfb, but also the vgacon video mode selection.
>
> But only users using matroxfb complains to me and/or to linux-kernel ;-)
> You know, it worked last week, but it does not work anymore today. And
> only thing I changed was kernel. So it must be in kernel...
>
> > If I put anything other than "normal" or "extended" in the "vga=" line of
> > my lilo.conf the machine starts okay, but upon exiting X bad stuff
>
> It is first time I see that other drivers than mga one has troubles.

I think he's referrig to the matrox cards. I have mentioned this
happening to me in this list. I've a G450, if I use anything other than
'normal', going in and out of X makes my text console go blank. I don't
use the frame buffer, by the way.

> > I don't use the matroxfb driver so this patch wouldn't help me, and is
> > also why I say XFree 4.0 needs to be fixed.
>
> Buy matrox and use matroxfb. It will fix problem for you, then...

If the problem occurs whithout the frame buffer on, the problem seems to
be on the X server.
--
Rafael

2001-04-12 13:16:05

by Chris Meadors

[permalink] [raw]
Subject: Re: [PATCH] matroxfb and mga XF4 driver coexistence...

On Thu, 12 Apr 2001, Rafael E. Herrera wrote:

> > But only users using matroxfb complains to me and/or to linux-kernel ;-)
> > You know, it worked last week, but it does not work anymore today. And
> > only thing I changed was kernel. So it must be in kernel...

I thought I had seen at least one other complaint on l-k about seeing the
problem in text mode.

> I think he's referrig to the matrox cards. I have mentioned this
> happening to me in this list. I've a G450, if I use anything other than
> 'normal', going in and out of X makes my text console go blank. I don't
> use the frame buffer, by the way.

Yes, sorry I didn't make this clear. I have a Matrox G400.

> If the problem occurs whithout the frame buffer on, the problem seems to
> be on the X server.

Exactly. That is what I'm saying. I've seen the problem with the
returning to VESA text modes from XFree 4.0 anytime I use the hallib, with
2.2 and 2.4 kernels. If I compile an X server without the hallib it's
fine (G450 users don't have that option, and I like my dual head).

If X changes the mode upon starting it should put it back when it is done.

-Chris
--
Two penguins were walking on an iceberg. The first penguin said to the
second, "you look like you are wearing a tuxedo." The second penguin
said, "I might be..." --David Lynch, Twin Peaks

2001-04-12 18:58:32

by jurriaan

[permalink] [raw]
Subject: Re: [lkml]Re: [PATCH] matroxfb and mga XF4 driver coexistence...

On Thu, Apr 12, 2001 at 09:28:44AM -0400, Chris Meadors wrote:
> On Thu, 12 Apr 2001, Rafael E. Herrera wrote:
> > If the problem occurs whithout the frame buffer on, the problem seems to
> > be on the X server.
>
> Exactly. That is what I'm saying. I've seen the problem with the
> returning to VESA text modes from XFree 4.0 anytime I use the hallib, with
> 2.2 and 2.4 kernels. If I compile an X server without the hallib it's
> fine (G450 users don't have that option, and I like my dual head).
>
> If X changes the mode upon starting it should put it back when it is done.
>
Of course, but if we can fix the problem by making the kernel smaller,
what possible motive could you have for opposing it other than 'but it
doesn't solve _my_ problems!' ?

Good luck,
Jurriaan
--
HORROR FILM WISDOM:
7. If you're running from the monster, you will most likely trip or
fall. If you are female you can bet on it.
GNU/Linux 2.4.3-ac4 SMP/ReiserFS 2x1743 bogomips load av: 0.03 0.01 0.02

2001-04-12 19:42:56

by Chris Meadors

[permalink] [raw]
Subject: Re: [lkml]Re: [PATCH] matroxfb and mga XF4 driver coexistence...

On Thu, 12 Apr 2001, [email protected] wrote:

> Of course, but if we can fix the problem by making the kernel smaller,
> what possible motive could you have for opposing it other than 'but it
> doesn't solve _my_ problems!' ?

Agreed. The only thing I was thinking, was if the kernel is doing the
right thing now, it shouldn't be forced to work around a bug in XFree.
By not "fixing" the kernel, the XFree team would be forced to do the right
thing.

As for me, I'm going to see about getting the matroxfb working, so if the
patch goes in I'll be able to use a nice 132 character wide terminal
again. And I'm getting addicted to dual head in X, might be fun on the
console too.

-Chris
--
Two penguins were walking on an iceberg. The first penguin said to the
second, "you look like you are wearing a tuxedo." The second penguin
said, "I might be..." --David Lynch, Twin Peaks