* [PATCH] Remove debug cruft from via-pmu.c driver
@ 2004-02-15 6:16 Benjamin Herrenschmidt
2004-02-15 18:02 ` 2.6.3-rc3 radeonfb: Problems with new (and old) driver Mike Houston
0 siblings, 1 reply; 3+ messages in thread
From: Benjamin Herrenschmidt @ 2004-02-15 6:16 UTC (permalink / raw)
To: Andrew Morton; +Cc: Linus Torvalds, Linux Kernel list
===== drivers/macintosh/via-pmu.c 1.29 vs edited =====
--- 1.29/drivers/macintosh/via-pmu.c Sun Feb 15 04:11:03 2004
+++ edited/drivers/macintosh/via-pmu.c Sun Feb 15 17:14:06 2004
@@ -72,13 +72,6 @@
/* How many iterations between battery polls */
#define BATTERY_POLLING_COUNT 2
-/* Some debugging tools */
-#ifdef CONFIG_XMON
-//#define LIVE_DEBUG(req) ((req) && (req)->data[0] == 0x7d)
-#define LIVE_DEBUG(req) (0)
-static int whacky_debug;
-#endif /* CONFIG_XMON */
-
static volatile unsigned char *via;
/* VIA registers - spaced 0x200 bytes apart */
@@ -1218,12 +1211,6 @@
wait_for_ack();
/* set the shift register to shift out and send a byte */
send_byte(req->data[0]);
-#ifdef CONFIG_XMON
- if (LIVE_DEBUG(req))
- xmon_printf("R");
- else
- whacky_debug = 0;
-#endif /* CONFIG_XMON */
}
void __openfirmware
@@ -1476,29 +1463,17 @@
case sending:
req = current_req;
if (data_len < 0) {
-#ifdef CONFIG_XMON
- if (LIVE_DEBUG(req))
- xmon_printf("s");
-#endif /* CONFIG_XMON */
data_len = req->nbytes - 1;
send_byte(data_len);
break;
}
if (data_index <= data_len) {
-#ifdef CONFIG_XMON
- if (LIVE_DEBUG(req))
- xmon_printf("S");
-#endif /* CONFIG_XMON */
send_byte(req->data[data_index++]);
break;
}
req->sent = 1;
data_len = pmu_data_len[req->data[0]][1];
if (data_len == 0) {
-#ifdef CONFIG_XMON
- if (LIVE_DEBUG(req))
- xmon_printf("D");
-#endif /* CONFIG_XMON */
pmu_state = idle;
current_req = req->next;
if (req->reply_expected)
@@ -1506,10 +1481,6 @@
else
return req;
} else {
-#ifdef CONFIG_XMON
- if (LIVE_DEBUG(req))
- xmon_printf("-");
-#endif /* CONFIG_XMON */
pmu_state = reading;
data_index = 0;
reply_ptr = req->reply + req->reply_len;
@@ -1532,18 +1503,10 @@
case reading:
case reading_intr:
if (data_len == -1) {
-#ifdef CONFIG_XMON
- if (LIVE_DEBUG(current_req))
- xmon_printf("r");
-#endif /* CONFIG_XMON */
data_len = bite;
if (bite > 32)
printk(KERN_ERR "PMU: bad reply len %d\n", bite);
} else if (data_index < 32) {
-#ifdef CONFIG_XMON
- if (LIVE_DEBUG(current_req))
- xmon_printf("R");
-#endif /* CONFIG_XMON */
reply_ptr[data_index++] = bite;
}
if (data_index < data_len) {
@@ -1551,12 +1514,6 @@
break;
}
-#ifdef CONFIG_XMON
- if (LIVE_DEBUG(current_req)) {
- whacky_debug = 1;
- xmon_printf("D");
- }
-#endif /* CONFIG_XMON */
if (pmu_state == reading_intr) {
pmu_state = idle;
int_data_state[int_data_last] = int_data_ready;
@@ -1603,10 +1560,6 @@
intr = in_8(&via[IFR]) & (SR_INT | CB1_INT);
if (intr == 0)
break;
-#ifdef CONFIG_XMON
- if (whacky_debug)
- xmon_printf("|%02x|", intr);
-#endif /* CONFIG_XMON */
handled = 1;
if (++nloop > 1000) {
printk(KERN_DEBUG "PMU: stuck in intr loop, "
@@ -1629,10 +1582,6 @@
recheck:
if (pmu_state == idle) {
if (adb_int_pending) {
-#ifdef CONFIG_XMON
- if (whacky_debug)
- xmon_printf("!A!");
-#endif /* CONFIG_XMON */
if (int_data_state[0] == int_data_empty)
int_data_last = 0;
else if (int_data_state[1] == int_data_empty)
^ permalink raw reply [flat|nested] 3+ messages in thread
* 2.6.3-rc3 radeonfb: Problems with new (and old) driver
2004-02-15 6:16 [PATCH] Remove debug cruft from via-pmu.c driver Benjamin Herrenschmidt
@ 2004-02-15 18:02 ` Mike Houston
2004-02-15 21:01 ` Petr Vandrovec
0 siblings, 1 reply; 3+ messages in thread
From: Mike Houston @ 2004-02-15 18:02 UTC (permalink / raw)
To: linux-kernel; +Cc: benh
Hello
The new radeonfb driver appears to work nicely (except a bit of corruption when it first switches, but it's always done that for me in 2.6), until I start and exit XFree86. I then have display corruption. Text is scrambled and appearing where it's not supposed to be. If I type clear, the display becomes unusable. The text appears with lines through it, and I'm then typing blindly. I can still type commands though.
I then recompiled my kernel to use the old radeonfb driver, but it doesn't seem to work at all. The system won't switch to framebuffer mode during boot, with append = "video=radeonfb:1024x768-8@76".
So I recompiled again with the new driver, as I must have a framebuffer console.
This is a pentium4 system, on an i845 chipset with an ATI Radeon 7500 AGP card. I'm not sure if these are needed, so I've put my config and dmesg output up on my personal web space instead of pasting in this email.
http://www.bitbenderforums.com/~grogan/files/config-2.6.3-rc3.txt
http://www.bitbenderforums.com/~grogan/files/dmesg-2.6.3-rc3.txt
Thanks,
Mike Houston (a.k.a. Grogan)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: 2.6.3-rc3 radeonfb: Problems with new (and old) driver
2004-02-15 18:02 ` 2.6.3-rc3 radeonfb: Problems with new (and old) driver Mike Houston
@ 2004-02-15 21:01 ` Petr Vandrovec
0 siblings, 0 replies; 3+ messages in thread
From: Petr Vandrovec @ 2004-02-15 21:01 UTC (permalink / raw)
To: Mike Houston; +Cc: linux-kernel, benh
On Sun, Feb 15, 2004 at 01:02:14PM -0500, Mike Houston wrote:
> Hello
>
> The new radeonfb driver appears to work nicely (except a bit of corruption when it first switches, but it's always done that for me in 2.6), until I start and exit XFree86. I then have display corruption. Text is scrambled and appearing where it's not supposed to be. If I type clear, the display becomes unusable. The text appears with lines through it, and I'm then typing blindly. I can still type commands though.
I'm not sure whether it is radeonfb or XFree driver bug. On my system after
I switch from X to console, all "clear rectangle" requests are wrong, like if
line length in hardware was stil 1664*4 (what X do) instead of 1600*1 (what
console wants).
Second problem is that XFree driver (from 4.2.1.1 in Debian unstable) does not
like usefbdev on. It uses fbdev, but somehow it thinks that line length is 1664*4
although fbdev reports that it set 1600*4, and display also looks like that 1600 was
programmed into hardware.
And when console uses 16bpp, after switching from X picture is zoomed by 200%
(giving 800x600). When console uses 32bpp, it is zoomed by 400% after
switch from X to console. In both cases rerunning fbset fixes problem.
I'm using Compaq Evo 800N, with 1600x1200 DFP.
evon:~# fbset -i
mode "1600x1200-60"
# D: 162.022 MHz, H: 75.010 kHz, V: 60.008 Hz
geometry 1600 1200 1600 1200 8
timings 6172 304 64 46 1 192 3
rgba 8/0,8/0,8/0,0/0
endmode
Frame buffer device information:
Name : ATI Radeon LW
Address : 0x48000000
Size : 67108864
Type : PACKED PIXELS
Visual : PSEUDOCOLOR
XPanStep : 8
YPanStep : 1
YWrapStep : 0
LineLength : 1600
MMIO Address: 0x40300000
MMIO Size : 16384
Accelerator : ATI Radeon family
evon:~#
Petr Vandrovec
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-02-15 21:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-15 6:16 [PATCH] Remove debug cruft from via-pmu.c driver Benjamin Herrenschmidt
2004-02-15 18:02 ` 2.6.3-rc3 radeonfb: Problems with new (and old) driver Mike Houston
2004-02-15 21:01 ` Petr Vandrovec
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox