* ibook G4 Status Report
@ 2004-02-09 17:48 Costantino Pistagna
2004-02-09 21:10 ` Benjamin Herrenschmidt
2004-02-09 21:13 ` Brad Boyer
0 siblings, 2 replies; 10+ messages in thread
From: Costantino Pistagna @ 2004-02-09 17:48 UTC (permalink / raw)
To: linuxppc-dev
Hi all,
i'm currently using an ibook G4 with Radeon9200 OnBoard.
Some months ago, i've wrote in this list asking about the status of the
driver
for both Xfree and framebuffer. Actually i'm using the system with
framebuffer
and Xfree, running a 2.6.1-ben1 kernel, but no support for dualhead
and/or
multiple screens.
Since my ibook is a 12" equipped, i really need to use the video output
with my 17" LCD.
Any clues ? and/or usefull start point ?. i've tried to look inside
xfree drivers sources,
but without any good results. Seems that radeon9200 does not provide,
any type of
multiple screen support.
A minor request is about the status of Broadcom BCM94306 driver. Looking
around i've noticed that many new Centrino-Based laptop are equipped
with
this wificard. After some minutes of googling i've reached a sf.net
hosted project
about a .vxd/Windows drivers wrapper; it successfully use the windows
drivers
for the above card under x86/linux. is there any way to use this method
under
linuxppc ?. Another time: any clues? and/or usefull start point ?
cheers,
--
[ Costantino Pistagna (PhD) :: unict :: dmi ]
[ s0ftpj ::: Vrl Team ::: freaKnet MediaLab ]
[ gpg key on pgp.mit.edu :: keyid 1d67b4dd ]
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: ibook G4 Status Report
2004-02-09 17:48 Costantino Pistagna
@ 2004-02-09 21:10 ` Benjamin Herrenschmidt
2004-02-11 16:44 ` Costantino Pistagna
` (2 more replies)
2004-02-09 21:13 ` Brad Boyer
1 sibling, 3 replies; 10+ messages in thread
From: Benjamin Herrenschmidt @ 2004-02-09 21:10 UTC (permalink / raw)
To: Costantino Pistagna; +Cc: linuxppc-dev list
> Since my ibook is a 12" equipped, i really need to use the video output
> with my 17" LCD.
>
> Any clues ? and/or usefull start point ?. i've tried to look inside
> xfree drivers sources,
> but without any good results. Seems that radeon9200 does not provide,
> any type of
> multiple screen support.
You have a VGA or DVI output ? VGA I think ? It should work with
Michel Danzer packages but it will be an analog output, not as good
as a fully digital.
XFree doesn't drive properly a DVI output on a laptop yet, though
I got it to work with a small userland hack I use to "fix" the chip
after X configured it ;)
Note that you may also have a problem with XFree not setting the proper
divider for your internal panel when used without UseFBDev. Same issue,
I have a userland "fix" for that since fixing it in XFree itself isn't
quite simple at this point.
Ben.
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: ibook G4 Status Report
2004-02-09 17:48 Costantino Pistagna
2004-02-09 21:10 ` Benjamin Herrenschmidt
@ 2004-02-09 21:13 ` Brad Boyer
1 sibling, 0 replies; 10+ messages in thread
From: Brad Boyer @ 2004-02-09 21:13 UTC (permalink / raw)
To: Costantino Pistagna; +Cc: linuxppc-dev
On Mon, Feb 09, 2004 at 06:48:22PM +0100, Costantino Pistagna wrote:
> A minor request is about the status of Broadcom BCM94306 driver. Looking
> around i've noticed that many new Centrino-Based laptop are equipped
> with
> this wificard. After some minutes of googling i've reached a sf.net
> hosted project
> about a .vxd/Windows drivers wrapper; it successfully use the windows
> drivers
> for the above card under x86/linux. is there any way to use this method
> under
> linuxppc ?. Another time: any clues? and/or usefull start point ?
I don't remember if it was on this list, but I did write up a short
list of what it would take to get osx drivers running, at it's pretty
extensive. It might be easier to get an x86 emulator running enough
to use the windows driver and the vxd wrapper hack.
The problem is that osx has a lot of support code built into the
kernel that gets used by every driver. It's nice for the person
writing the driver, but a pain for someone trying to emulate it.
Brad Boyer
flar@allandria.com
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: ibook G4 Status Report
2004-02-09 21:10 ` Benjamin Herrenschmidt
@ 2004-02-11 16:44 ` Costantino Pistagna
2004-02-11 19:10 ` Costantino Pistagna
2004-02-12 6:07 ` Costantino Pistagna
2 siblings, 0 replies; 10+ messages in thread
From: Costantino Pistagna @ 2004-02-11 16:44 UTC (permalink / raw)
To: linuxppc-dev
On Feb 9, 2004, at 10:10 PM, Benjamin Herrenschmidt wrote:
>
>> Since my ibook is a 12" equipped, i really need to use the video
>> output
>> with my 17" LCD.
>>
>> Any clues ? and/or usefull start point ?. i've tried to look inside
>> xfree drivers sources,
>> but without any good results. Seems that radeon9200 does not provide,
>> any type of
>> multiple screen support.
>
> You have a VGA or DVI output ? VGA I think ? It should work with
> Michel Danzer packages but it will be an analog output, not as good
> as a fully digital.
yep, you're right! I was unhappy in my previous message. I've an analog
VGA
monitor connected to my ibook. All i want to do is use my external CRT
monitor
with X or consoleFB. I've googled for "Michel Danzer", but without any
success at all.
any clues ?
> XFree doesn't drive properly a DVI output on a laptop yet, though
> I got it to work with a small userland hack I use to "fix" the chip
> after X configured it ;)
>
no matter for DVI output, yet. thanks at all.
> Note that you may also have a problem with XFree not setting the proper
> divider for your internal panel when used without UseFBDev. Same issue,
> I have a userland "fix" for that since fixing it in XFree itself isn't
> quite simple at this point.
I've noticed this problem. the only way to get XFree working properly,
is
to use the UseFBDev directive into XF86Config. Unfortunately, this
directive
seems to get in troubles with dualhead XF86Config (i've used the one
that i'm
using in my desktop, equipped with a Rage128): the panels are waiting
for
something with a black screen. If it's usefull, i'm using an XFree
4.3.0 binary
merged with gentoo/ppc.
cheers,
--
[ Costantino Pistagna (PhD) :: unict :: dmi ]
[ gpg key on pgp.mit.edu :: keyid 1d67b4dd ]
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: ibook G4 Status Report
2004-02-09 21:10 ` Benjamin Herrenschmidt
2004-02-11 16:44 ` Costantino Pistagna
@ 2004-02-11 19:10 ` Costantino Pistagna
2004-02-11 22:18 ` Benjamin Herrenschmidt
2004-02-12 6:07 ` Costantino Pistagna
2 siblings, 1 reply; 10+ messages in thread
From: Costantino Pistagna @ 2004-02-11 19:10 UTC (permalink / raw)
To: linuxppc-dev
On Feb 9, 2004, at 10:10 PM, Benjamin Herrenschmidt wrote:
>
>> Since my ibook is a 12" equipped, i really need to use the video
>> output
>> with my 17" LCD.
>>
>> Any clues ? and/or usefull start point ?. i've tried to look inside
>> xfree drivers sources,
>> but without any good results. Seems that radeon9200 does not provide,
>> any type of
>> multiple screen support.
>
> You have a VGA or DVI output ? VGA I think ? It should work with
> Michel Danzer packages but it will be an analog output, not as good
> as a fully digital.
yep, you're right! I was unhappy in my previous message. I've an analog
VGA
monitor connected to my ibook. All i want to do is use my external CRT
monitor
with X or consoleFB. I've googled for "Michel Danzer", but without any
success at all.
any clues ?
> XFree doesn't drive properly a DVI output on a laptop yet, though
> I got it to work with a small userland hack I use to "fix" the chip
> after X configured it ;)
>
no matter for DVI output, yet. thanks at all.
> Note that you may also have a problem with XFree not setting the proper
> divider for your internal panel when used without UseFBDev. Same issue,
> I have a userland "fix" for that since fixing it in XFree itself isn't
> quite simple at this point.
I've noticed this problem. the only way to get XFree working properly,
is
to use the UseFBDev directive into XF86Config. Unfortunately, this
directive
seems to get in troubles with dualhead XF86Config (i've used the one
that i'm
using in my desktop, equipped with a Rage128): the panels are waiting
for
something with a black screen. If it's usefull, i'm using an XFree
4.3.0 binary
merged with gentoo/ppc.
cheers,
--
[ Costantino Pistagna (PhD) :: unict :: dmi ]
[ gpg key on pgp.mit.edu :: keyid 1d67b4dd ]
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: ibook G4 Status Report
2004-02-11 19:10 ` Costantino Pistagna
@ 2004-02-11 22:18 ` Benjamin Herrenschmidt
0 siblings, 0 replies; 10+ messages in thread
From: Benjamin Herrenschmidt @ 2004-02-11 22:18 UTC (permalink / raw)
To: Costantino Pistagna; +Cc: linuxppc-dev list
[-- Attachment #1: Type: text/plain, Size: 1110 bytes --]
>
> I've noticed this problem. the only way to get XFree working properly,
> is
> to use the UseFBDev directive into XF86Config. Unfortunately, this
> directive
> seems to get in troubles with dualhead XF86Config (i've used the one
> that i'm
> using in my desktop, equipped with a Rage128): the panels are waiting
> for
> something with a black screen. If it's usefull, i'm using an XFree
> 4.3.0 binary
> merged with gentoo/ppc.
Ok, you need to use XFree without UseFBDev. This cause some flicker on
your LCD, and then run the enclosed hack which should fix the flicker. Let
me know if that helps. XFree without UseFBDev will also screw up switching
back to console unfortunately, I have a hack for that (remove all the vgaXXX
calls in XFree) locally.
I expect to have full support of dual head in radeonfb not too far from
now, though there will be some work needed for XFree to be able to "use"
it... I hope that work could easily be included in Michel's packages at
least :)
Note that if the enclosed lcd_hack.c doesn't work, try adding that line
to it at the end:
OUTPLL(3,0xc);
Let me know.
Ben.
[-- Attachment #2: lcd_hack.c --]
[-- Type: text/x-c, Size: 2930 bytes --]
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <sys/mman.h>
#include <unistd.h>
#include <byteswap.h>
#include <linux/fb.h>
#include <errno.h>
#include "radeon.h"
void * mmio;
#define RADEON_RBASE 0xb0000000
//#define RADEON_RBASE 0x90000000
static inline unsigned char regr8(void *base, const unsigned long offset)
{
unsigned char val;
__asm__ __volatile__(
"lbzx %0,%1,%2\n\t"
"eieio"
: "=r" (val)
: "b" (base), "r" (offset),
"m" (*((volatile unsigned char *)base+offset)));
return(val);
}
static inline void regw8(void *base, const unsigned long offset,
const unsigned char val)
{
__asm__ __volatile__ ("stbx %1,%2,%3\n\t"
"eieio"
: "=m" (*((volatile unsigned char *)base+offset))
: "r" (val), "b" (base), "r" (offset));
}
static inline unsigned int regr(void *base, const unsigned long offset)
{
unsigned int val;
__asm__ __volatile__ ("lwbrx %0,%1,%2\n\t"
"eieio"
: "=r" (val)
: "b" (base), "r"(offset),
"m" (*((volatile unsigned char *)base+offset)));
return val;
}
static inline void regw(void *base, const unsigned long offset,
const unsigned int val)
{
__asm__ __volatile__ ("stwbrx %1,%2,%3\n\t"
"eieio"
: "=m" (*((volatile unsigned char *)base+offset))
: "r"(val), "b"(base), "r"(offset));
}
static inline unsigned int pllr(void *base, const unsigned long index)
{
unsigned int val;
regw8(base, 0x8, index & 0x3f);
return regr(base, 0xc);
}
#define INREG(r) regr(mmio, (r))
#define OUTREG(r, v) regw(mmio, (r), (v))
#define INREG8(r) regr8(mmio, (r))
#define OUTREG8(r, v) regw8(mmio, (r), (v))
#define OUTPLL(addr,val) \
do { \
OUTREG8(CLOCK_CNTL_INDEX, (addr & 0x0000003f) | 0x00000080); \
OUTREG(CLOCK_CNTL_DATA, val); \
} while(0)
static inline unsigned long _INPLL(unsigned long addr)
{
OUTREG8(CLOCK_CNTL_INDEX, addr & 0x0000003f);
return (INREG(CLOCK_CNTL_DATA));
}
#define INPLL(addr) _INPLL(addr)
int main() {
int fd, fbfd, i;
unsigned int cci;
struct fb_fix_screeninfo fix;
fbfd = open("/dev/fb0", O_RDWR);
if (fbfd == -1) {
perror("cannot open framebuffer\n");
return ENODEV;
}
if (ioctl(fbfd, FBIOGET_FSCREENINFO, &fix)) {
perror("cannot get sceen info\n");
return ENODEV;
}
if (fix.accel != FB_ACCEL_ATI_RADEON) {
fprintf(stderr, "not a radeon !\n");
return ENODEV;
}
fd = open("/dev/mem", O_RDWR);
if (fd == -1) {
perror("cannot open /dev/mem\n");
return ENODEV;
}
mmio = (void *)mmap(0, 0x80000, PROT_READ|PROT_WRITE,
MAP_SHARED, fd, fix.mmio_start);
/* Force switch to PLL0 */
printf("Frobbing radeon PLL...\n");
cci = INREG(8);
OUTREG(8, cci & ~0x00000300);
}
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: ibook G4 Status Report
2004-02-09 21:10 ` Benjamin Herrenschmidt
2004-02-11 16:44 ` Costantino Pistagna
2004-02-11 19:10 ` Costantino Pistagna
@ 2004-02-12 6:07 ` Costantino Pistagna
2 siblings, 0 replies; 10+ messages in thread
From: Costantino Pistagna @ 2004-02-12 6:07 UTC (permalink / raw)
To: linuxppc-dev
On Tue, Feb 10, 2004 at 08:10:30AM +1100, Benjamin Herrenschmidt wrote:
> You have a VGA or DVI output ? VGA I think ? It should work with
> Michel Danzer packages but it will be an analog output, not as good
> as a fully digital.
yep, you're right! I was unhappy in my previous message. I've an analog VGA
monitor connected to my ibook. All i want to do is use my external CRT monitor
with X or consoleFB. I've googled for "Michel Danzer", but without any success at all.
any clues ?
> XFree doesn't drive properly a DVI output on a laptop yet, though
> I got it to work with a small userland hack I use to "fix" the chip
> after X configured it ;)
no matter for DVI output, yet. thanks at all.
> Note that you may also have a problem with XFree not setting the proper
> divider for your internal panel when used without UseFBDev. Same issue,
> I have a userland "fix" for that since fixing it in XFree itself isn't
> quite simple at this point.
I've noticed this problem. the only way to get XFree working properly, is
to use the UseFBDev directive into XF86Config. Unfortunately, this directive
seems to get in troubles with dualhead XF86Config (i've used the one that i'm
using in my desktop, equipped with a Rage128): the panels are waiting for
something with a black screen. If it's usefull, i'm using an XFree 4.3.0 binary
merged with gentoo/ppc.
cheers,
--
[ Costantino Pistagna (PhD) :: unict :: dmi ]
[ gpg key on pgp.mit.edu :: keyid 1d67b4dd ]
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: ibook G4 Status Report
@ 2004-02-22 11:18 Costantino Pistagna
2004-02-22 21:07 ` Benjamin Herrenschmidt
2004-02-24 17:41 ` Michel Dänzer
0 siblings, 2 replies; 10+ messages in thread
From: Costantino Pistagna @ 2004-02-22 11:18 UTC (permalink / raw)
To: linuxppc-dev
Thu 12 Feb 2004, Benjamin Herrenschmidt wrote:
> Ok, you need to use XFree without UseFBDev. This cause some flicker on
> your LCD, and then run the enclosed hack which should fix the flicker. Let
> me know if that helps. XFree without UseFBDev will also screw up switching
> back to console unfortunately, I have a hack for that (remove all the vgaXXX
>calls in XFree) locally.
First of all sorry for my lag, i was out for work last two weeks.
I've tried your lcd_hack patch with no FBDev option in XFree,
now the lcd is not flickering anymore; i've used the OUTPLL(3,0xc)
workaround, because without it the hack is useless.
Now the second screen switch in clone-mode without any problem. The only
trouble is that the output resolution is the same of the embedded lcd,
so the max res that i can use is 1024x768; no matter about the paramters
specified in XF86Config. If it's usefull, i've patched my OF to unlock
the video resolutions as described in some howtos on the net.
Another issue is about the on-the-fly resolution switch: if during the X session
i switch to another resolution the LCD screen start to flickering again; i've to
rerun the lcd_hack to stop the problem.
follow some scratch of my XF86Config:
Section "Device"
Identifier "Radeon-1"
Driver "radeon"
ChipID 0x514d
BusID "PCI:0:16:0"
Option "SWcursor" "true"
Option "AGPMode" "4"
Option "EnablePageFlip" "On"
Screen 0
EndSection
Section "Device"
Identifier "Radeon-2"
Driver "radeon"
ChipID 0x514d
BusID "PCI:0:16:0"
Option "SWcursor" "true"
Option "AGPMode" "4"
Option "EnablePageFlip" "On"
Screen 1
EndSection
Section "Screen"
Identifier "Screen 1"
Device "Radeon-1"
Monitor "aoc"
DefaultDepth 16
Subsection "Display"
Depth 16
Modes "1024x768"
ViewPort 0 0
EndSubsection
EndSection
Section "Screen"
Identifier "Screen 2"
Device "Radeon-2"
Monitor "aoc"
DefaultDepth 16
Subsection "Display"
Depth 16
Modes "1280x1024"
ViewPort 0 0
EndSubsection
EndSection
Section "ServerLayout"
Screen "Screen 1"
# Screen "Screen 2"
End Section
if you've readed carefully above, i've to disable the second screen in
ServerLayout; if i turn it on the system start with an 8bits ColorDepth.
I've no idea about this...maybe i've done some mistake.
finally, i'm using a 2.6.1-ben1 with no additional patch or workaround.
i've not tried your suggested hack for the turn back to console problem.
next week i'll find a couple of minutes to patch X and i'll write a
report onto this list.
cheers,
--
(v^v) ? spj:fnml:vrl;
keyID = 0x1D67B4DD;
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: ibook G4 Status Report
2004-02-22 11:18 ibook G4 Status Report Costantino Pistagna
@ 2004-02-22 21:07 ` Benjamin Herrenschmidt
2004-02-24 17:41 ` Michel Dänzer
1 sibling, 0 replies; 10+ messages in thread
From: Benjamin Herrenschmidt @ 2004-02-22 21:07 UTC (permalink / raw)
To: cpistagna; +Cc: linuxppc-dev list
> finally, i'm using a 2.6.1-ben1 with no additional patch or workaround.
>
> i've not tried your suggested hack for the turn back to console problem.
> next week i'll find a couple of minutes to patch X and i'll write a
> report onto this list.
The mode used for cloning the display is picked by the X driver
according to strange rules I don't fully get at this point ;)
Regarding the switch to console, commenting out the various call
to vgaHWxxxx in RADEONSave() & RADEONRestore() may help.
Ben.
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: ibook G4 Status Report
2004-02-22 11:18 ibook G4 Status Report Costantino Pistagna
2004-02-22 21:07 ` Benjamin Herrenschmidt
@ 2004-02-24 17:41 ` Michel Dänzer
1 sibling, 0 replies; 10+ messages in thread
From: Michel Dänzer @ 2004-02-24 17:41 UTC (permalink / raw)
To: cpistagna; +Cc: linuxppc-dev
On Sun, 2004-02-22 at 12:18, Costantino Pistagna wrote:
>
> Now the second screen switch in clone-mode without any problem. The only
> trouble is that the output resolution is the same of the embedded lcd,
> so the max res that i can use is 1024x768; no matter about the paramters
> specified in XF86Config.
You need to set up either multiple screens or clone modes to go beyond
that.
> If it's usefull, i've patched my OF to unlock the video resolutions as
> described in some howtos on the net.
Only Mac OS cares about that, in order to artificially cripple iBooks.
> if you've readed carefully above, i've to disable the second screen in
> ServerLayout; if i turn it on the system start with an 8bits ColorDepth.
> I've no idea about this...maybe i've done some mistake.
Impossible to tell without seeing the server log.
--
Earthling Michel Dänzer | Debian (powerpc), X and DRI developer
Libre software enthusiast | http://svcs.affero.net/rm.php?r=daenzer
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2004-02-24 17:41 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-22 11:18 ibook G4 Status Report Costantino Pistagna
2004-02-22 21:07 ` Benjamin Herrenschmidt
2004-02-24 17:41 ` Michel Dänzer
-- strict thread matches above, loose matches on Subject: below --
2004-02-09 17:48 Costantino Pistagna
2004-02-09 21:10 ` Benjamin Herrenschmidt
2004-02-11 16:44 ` Costantino Pistagna
2004-02-11 19:10 ` Costantino Pistagna
2004-02-11 22:18 ` Benjamin Herrenschmidt
2004-02-12 6:07 ` Costantino Pistagna
2004-02-09 21:13 ` Brad Boyer
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).