mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paul Mackerras <paulus@samba.org>
To: James Simmons <jsimmons@infradead.org>
Cc: linux-kernel@vger.kernel.org, linux-fbdev-devel@lists.sourceforge.net
Subject: atyfb in 2.5.51
Date: Wed, 11 Dec 2002 09:31:10 +1100	[thread overview]
Message-ID: <15862.27438.787187.93003@argo.ozlabs.ibm.com> (raw)

I tried 2.5.51 on my G3 powerbook (laptop), which has a Rage LT Pro
video chip (ID 0x4c49 or LI).  With the patch below, atyfb compiles
and seems to mostly work.  However, I didn't see any penguin on boot.
Instead the top inch or so of the screen was just black.

X seems to be running just fine.  I have 'Option "UseFBDev"' in my
/etc/X11/XF86Config-4.  What doesn't work is changing VTs from X to a
text console.  If I press ctrl-alt-F1, for instance, the colormap
changes but I don't see anything get redrawn.  The screen looks just
like what I had in X but with the altered colormap.  If I then press
alt-F7, it switches back to X and X redraws the screen properly and
restores its colormap.

The other worrying thing is that on two occasions now the machine has
oopsed in free_block(), called from reap_timer_fnc(), because it has
dereferenced a bogus pointer value.  When I look at the memory that it
read the pointer from, it looks like a console screen buffer, that is,
the bytes are alternately 0x07 and ascii characters that look like a
login prompt.  This happened when waking the machine up from sleep and
when exiting X.  It sounds to me like you are freeing a console screen
buffer and then continuing to use it.

The patch below also takes out the CONFIG_NVRAM stuff since it doesn't
work and I don't believe anyone has ever used it.

I have also tried aty128fb with some local patches to get it to
compile for my G4 powerbook.  It also doesn't draw the penguin, and it
oopses when X starts, for some reason.

Regards,
Paul.

diff -urN linux-2.5/drivers/video/aty/atyfb_base.c pmac-2.5/drivers/video/aty/atyfb_base.c
--- linux-2.5/drivers/video/aty/atyfb_base.c	2002-12-10 15:29:52.000000000 +1100
+++ pmac-2.5/drivers/video/aty/atyfb_base.c	2002-12-11 09:16:11.000000000 +1100
@@ -70,7 +70,7 @@
 
 #ifdef __powerpc__
 #include <asm/prom.h>
-#include <video/macmodes.h>
+#include "../macmodes.h"	/* XXX relative include, yuck */
 #endif
 #ifdef __sparc__
 #include <asm/pbm.h>
@@ -84,9 +84,6 @@
 #ifdef CONFIG_BOOTX_TEXT
 #include <asm/btext.h>
 #endif
-#ifdef CONFIG_NVRAM
-#include <linux/nvram.h>
-#endif
 #ifdef CONFIG_PMAC_BACKLIGHT
 #include <asm/backlight.h>
 #endif
@@ -226,14 +223,9 @@
 #endif
 
 #ifdef CONFIG_PPC
-#ifdef CONFIG_NVRAM_NOT_DEFINED
-static int default_vmode __initdata = VMODE_NVRAM;
-static int default_cmode __initdata = CMODE_NVRAM;
-#else
 static int default_vmode __initdata = VMODE_CHOOSE;
 static int default_cmode __initdata = CMODE_CHOOSE;
 #endif
-#endif
 
 #ifdef CONFIG_ATARI
 static unsigned int mach64_count __initdata = 0;
@@ -1412,16 +1404,16 @@
 static int aty_sleep_notify(struct pmu_sleep_notifier *self, int when)
 {
 	struct fb_info *info;
-	struct atyfb_par *par = (struct atyfb_par *) info->fb.par;
+	struct atyfb_par *par;
 	int result;
 
 	result = PBOOK_SLEEP_OK;
 
 	for (info = first_display; info != NULL; info = par->next) {
-		struct fb_fix_screeninfo fix;
 		int nb;
 
-		nb = fb_display[fg_console].var.yres * info->fix.line_length;
+		par = (struct atyfb_par *) info->par;
+		nb = info->var.yres * info->fix.line_length;
 
 		switch (when) {
 		case PBOOK_SLEEP_REQUEST:
@@ -1439,7 +1431,7 @@
 			if (par->blitter_may_be_busy)
 				wait_for_idle(par);
 			/* Stop accel engine (stop bus mastering) */
-			if (par->accel_flags & FB_ACCELF_TEXT)
+			if (info->var.accel_flags & FB_ACCELF_TEXT)
 				aty_reset_engine(par);
 
 			/* Backup fb content */
@@ -1844,14 +1836,6 @@
 			    (&var, info, mode_option, 8))
 				var = default_var;
 		} else {
-#ifdef CONFIG_NVRAM
-			if (default_vmode == VMODE_NVRAM) {
-				default_vmode = nvram_read_byte(NV_VMODE);
-				if (default_vmode <= 0
-				    || default_vmode > VMODE_MAX)
-					default_vmode = VMODE_CHOOSE;
-			}
-#endif
 			if (default_vmode == VMODE_CHOOSE) {
 				if (M64_HAS(G3_PB_1024x768))
 					/* G3 PowerBook with 1024x768 LCD */
@@ -1873,10 +1857,6 @@
 			if (default_vmode <= 0
 			    || default_vmode > VMODE_MAX)
 				default_vmode = VMODE_640_480_60;
-#ifdef CONFIG_NVRAM
-			if (default_cmode == CMODE_NVRAM)
-				default_cmode = nvram_read_byte(NV_CMODE);
-#endif
 			if (default_cmode < CMODE_8
 			    || default_cmode > CMODE_32)
 				default_cmode = CMODE_8;

             reply	other threads:[~2002-12-10 22:23 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-10 22:31 Paul Mackerras [this message]
2002-12-10 23:11 ` Benjamin Herrenschmidt
2002-12-11  6:18   ` James Simmons
2002-12-11  8:42     ` David S. Miller
2002-12-11 15:16       ` James Simmons
2002-12-11 20:43         ` David S. Miller
2002-12-11 21:35           ` Alan Cox
2002-12-12 20:23             ` Pavel Machek
2002-12-13  8:53             ` Geert Uytterhoeven
2002-12-13 10:26               ` Alan Cox
2002-12-22 13:40                 ` Geert Uytterhoeven
2002-12-11 21:06         ` Paul Mackerras
2002-12-13  8:49       ` Geert Uytterhoeven
2002-12-11 12:49   ` [Linux-fbdev-devel] " Antonino Daplas
2002-12-11 15:46     ` 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=15862.27438.787187.93003@argo.ozlabs.ibm.com \
    --to=paulus@samba.org \
    --cc=jsimmons@infradead.org \
    --cc=linux-fbdev-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®