* Re: PB G3 Video (for the developers)
@ 1999-03-24 1:06 Dean Takemori
1999-03-24 6:43 ` Brian Downing
0 siblings, 1 reply; 5+ messages in thread
From: Dean Takemori @ 1999-03-24 1:06 UTC (permalink / raw)
To: linuxppc-dev
On 16 Mar 1999, abew wrote:
>OK, sorry... I haven't dealt much with diffs. Here is a
>'diff -u ORIG NEW' from the top of the linux source tree:
>
>Oh, and I totally understand that time is short for many of us right now;
>obviously this isn't too urgent. It really would be nice if eventually
>all PB G3 users could take advantage of their video hardware in Linux,
>though. Anyways, here ya go:
[snip]
The rest of the post can be found at:
http://lists.linuxppc.org/listarcs/linuxppc-dev/199903/msg00209.html
For what it's worth, I hand patched a 2.2.4 kernel with the
included patch, and got atyfb to work on my PB G3 series.
Finally. I can actually scroll in nedit in real time now.
[[ This message was sent via the linuxppc-dev mailing list. Replies are ]]
[[ not forced back to the list, so be sure to Cc linuxppc-dev if your ]]
[[ reply is of general interest. Please check http://lists.linuxppc.org/ ]]
[[ and http://www.linuxppc.org/ for useful information before posting. ]]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: PB G3 Video (for the developers)
1999-03-24 1:06 PB G3 Video (for the developers) Dean Takemori
@ 1999-03-24 6:43 ` Brian Downing
0 siblings, 0 replies; 5+ messages in thread
From: Brian Downing @ 1999-03-24 6:43 UTC (permalink / raw)
To: linuxppc-dev
On Tue, 23 Mar 1999 15:06:11 -1000 (HST), Dean Takemori writes:
> [snip]
>
> The rest of the post can be found at:
> http://lists.linuxppc.org/listarcs/linuxppc-dev/199903/msg00209.html
>
> For what it's worth, I hand patched a 2.2.4 kernel with the
> included patch, and got atyfb to work on my PB G3 series.
> Finally. I can actually scroll in nedit in real time now.
Same here. X is fast now!
Interestingly enough, my video card (which reports the same version
as the post mentioned above) takes a 40 MHz mclk, not a 100 MHz one.
I also had to turn off backing-store in X - otherwise I got strange
graphical glitches (like the twm menu coming up blank until the options
were highlighted with the mouse).
-bcd
--
** Brian Downing
** UNIX Systems Administrator
** bdowning@wolfram.com
[[ This message was sent via the linuxppc-dev mailing list. Replies are ]]
[[ not forced back to the list, so be sure to Cc linuxppc-dev if your ]]
[[ reply is of general interest. Please check http://lists.linuxppc.org/ ]]
[[ and http://www.linuxppc.org/ for useful information before posting. ]]
^ permalink raw reply [flat|nested] 5+ messages in thread
* PB G3 Video (for the developers)
@ 1999-03-15 23:12 abew
1999-03-16 8:51 ` Geert Uytterhoeven
0 siblings, 1 reply; 5+ messages in thread
From: abew @ 1999-03-15 23:12 UTC (permalink / raw)
To: linuxppc-dev, linuxppc-user
I have a G3 powerbook 266, 14.1", 96 RAM. For the past many months, I've
been using a custom kernel 2.1.130 in which I hacked atyfb.c (using the
code that Rick Oikawa used to use in his powerbook 2.1.2? kernel) so that
I could boot using 'video=atyfb', etc rather than use the oh-so-slow 'no
video driver' option. Last night, I did a complete re-install (I wanted
to wait for R5, but who knows when that will be out), and I upgraded
immediately to the 2.2.3 kernel from samba, hoping that by passing in an
'mclk' argument at boot to the kernel as has been discussed on this list
recently, I could use the atyfb accel with the standard kernel and not get
the scary (but colorful) death screen that used to plague me when I tried
to boot a standard kernel without 'no video driver' checked.
Well, I tried all sorts of different mclk values
('video=atyfb:vmode:14,cmode:32,mclk:X') but I got the crazy-colored death
screen no matter what. Finally, I merged the hacks to atyfb.c that I had
made before into the atyfb.c of the 2.2.3 kernel and tried that... and it
worked great. I currently am using Geert's XF68 with accel and can do fun
things like window sliding in Enlightenment with no problems -- it's
extrememly fast (faster than Xpmac_mga, I think, but not by much).
So, I'm attaching the diff of my hacked atyfb.c and the standard one in
the hopes that maybe one of the developers who actually knows what they're
doing can possibly figure out a way to modify atyfb.c to get powerbooks
like mine to work with the atyfb in the standard kernel ??? (because I
certainly have NO idea what I'm doing... again, I just used Oikawa's code
and merged it in). First, here is the appropriate section of 'dmesg':
MacOS display is /pci/ATY,RageLTPro
atyfb: 3D RAGE LT PRO [0x4c50 rev 0xdc] 4M SGRAM, 135 MHz PLL, 100 Mhz
MCLK
Console: switching to colour frame buffer device 128x48
fb0: ATY Mach64 frame buffer device on /pci/ATY,RageLTPro
Now here's the diff on atyfb.c:
329,330c329
< #if 1
< /*#if defined(__sparc__) || defined(DEBUG) */
---
> #if defined(__sparc__) || defined(DEBUG)
694,695c693
< #if 1
< /*#if defined(__sparc__) || defined(DEBUG) */
---
> #if defined(__sparc__) || defined(DEBUG)
1478,1480d1475
<
< return;
<
1622c1617
< (Gx == VU_CHIP_ID) || (Gx == LP_CHIP_ID)) && (info->ram_type >=
SDRAM))
---
> (Gx == VU_CHIP_ID)) && (info->ram_type >= SDRAM))
2364c2359
< Gx == GP_CHIP_ID || Gx == GQ_CHIP_ID || Gx ==
LP_CHIP_ID)
---
> Gx == GP_CHIP_ID || Gx == GQ_CHIP_ID)
2511c2506
< Gx == LI_CHIP_ID) {
---
> Gx == LI_CHIP_ID || Gx == LP_CHIP_ID) {
2515,2517d2509
< } else if (Gx == LP_CHIP_ID) {
< mclk = 100;
< pll = 135;
2652,2658c2644,2646
< if (Gx == LP_CHIP_ID) {
< default_vmode = VMODE_1024_768_60;
< } else {
< default_vmode = nvram_read_byte(NV_VMODE);
< if (default_vmode <= 0 || default_vmode > VMODE_MAX)
< default_vmode = VMODE_CHOOSE;
< }
---
> default_vmode = nvram_read_byte(NV_VMODE);
> if (default_vmode <= 0 || default_vmode > VMODE_MAX)
> default_vmode = VMODE_CHOOSE;
2661c2649
< if (Gx == LG_CHIP_ID || Gx == LP_CHIP_ID) {
---
> if (Gx == LG_CHIP_ID)
2664c2652
< } else {
---
> else {
3387c3375
< Gx == GP_CHIP_ID || Gx == GQ_CHIP_ID || Gx == LP_CHIP_ID)
---
> Gx == GP_CHIP_ID || Gx == GQ_CHIP_ID)
Please let me know if there is anything else I can do...
Thanks.
--Abe White
[[ This message was sent via the linuxppc-dev mailing list. Replies are ]]
[[ not forced back to the list, so be sure to Cc linuxppc-dev if your ]]
[[ reply is of general interest. Please check http://lists.linuxppc.org/ ]]
[[ and http://www.linuxppc.org/ for useful information before posting. ]]
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: PB G3 Video (for the developers)
1999-03-15 23:12 abew
@ 1999-03-16 8:51 ` Geert Uytterhoeven
1999-03-16 18:00 ` abew
0 siblings, 1 reply; 5+ messages in thread
From: Geert Uytterhoeven @ 1999-03-16 8:51 UTC (permalink / raw)
To: abew; +Cc: linuxppc-dev, linuxppc-user
On Mon, 15 Mar 1999, abew wrote:
> Well, I tried all sorts of different mclk values
> ('video=atyfb:vmode:14,cmode:32,mclk:X') but I got the crazy-colored death
> screen no matter what. Finally, I merged the hacks to atyfb.c that I had
> made before into the atyfb.c of the 2.2.3 kernel and tried that... and it
> worked great. I currently am using Geert's XF68 with accel and can do fun
> things like window sliding in Enlightenment with no problems -- it's
> extrememly fast (faster than Xpmac_mga, I think, but not by much).
Interesting to know...
> So, I'm attaching the diff of my hacked atyfb.c and the standard one in
> the hopes that maybe one of the developers who actually knows what they're
> doing can possibly figure out a way to modify atyfb.c to get powerbooks
> like mine to work with the atyfb in the standard kernel ??? (because I
> certainly have NO idea what I'm doing... again, I just used Oikawa's code
> and merged it in). First, here is the appropriate section of 'dmesg':
>
> MacOS display is /pci/ATY,RageLTPro
> atyfb: 3D RAGE LT PRO [0x4c50 rev 0xdc] 4M SGRAM, 135 MHz PLL, 100 Mhz
^^^^^^
I.e. LP_CHIP_ID
> MCLK
> Console: switching to colour frame buffer device 128x48
> fb0: ATY Mach64 frame buffer device on /pci/ATY,RageLTPro
>
> Now here's the diff on atyfb.c:
Please use the `-u' option of diff next time so we can see contexts. And in
which order have you diffed the files?
> 1622c1617
> < (Gx == VU_CHIP_ID) || (Gx == LP_CHIP_ID)) && (info->ram_type >=
> SDRAM))
> ---
> > (Gx == VU_CHIP_ID)) && (info->ram_type >= SDRAM))
> 2364c2359
> < Gx == GP_CHIP_ID || Gx == GQ_CHIP_ID || Gx ==
> LP_CHIP_ID)
> ---
> > Gx == GP_CHIP_ID || Gx == GQ_CHIP_ID)
> 2511c2506
> < Gx == LI_CHIP_ID) {
> ---
> > Gx == LI_CHIP_ID || Gx == LP_CHIP_ID) {
> 2515,2517d2509
> < } else if (Gx == LP_CHIP_ID) {
> < mclk = 100;
> < pll = 135;
> 2652,2658c2644,2646
> < if (Gx == LP_CHIP_ID) {
> < default_vmode = VMODE_1024_768_60;
> < } else {
> < default_vmode = nvram_read_byte(NV_VMODE);
> < if (default_vmode <= 0 || default_vmode > VMODE_MAX)
> < default_vmode = VMODE_CHOOSE;
> < }
> ---
> > default_vmode = nvram_read_byte(NV_VMODE);
> > if (default_vmode <= 0 || default_vmode > VMODE_MAX)
> > default_vmode = VMODE_CHOOSE;
> 2661c2649
> < if (Gx == LG_CHIP_ID || Gx == LP_CHIP_ID) {
> ---
> > if (Gx == LG_CHIP_ID)
> 2664c2652
> < } else {
> ---
> > else {
> 3387c3375
> < Gx == GP_CHIP_ID || Gx == GQ_CHIP_ID || Gx == LP_CHIP_ID)
> ---
> > Gx == GP_CHIP_ID || Gx == GQ_CHIP_ID)
I guess it's one (or more) of these tests for LP_CHIP_ID. If I could see the
contexts, I could comment more on that (sorry, very limited time).
Greetings,
Geert
--
Geert Uytterhoeven Geert.Uytterhoeven@cs.kuleuven.ac.be
Wavelets, Linux/{m68k~Amiga,PPC~CHRP} http://www.cs.kuleuven.ac.be/~geert/
Department of Computer Science -- Katholieke Universiteit Leuven -- Belgium
[[ This message was sent via the linuxppc-dev mailing list. Replies are ]]
[[ not forced back to the list, so be sure to Cc linuxppc-dev if your ]]
[[ reply is of general interest. Please check http://lists.linuxppc.org/ ]]
[[ and http://www.linuxppc.org/ for useful information before posting. ]]
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: PB G3 Video (for the developers)
1999-03-16 8:51 ` Geert Uytterhoeven
@ 1999-03-16 18:00 ` abew
0 siblings, 0 replies; 5+ messages in thread
From: abew @ 1999-03-16 18:00 UTC (permalink / raw)
To: Geert Uytterhoeven; +Cc: linuxppc-dev, linuxppc-user
> > MacOS display is /pci/ATY,RageLTPro
> > atyfb: 3D RAGE LT PRO [0x4c50 rev 0xdc] 4M SGRAM, 135 MHz PLL, 100 Mhz
> ^^^^^^
> I.e. LP_CHIP_ID
Yup. Figured that much out.
>
> Please use the `-u' option of diff next time so we can see contexts. And in
> which order have you diffed the files?
OK, sorry... I haven't dealt much with diffs. Here is a
'diff -u ORIG NEW' from the top of the linux source tree:
Oh, and I totally understand that time is short for many of us right now;
obviously this isn't too urgent. It really would be nice if eventually
all PB G3 users could take advantage of their video hardware in Linux,
though. Anyways, here ya go:
--- drivers/video/atyfb.c.orig Tue Mar 16 12:54:10 1999
+++ drivers/video/atyfb.c Tue Mar 16 12:55:02 1999
@@ -326,7 +326,8 @@
static void init_engine(const struct atyfb_par *par, struct fb_info_aty
*info);
static void aty_st_514(int offset, u8 val, const struct fb_info_aty
*info);
static void aty_st_pll(int offset, u8 val, const struct fb_info_aty
*info);
-#if defined(__sparc__) || defined(DEBUG)
+#if 1
+/*#if defined(__sparc__) || defined(DEBUG) */
static u8 aty_ld_pll(int offset, const struct fb_info_aty *info);
#endif
static void aty_set_crtc(const struct fb_info_aty *info,
@@ -690,7 +691,8 @@
aty_st_8(CLOCK_CNTL + 1, (offset << 2) & ~PLL_WR_EN, info);
}
-#if defined(__sparc__) || defined(DEBUG)
+#if 1
+/*#if defined(__sparc__) || defined(DEBUG) */
static u8 aty_ld_pll(int offset, const struct fb_info_aty *info)
{
u8 res;
@@ -1473,6 +1475,9 @@
static void aty_set_pll_ct(const struct fb_info_aty *info,
const struct pll_ct *pll)
{
+
+ return;
+
aty_st_pll(PLL_REF_DIV, pll->pll_ref_div, info);
aty_st_pll(PLL_GEN_CNTL, pll->pll_gen_cntl, info);
aty_st_pll(MCLK_FB_DIV, pll->mclk_fb_div, info);
@@ -1614,7 +1619,7 @@
(Gx == GV_CHIP_ID) || (Gx == GW_CHIP_ID) || (Gx == GZ_CHIP_ID) ||
(Gx == LG_CHIP_ID) || (Gx == GB_CHIP_ID) || (Gx == GD_CHIP_ID) ||
(Gx == GI_CHIP_ID) || (Gx == GP_CHIP_ID) || (Gx == GQ_CHIP_ID) ||
- (Gx == VU_CHIP_ID)) && (info->ram_type >= SDRAM))
+ (Gx == VU_CHIP_ID) || (Gx == LP_CHIP_ID)) && (info->ram_type >=
SDRAM))
pll_gen_cntl = 0x04;
else
pll_gen_cntl = 0x84;
@@ -2356,7 +2361,7 @@
if (Gx == GT_CHIP_ID || Gx == GU_CHIP_ID || Gx ==
GV_CHIP_ID ||
Gx == GW_CHIP_ID || Gx == GZ_CHIP_ID || Gx ==
LG_CHIP_ID ||
Gx == GB_CHIP_ID || Gx == GD_CHIP_ID || Gx ==
GI_CHIP_ID ||
- Gx == GP_CHIP_ID || Gx == GQ_CHIP_ID)
+ Gx == GP_CHIP_ID || Gx == GQ_CHIP_ID || Gx ==
LP_CHIP_ID)
tmp |= 0x2;
aty_st_8(DAC_CNTL, tmp, info);
aty_st_8(DAC_MASK, 0xff, info);
@@ -2503,10 +2508,13 @@
Gx == GI_CHIP_ID || Gx == GP_CHIP_ID ||
Gx == GQ_CHIP_ID || Gx == LB_CHIP_ID ||
Gx == LD_CHIP_ID || Gx == LG_CHIP_ID ||
- Gx == LI_CHIP_ID || Gx == LP_CHIP_ID) {
+ Gx == LI_CHIP_ID) {
/* RAGE PRO or LT PRO */
pll = 230;
mclk = 100;
+ } else if (Gx == LP_CHIP_ID) {
+ mclk = 100;
+ pll = 135;
} else {
/* other RAGE */
pll = 135;
@@ -2641,15 +2649,19 @@
#if defined(CONFIG_PPC)
if (default_vmode == VMODE_NVRAM) {
- default_vmode = nvram_read_byte(NV_VMODE);
- if (default_vmode <= 0 || default_vmode > VMODE_MAX)
- default_vmode = VMODE_CHOOSE;
+ if (Gx == LP_CHIP_ID) {
+ default_vmode = VMODE_1024_768_60;
+ } else {
+ default_vmode = nvram_read_byte(NV_VMODE);
+ if (default_vmode <= 0 || default_vmode > VMODE_MAX)
+ default_vmode = VMODE_CHOOSE;
+ }
}
if (default_vmode == VMODE_CHOOSE) {
- if (Gx == LG_CHIP_ID)
+ if (Gx == LG_CHIP_ID || Gx == LP_CHIP_ID) {
/* G3 PowerBook with 1024x768 LCD */
default_vmode = VMODE_1024_768_60;
- else {
+ } else {
sense = read_aty_sense(info);
default_vmode = mac_map_monitor_sense(sense);
}
@@ -3372,7 +3384,7 @@
if (Gx == GT_CHIP_ID || Gx == GU_CHIP_ID || Gx == GV_CHIP_ID ||
Gx == GW_CHIP_ID || Gx == GZ_CHIP_ID || Gx == LG_CHIP_ID ||
Gx == GB_CHIP_ID || Gx == GD_CHIP_ID || Gx == GI_CHIP_ID ||
- Gx == GP_CHIP_ID || Gx == GQ_CHIP_ID)
+ Gx == GP_CHIP_ID || Gx == GQ_CHIP_ID || Gx == LP_CHIP_ID)
i |= 0x2; /*DAC_CNTL|0x2 turns off the extra brightness for
gt*/
aty_st_8(DAC_CNTL, i, info);
aty_st_8(DAC_MASK, 0xff, info);
[[ This message was sent via the linuxppc-dev mailing list. Replies are ]]
[[ not forced back to the list, so be sure to Cc linuxppc-dev if your ]]
[[ reply is of general interest. Please check http://lists.linuxppc.org/ ]]
[[ and http://www.linuxppc.org/ for useful information before posting. ]]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~1999-03-24 6:43 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-03-24 1:06 PB G3 Video (for the developers) Dean Takemori
1999-03-24 6:43 ` Brian Downing
-- strict thread matches above, loose matches on Subject: below --
1999-03-15 23:12 abew
1999-03-16 8:51 ` Geert Uytterhoeven
1999-03-16 18:00 ` abew
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).