linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: James Simmons <jsimmons@suse.com>
Cc: Samuel Rydh <samuel@ibrium.se>,
	Linux Frame Buffer Device Development
	<linux-fbdev@vuser.vu.union.edu>,
	Linux/PPC Development <linuxppc-dev@lists.linuxppc.org>,
	olh@suse.de
Subject: Re: [linux-fbdev] Re: Video driver bug
Date: Tue, 10 Oct 2000 15:45:28 +0200 (CEST)	[thread overview]
Message-ID: <Pine.LNX.4.10.10010101541220.375-100000@cassiopeia.home> (raw)
In-Reply-To: <Pine.LNX.4.05.10010101003550.32152-100000@callisto.of.borg>


On Tue, 10 Oct 2000, Geert Uytterhoeven wrote:
> On Mon, 9 Oct 2000, James Simmons wrote:
> > > 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 :-(
> >
> > I have some ideas but it would requires some changes to the fbcon layer.
> > Also it would move palette handling from fbdev to the console layer.

That's for 2.5.0. I think the first thing we need to do in 2.5.0 is to remove
all `mess with non-visible VCs' support, so /dev/fb* works on the _current_
video mode.

> > Would these changes be included with the 2.4.0-testX kernels?
>
> I think we must do something in 2.4.0-testX, since you can abuse the bug to
> panic the box.

Does this fix the problem on atyfb? I'm not able to test it myself.

I renamed atyfb_set_disp() to atyfb_set_dispsw() as well, since it no longer
sets up the whole display struct, but only the dispsw part.

--- linux-2.4.0-test10-pre1/drivers/video/atyfb.c.orig	Sun Sep 17 20:04:17 2000
+++ linux-2.4.0-test10-pre1/drivers/video/atyfb.c	Tue Oct 10 15:40:45 2000
@@ -466,8 +466,8 @@
 static int encode_fix(struct fb_fix_screeninfo *fix,
 		      const struct atyfb_par *par,
 		      const struct fb_info_aty *info);
-static void atyfb_set_disp(struct display *disp, struct fb_info_aty *info,
-			   int bpp, int accel);
+static void atyfb_set_dispsw(struct display *disp, struct fb_info_aty *info,
+			     int bpp, int accel);
 static int atyfb_getcolreg(u_int regno, u_int *red, u_int *green, u_int *blue,
 			 u_int *transp, struct fb_info *fb);
 static int atyfb_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
@@ -2826,8 +2826,8 @@
 }


-static void atyfb_set_disp(struct display *disp, struct fb_info_aty *info,
-			   int bpp, int accel)
+static void atyfb_set_dispsw(struct display *disp, struct fb_info_aty *info,
+			     int bpp, int accel)
 {
 	    switch (bpp) {
 #ifdef FBCON_HAS_CFB8
@@ -2914,7 +2914,6 @@
 	    display->can_soft_blank = 1;
 	    display->inverse = 0;
 	    accel = var->accel_flags & FB_ACCELF_TEXT;
-	    atyfb_set_disp(display, info, par.crtc.bpp, accel);
 	    if (accel)
 	    	display->scrollmode = (info->bus_type == PCI) ? SCROLL_YNOMOVE : 0;
 	    else
@@ -2923,8 +2922,10 @@
 		(*info->fb_info.changevar)(con);
 	}
 	if (!info->fb_info.display_fg ||
-	    info->fb_info.display_fg->vc_num == con)
+	    info->fb_info.display_fg->vc_num == con) {
 	    atyfb_set_par(&par, info);
+	    atyfb_set_dispsw(display, info, par.crtc.bpp, accel);
+	}
 	if (oldbpp != var->bits_per_pixel) {
 	    if ((err = fb_alloc_cmap(&display->cmap, 0, 0)))
 		return err;
@@ -4241,8 +4242,8 @@

     atyfb_decode_var(&fb_display[con].var, &par, info);
     atyfb_set_par(&par, info);
-    atyfb_set_disp(&fb_display[con], info, par.crtc.bpp,
-		   par.accel_flags & FB_ACCELF_TEXT);
+    atyfb_set_dispsw(&fb_display[con], info, par.crtc.bpp,
+		     par.accel_flags & FB_ACCELF_TEXT);

     /* Install new colormap */
     do_install_cmap(con, fb);

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/

  reply	other threads:[~2000-10-10 13:45 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-10-07 11:38 Video driver bug Samuel Rydh
2000-10-07 17:56 ` Geert Uytterhoeven
2000-10-07 18:50   ` Takashi Oe
2000-10-07 23:34     ` Samuel Rydh
2000-10-10  1:43   ` [linux-fbdev] " James Simmons
2000-10-10  8:04     ` Geert Uytterhoeven
2000-10-10 13:45       ` Geert Uytterhoeven [this message]
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
  -- strict thread matches above, loose matches on Subject: below --
2000-10-16 18:21 Brad Douglas
2000-10-17  1:31 ` James Simmons

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.10.10010101541220.375-100000@cassiopeia.home \
    --to=geert@linux-m68k.org \
    --cc=jsimmons@suse.com \
    --cc=linux-fbdev@vuser.vu.union.edu \
    --cc=linuxppc-dev@lists.linuxppc.org \
    --cc=olh@suse.de \
    --cc=samuel@ibrium.se \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).