linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* RE: [linux-fbdev] Re: Video driver bug
@ 2000-10-16 18:21 Brad Douglas
  2000-10-17  1:31 ` James Simmons
  0 siblings, 1 reply; 24+ messages in thread
From: Brad Douglas @ 2000-10-16 18:21 UTC (permalink / raw)
  To: 'James Simmons ', 'Benjamin Herrenschmidt '
  Cc: 'Geert Uytterhoeven ',
	'Linux Frame Buffer Device Development ',
	'Linux/PPC Development '


Most of us still have a need to know the last (previous) active console.
Maybe change info->currcon to info->lastcon?  Or does the API already give
us the info we need?

I apologize in advance for not looking into this myself.

Brad Douglas
brad@neruo.com
http://www.linux-fbdev.org

-----Original Message-----
From: James Simmons

> While we are at it, I beleive we should also change atyfb.c so that
> currcon is no longer a global. My understanding is that can break
multihead.

That is not the only thing broken for multihead support. The softback code
is severly broken. Also why don't we use the display_fg field in fb_info
instead. display_fg->vc_num is already their is it's more multihead
friendly. IMO real multihead support shoudl wait until 2.5.X since it
needs a pretty big cleanup.

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 24+ messages in thread
* Re: Video driver bug
@ 2000-10-07 17:56 Geert Uytterhoeven
  2000-10-10  1:43 ` [linux-fbdev] " James Simmons
  2000-10-14 16:21 ` Geert Uytterhoeven
  0 siblings, 2 replies; 24+ messages in thread
From: Geert Uytterhoeven @ 2000-10-07 17:56 UTC (permalink / raw)
  To: Samuel Rydh
  Cc: Linux Frame Buffer Device Development, Linux/PPC Development, olh


On Sat, 7 Oct 2000, Samuel Rydh wrote:
> Certain 2.4 video drivers (aty128, aty, platinum, tdfx, iga)
> appear to be buggy. More specifically, the problem is the
> following:
>
> In the set_disp function, info->dispsw is initialized and disp->dispsw
> is given the address of info->dispsw:
>
> 	static void aty128_set_disp(..)
> 	{
> 	  switch(bpp) {
> 	    case 8:
> 	        info->dispsw = accel ? fbcon_aty128_8 : fbcon_cfb8;
> 	        disp->dispsw = &info->dispsw;
> 	        break;
> 	   ...
> 	}
>
> The problem is that the info struct is shared by all virtual consoles.
> Thus if the video mode is set on a console which is not active, the
> active console will be affected too. This typically results in a kernel
> panic (the wrong set of console output functions is used).

You're right. *_set_disp() may be called for non-active VTs, changing
info->dispsw for the active VT.

> This problem is observable if one starts MOL from the console. MOL
> changes the video mode on an inactive console in order to extract
> certain video mode parameters (like rowbytes).
>
> One way to fix the bug is changing set_disp to the following:
>
> 	static void aty128_set_disp(..)
> 	{
> 	  switch(bpp) {
> 	    case 8:
> 	        disp->dispsw = accel ? &fbcon_aty128_8 : &fbcon_cfb8;
> 	        break;
> 	   ...
> 	}
>
> This is how the code used to look like (before 2.3.43-pre5).
> Does anyone know why this was changed?

The 2.3.44 patch shows that this line was added to struct fb_info_aty128:

+    struct display_switch dispsw;       /* for cursor and font */

While that comment isn't applicable to aty128fb, it is to atyfb (where it is
no longer present, probably it was removed in 2.1.x). When using a hardware
cursor, display_switch.{cursor,set_font} needs to be overridden, cfr.

            if (info->cursor) {
                info->dispsw.cursor = atyfb_cursor;
                info->dispsw.set_font = atyfb_set_font;
            }

in atyfb_set_disp().

I remember the original version changed the cursor and set_font fields of
disp->dispsw directly. Since this affected multiple ATI cards in your machine
(fbcon_aty* is shared), or even other video cards (disp->dispsw == fbcon_cfb*
if acceleration is disabled), I added the per-card copy of struct
display_switch to struct fb_info_aty.

Well, for aty128fb (which doesn't support a hardware cursor yet), the fix is
what you propose. However, for atyfb I see no simple solution, apart from
disabling the hardware cursor :-(

Any other takers?

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2000-10-21 13:22 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-10-16 18:21 [linux-fbdev] Re: Video driver bug Brad Douglas
2000-10-17  1:31 ` James Simmons
  -- strict thread matches above, loose matches on Subject: below --
2000-10-07 17:56 Geert Uytterhoeven
2000-10-10  1:43 ` [linux-fbdev] " James Simmons
2000-10-10  8:04   ` Geert Uytterhoeven
2000-10-10 13:45     ` Geert Uytterhoeven
2000-10-11  3:18       ` James Simmons
2000-10-13 20:43       ` Benjamin Herrenschmidt
2000-10-13 22:42         ` Takashi Oe
2000-10-14 16:41           ` Geert Uytterhoeven
2000-10-17  0:22             ` James Simmons
2000-10-16 22:20               ` Samuel Rydh
2000-10-17 11:37                 ` Geert Uytterhoeven
2000-10-18  4:09                   ` James Simmons
2000-10-21 13:22                   ` Samuel Rydh
2000-10-14  6:36         ` James Simmons
2000-10-14 10:09         ` Geert Uytterhoeven
2000-10-14 12:24           ` Samuel Rydh
2000-10-11  0:05     ` James Simmons
2000-10-10 19:53       ` Geert Uytterhoeven
2000-10-11  5:23         ` James Simmons
2000-10-14 16:21 ` Geert Uytterhoeven
2000-10-14 17:18   ` Benjamin Herrenschmidt
2000-10-15 11:38     ` Geert Uytterhoeven
2000-10-17  0:03     ` James Simmons

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).