2005-03-06 00:01:56

by Guennadi Liakhovetski

[permalink] [raw]
Subject: [2.6.11 Permedia-2 Framebuffer] driver broken (?).

Hi

Worked on 2.6.10-rc2. With 2.6.11 during boot upon switching to fb, text
becomes orange, penguins look sick (not sharp). X starts and runs normal
(doesn't use fb), switching to vt not possible any more. Disabling
fb-console in kernel config fixes VTs. Reverting pm2fb.c fixes the
problem.

No unusual output in dmesg.

System: Compaq AP400 with a TI card:

01:00.0 VGA compatible controller: Texas Instruments TVP4020 [Permedia 2] (rev 11) (prog-if 00 [VGA])
Subsystem: Elsa AG GLoria Synergy
Flags: bus master, 66Mhz, medium devsel, latency 66, IRQ 22
Memory at 51000000 (32-bit, non-prefetchable) [size=128K]
Memory at 50000000 (32-bit, non-prefetchable) [size=8M]
Memory at 50800000 (32-bit, non-prefetchable) [size=8M]
Expansion ROM at <unassigned> [disabled] [size=64K]
Capabilities: [4c] Power Management version 1
Capabilities: [40] AGP version 1.0

CPUs: 2 * Pentium II 400MHz full cpuinfo available on request)

.config (fb / video):

CONFIG_FB=y
CONFIG_FB_MODE_HELPERS=y
# CONFIG_FB_TILEBLITTING is not set
# CONFIG_FB_CIRRUS is not set
CONFIG_FB_PM2=y
CONFIG_FB_PM2_FIFO_DISCONNECT=y
# CONFIG_FB_CYBER2000 is not set
# CONFIG_FB_ASILIANT is not set
# CONFIG_FB_IMSTT is not set
# CONFIG_FB_VGA16 is not set
# CONFIG_FB_VESA is not set
CONFIG_VIDEO_SELECT=y
# CONFIG_FB_HGA is not set
# CONFIG_FB_RIVA is not set
# CONFIG_FB_I810 is not set
# CONFIG_FB_INTEL is not set
# CONFIG_FB_MATROX is not set
# CONFIG_FB_RADEON_OLD is not set
# CONFIG_FB_RADEON is not set
# CONFIG_FB_ATY128 is not set
# CONFIG_FB_ATY is not set
# CONFIG_FB_SAVAGE is not set
# CONFIG_FB_SIS is not set
# CONFIG_FB_NEOMAGIC is not set
# CONFIG_FB_KYRO is not set
# CONFIG_FB_3DFX is not set
# CONFIG_FB_VOODOO1 is not set
# CONFIG_FB_TRIDENT is not set
# CONFIG_FB_VIRTUAL is not set

#
# Console display driver support
#
CONFIG_VGA_CONSOLE=y
# CONFIG_MDA_CONSOLE is not set
CONFIG_DUMMY_CONSOLE=y
CONFIG_FRAMEBUFFER_CONSOLE=y
# CONFIG_FONTS is not set
CONFIG_FONT_8x8=y
CONFIG_FONT_8x16=y

#
# Logo configuration
#
CONFIG_LOGO=y
# CONFIG_LOGO_LINUX_MONO is not set
# CONFIG_LOGO_LINUX_VGA16 is not set
CONFIG_LOGO_LINUX_CLUT224=y
# CONFIG_BACKLIGHT_LCD_SUPPORT is not set

Thanks
Guennadi
---
Guennadi Liakhovetski


2005-03-06 09:53:37

by Guennadi Liakhovetski

[permalink] [raw]
Subject: Re: [2.6.11 Permedia-2 Framebuffer] driver broken (?).

I wasn't quite correct in my report yesterday. Replacing pm2fb.c from
2.6.11 with 2.6.10 fixes only one problem - the font becomes white again
and penguin images get fixed. But switching from X to vt still doesn't
work. It works under 2.6.10-rc2. The new config is based on oldconfig with
almost all new defaults. Nothing fb-related, AFAICT. I'll try to revert
some other files in drivers/video later today, unless someone has a better
idea.

Thanks
Guennadi
---
Guennadi Liakhovetski

2005-03-06 13:31:46

by Guennadi Liakhovetski

[permalink] [raw]
Subject: Re: [2.6.11 Permedia-2 Framebuffer] driver broken (?).

On Sun, 6 Mar 2005, Guennadi Liakhovetski wrote:

> I wasn't quite correct in my report yesterday. Replacing pm2fb.c from
> 2.6.11 with 2.6.10 fixes only one problem - the font becomes white again
> and penguin images get fixed. But switching from X to vt still doesn't
> work. It works under 2.6.10-rc2.

Ok. Reverting also fbcon.[hc] to 2.6.10 fixes the X-switching problem too.

Thanks
Guennadi
---
Guennadi Liakhovetski

2005-03-07 22:55:07

by Jim Hague

[permalink] [raw]
Subject: Re: [2.6.11 Permedia-2 Framebuffer] driver broken (?).

Hi Guennadi,

> Thanks for the patch. Yes, it does fix switching between X and VT.

OK, good.

> As for colours / graphics, disabling CONFIG_FB_PM2_FIFO_DISCONNECT fixes
> that too, but it worked under 2.6.10-rc2 with that option on too. What does
> it do and why I cannot use it under 2.6.11 any more? The help text to this
> option is not very enlightening...

(To be honest, I've never looked closely at this but inherited it from Illo's
2.4 driver. Cue scrabbling around in manuals...)

pm2fb programs the Permedia registers by writing to a FIFO. Normally if you
attempt to write to the FIFO and the FIFO is full, the write is lost. So pm2fb
checks before writing that there is sufficient space in the FIFO to hold the
full command sequence, and if not it loops waiting for the FIFO to empty
sufficiently.

Enabling FIFO_DISCONNECT enables PCI Disconnect. In this mode, if a write to
the FIFO occurs when the FIFO is full, the Permedia chip enables PCI Disconnect
which causes the processor to keep retrying the write cycle until the FIFO
empties and the write succeeds.

On the one hand this allows faster download to the Permedia because you don't
have to check the FIFO space, but at a cost of hogging the PCI bus (and possibly
causing interrupt loss) until the Permedia is ready. The programmers manual
cautions that it should only be used when you know that the Permedia can
consume data faster than the host can generate it and/or where there are no
time-critical periperals on the PCI bus.

All of which sounds to me like enabling PCI Disconnect isn't a great idea and
offers at best infinitesimal speedups. Having said that, the X driver does seem
to turn it on, which probably shows how much I know. As to why it's suddenly
stopped working, I have no idea. I'll try it out and see if I see the same
problems.

--
Jim Hague - [email protected] Never trust a computer you can't lift.

2005-03-08 03:12:48

by Guennadi Liakhovetski

[permalink] [raw]
Subject: Re: [2.6.11 Permedia-2 Framebuffer] driver broken (?).

Hello, Jim

On Mon, 7 Mar 2005, Jim Hague wrote:

> On 05-Mar-2005 Guennadi Liakhovetski wrote:
> > Worked on 2.6.10-rc2. With 2.6.11 during boot upon switching to fb, text
> > becomes orange, penguins look sick (not sharp). X starts and runs normal
> > (doesn't use fb), switching to vt not possible any more. Disabling
> > fb-console in kernel config fixes VTs. Reverting pm2fb.c fixes the
> > problem.
>
> I've just tried a stock 2.6.11 fresh from the tarball, and I see some of what
> you are seeing.
>
> I don't see any problems with text colour or images. Text is white, Tux is 100%
> normal. This on a single processor K6/2-450 with a Creative Graphics Blaster
> Exxtreme, BTW.
>
> However, I do see the problem switching back to a vt from X. In fact it does
> work, except that the video is blanked. This is a bug in pm2fb.c exposed by
> recent changes to fbcon. Please try this fix (works for me) and let me know if
> it restores normal service for you too.

Thanks for the patch. Yes, it does fix switching between X and VT. As for
colours / graphics, disabling CONFIG_FB_PM2_FIFO_DISCONNECT fixes that
too, but it worked under 2.6.10-rc2 with that option on too. What does it
do and why I cannot use it under 2.6.11 any more? The help text to this
option is not very enlightening...

Thanks
Guennadi

>
> --- drivers/video/pm2fb.c.orig 2005-03-07 15:35:28.000000000 +0000
> +++ drivers/video/pm2fb.c 2005-03-07 18:34:13.000000000 +0000
> @@ -747,7 +747,7 @@
> }
> if ((info->var.vmode & FB_VMODE_MASK)==FB_VMODE_DOUBLE)
> video |= PM2F_LINE_DOUBLE;
> - if (info->var.activate==FB_ACTIVATE_NOW)
> + if ((info->var.activate & FB_ACTIVATE_MASK)==FB_ACTIVATE_NOW)
> video |= PM2F_VIDEO_ENABLE;
> par->video = video;
>
> Returning to your problems with text colour and images, can you try
> with CONFIG_FB_PM2_FIFO_DISCONNECT=n and see if that makes a difference.
>
> Thanks.
>
> --
> Jim Hague - [email protected] Never trust a computer you can't lift.
>

---
Guennadi Liakhovetski

2005-03-21 23:06:42

by Andrew Morton

[permalink] [raw]
Subject: Re: [2.6.11 Permedia-2 Framebuffer] driver broken (?).

Guennadi Liakhovetski <[email protected]> wrote:
>
> Hi
>
> Worked on 2.6.10-rc2. With 2.6.11 during boot upon switching to fb, text
> becomes orange, penguins look sick (not sharp). X starts and runs normal
> (doesn't use fb), switching to vt not possible any more. Disabling
> fb-console in kernel config fixes VTs. Reverting pm2fb.c fixes the
> problem.

Guennadi, could you please confirm that

ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.12-rc1/2.6.12-rc1-mm1/broken-out/pm2fb-x-and-vt-switching-crash-fix.patch

fixes this one?

Thanks.

> No unusual output in dmesg.
>
> System: Compaq AP400 with a TI card:
>
> 01:00.0 VGA compatible controller: Texas Instruments TVP4020 [Permedia 2] (rev 11) (prog-if 00 [VGA])
> Subsystem: Elsa AG GLoria Synergy
> Flags: bus master, 66Mhz, medium devsel, latency 66, IRQ 22
> Memory at 51000000 (32-bit, non-prefetchable) [size=128K]
> Memory at 50000000 (32-bit, non-prefetchable) [size=8M]
> Memory at 50800000 (32-bit, non-prefetchable) [size=8M]
> Expansion ROM at <unassigned> [disabled] [size=64K]
> Capabilities: [4c] Power Management version 1
> Capabilities: [40] AGP version 1.0
>
> CPUs: 2 * Pentium II 400MHz full cpuinfo available on request)
>
> .config (fb / video):
>
> CONFIG_FB=y
> CONFIG_FB_MODE_HELPERS=y
> # CONFIG_FB_TILEBLITTING is not set
> # CONFIG_FB_CIRRUS is not set
> CONFIG_FB_PM2=y
> CONFIG_FB_PM2_FIFO_DISCONNECT=y
> # CONFIG_FB_CYBER2000 is not set
> # CONFIG_FB_ASILIANT is not set
> # CONFIG_FB_IMSTT is not set
> # CONFIG_FB_VGA16 is not set
> # CONFIG_FB_VESA is not set
> CONFIG_VIDEO_SELECT=y
> # CONFIG_FB_HGA is not set
> # CONFIG_FB_RIVA is not set
> # CONFIG_FB_I810 is not set
> # CONFIG_FB_INTEL is not set
> # CONFIG_FB_MATROX is not set
> # CONFIG_FB_RADEON_OLD is not set
> # CONFIG_FB_RADEON is not set
> # CONFIG_FB_ATY128 is not set
> # CONFIG_FB_ATY is not set
> # CONFIG_FB_SAVAGE is not set
> # CONFIG_FB_SIS is not set
> # CONFIG_FB_NEOMAGIC is not set
> # CONFIG_FB_KYRO is not set
> # CONFIG_FB_3DFX is not set
> # CONFIG_FB_VOODOO1 is not set
> # CONFIG_FB_TRIDENT is not set
> # CONFIG_FB_VIRTUAL is not set
>
> #
> # Console display driver support
> #
> CONFIG_VGA_CONSOLE=y
> # CONFIG_MDA_CONSOLE is not set
> CONFIG_DUMMY_CONSOLE=y
> CONFIG_FRAMEBUFFER_CONSOLE=y
> # CONFIG_FONTS is not set
> CONFIG_FONT_8x8=y
> CONFIG_FONT_8x16=y
>
> #
> # Logo configuration
> #
> CONFIG_LOGO=y
> # CONFIG_LOGO_LINUX_MONO is not set
> # CONFIG_LOGO_LINUX_VGA16 is not set
> CONFIG_LOGO_LINUX_CLUT224=y
> # CONFIG_BACKLIGHT_LCD_SUPPORT is not set
>
> Thanks
> Guennadi
> ---
> Guennadi Liakhovetski
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/

2005-03-21 23:46:30

by Guennadi Liakhovetski

[permalink] [raw]
Subject: Re: [2.6.11 Permedia-2 Framebuffer] driver broken (?).

On Mon, 21 Mar 2005, Andrew Morton wrote:

> Guennadi Liakhovetski <[email protected]> wrote:
> >
> > Hi
> >
> > Worked on 2.6.10-rc2. With 2.6.11 during boot upon switching to fb, text
> > becomes orange, penguins look sick (not sharp). X starts and runs normal
> > (doesn't use fb), switching to vt not possible any more. Disabling
> > fb-console in kernel config fixes VTs. Reverting pm2fb.c fixes the
> > problem.
>
> Guennadi, could you please confirm that
>
> ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.12-rc1/2.6.12-rc1-mm1/broken-out/pm2fb-x-and-vt-switching-crash-fix.patch
>
> fixes this one?

As discussed with Jim on linux-fbdev-devel this patch fixes the vt / X
switching problem. We still don't know why starting with 2.4.11 I have to
switch CONFIG_FB_PM2_FIFO_DISCONNECT off to restore colours / images. Jim
says it is doubtful that this option brings any optimisations at all,
still, it is a bit worrying, that something that worked with earlier
kernels stopped working now. I traced this breakage down to the patch to
pm2fb.c after 2.6.10-rc2. Jim wanted to try to reproduce this problem with
my fb-geometry / colour settings, but I haven't heard from him since then,
Jim?

Thanks
Guennadi
---
Guennadi Liakhovetski

2005-03-21 23:59:11

by Antonino A. Daplas

[permalink] [raw]
Subject: Re: [Linux-fbdev-devel] Re: [2.6.11 Permedia-2 Framebuffer] driver broken (?).

On Tuesday 22 March 2005 06:59, Andrew Morton wrote:
> Guennadi Liakhovetski <[email protected]> wrote:
> > Hi
> >
> > Worked on 2.6.10-rc2. With 2.6.11 during boot upon switching to fb, text
> > becomes orange, penguins look sick (not sharp). X starts and runs normal
> > (doesn't use fb), switching to vt not possible any more. Disabling
> > fb-console in kernel config fixes VTs. Reverting pm2fb.c fixes the
> > problem.
>
> Guennadi, could you please confirm that
>
> ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.12-rc1/2.
>6.12-rc1-mm1/broken-out/pm2fb-x-and-vt-switching-crash-fix.patch
>
> fixes this one?
>

Actually, he was the one that confirmed that the above patch fixes this
problem.

Tony


2005-03-22 09:41:37

by Jim Hague

[permalink] [raw]
Subject: Re: [2.6.11 Permedia-2 Framebuffer] driver broken (?).

On 21-Mar-2005 Guennadi Liakhovetski wrote:
> On Mon, 21 Mar 2005, Andrew Morton wrote:
>> Guennadi, could you please confirm that
>>
>> ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.12-rc1/2.6.
>> 12-rc1-mm1/broken-out/pm2fb-x-and-vt-switching-crash-fix.patch
>>
>> fixes this one?
>
> As discussed with Jim on linux-fbdev-devel this patch fixes the vt / X
> switching problem. We still don't know why starting with 2.4.11 I have to
> switch CONFIG_FB_PM2_FIFO_DISCONNECT off to restore colours / images.
> [...]
> I traced this breakage down to the patch to
> pm2fb.c after 2.6.10-rc2. Jim wanted to try to reproduce this problem with
> my fb-geometry / colour settings, but I haven't heard from him since then,

FIrst off, so we're all clear, the problem with vt/X switching was definitely a
pm2fb bug exposed by chages in fbcon, and is definitely fixed by the above
patch. Please apply.

As to Guennadi's problem with colours and images, I've been trying to
reproduce locally without success, hence silence. My pm2fb-on-Sparc
correspondent hasn't seen this either, and I've had no other reports.

I have one possible clue, which I'll pursue with Guennadi off-list.

--
Jim Hague - [email protected] Never trust a computer you can't lift.