linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Xvideo acceleration: GATOS for PPC?
@ 2001-08-28 21:11 Michel Lanners
  2001-08-28 21:39 ` Josh Huber
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Michel Lanners @ 2001-08-28 21:11 UTC (permalink / raw)
  To: DebianPPC, linuxppc-dev


Hi all,

During my quest for improved performance in such goodies as xine and
vlc, I came across the fact that currently on PPC, the X server eats
between 20 and 40 percent of the cpu cycles, whereas on i386 (with GATOS
drivers), it just sleeps doing nothing....

Although I found no evidence documented evicende of this, I suppose this
is because XFree (plain), although implementing Xvideo, doesn't use the
hardware acceleration in the ATI chips, whereas the GATOS drivers do
just that.

Anyway, I tried to use teh GATOS drivers on PPC; but unfortunately hit
two problems:

- XFree doesn't autoload the i2c module of which some symbols are
  referenced by the r128 driver. Solved by adding 'Module "i2c"' to
  XF86Config-4.

- Now the Xserver segfaults on startup. Last lines in the log:

[list of available accelerations]
(II) R128(0): Acceleration enabled
(II) R128(0): Using hardware cursor (scanline 3080)
(II) R128(0): Largest offscreen area available: 1152 x 1048
(II) R128(0): Dotclock is 0 Mhz, setting ecp_div to 0
(II) R128(0): Cannot access BIOS: info->VBIOS==NULL.

Fatal server error:
Caught signal 11.  Server aborting

The last two '(II)' lines look strange... for comparison, plain debian
XF410 looks thus:

[list of available accelerations]
(II) R128(0): Acceleration enabled
(II) R128(0): Using hardware cursor (scanline 3080)
(II) R128(0): Largest offscreen area available: 1152 x 1048
(WW) R128(0): Option "power_saver" is not used
(WW) R128(0): Option "DPMS" is not used
(II) R128(0): Direct rendering disabled
(II) Setting vga for screen 0.
(II) Initializing built-in extension MIT-SHM
etc...

Anybody else tried to use GATOS drivers on PPC? FYI, I'm using Debian
XF410 out of unstable, and I'm trying out the XF410 GATOS drivers.

Help? Ideas where to look?

Cheers, and thanks

Michel

-------------------------------------------------------------------------
Michel Lanners                 |  " Read Philosophy.  Study Art.
23, Rue Paul Henkes            |    Ask Questions.  Make Mistakes.
L-1710 Luxembourg              |
email   mlan@cpu.lu            |
http://www.cpu.lu/~mlan        |                     Learn Always. "


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Xvideo acceleration: GATOS for PPC?
  2001-08-28 21:11 Xvideo acceleration: GATOS for PPC? Michel Lanners
@ 2001-08-28 21:39 ` Josh Huber
  2001-08-28 22:10 ` Michel Dänzer
  2001-08-29 11:51 ` Kenneth Johansson
  2 siblings, 0 replies; 7+ messages in thread
From: Josh Huber @ 2001-08-28 21:39 UTC (permalink / raw)
  To: mlan; +Cc: DebianPPC, linuxppc-dev

[-- Attachment #1: Type: text/plain, Size: 618 bytes --]

Michel Lanners <mlan@cpu.lu> writes:

> (II) R128(0): Cannot access BIOS: info->VBIOS==NULL.

Yeah, I just looked at this.  Same problem on mach64, it finds that
the VBIOS pointer is NULL, reports it, and happily tries to
dereference it a couple lines down. (hence the segfault)

alert, this may be a cheap hack, but it makes the xvideo module work
great on my Lombard. (attached)

now, it looks like that code is duplicated throughout the r128_video.c
and radeon_video.c file as well, so you might want to try changing
that too. (for r128)

ttyl,

--
Josh Huber                                   | huber@debian.org |

[-- Attachment #2: atixv_no_bios.diff --]
[-- Type: text/plain, Size: 803 bytes --]

Index: atixv.c
===================================================================
RCS file: /cvs/livid/gatos-ati/ati_xv/ati.2/atixv.c,v
retrieving revision 1.14
diff -u -r1.14 atixv.c
--- atixv.c	2001/07/29 17:57:46	1.14
+++ atixv.c	2001/08/28 21:54:05
@@ -1048,7 +1048,9 @@

      if(pATI->VBIOS==NULL){
      	xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Cannot access BIOS: info->VBIOS==NULL.\n");
+	mm_table = 0;
      	}
+     else {

      xf86DrvMsg(pScrn->scrnIndex, X_INFO, "0x%02x 0x%02x\n", pATI->VBIOS[0],
                pATI->VBIOS[1]);
@@ -1057,6 +1059,8 @@

 	/* mach64 table is at different address than r128 one */
      mm_table=pATI->VBIOS[bios_header+0x46];
+     }
+
      if(mm_table==0)
      {
          xf86DrvMsg(pScrn->scrnIndex,X_INFO,"No MM_TABLE found\n",bios_header,mm_table);

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Xvideo acceleration: GATOS for PPC?
  2001-08-28 21:11 Xvideo acceleration: GATOS for PPC? Michel Lanners
  2001-08-28 21:39 ` Josh Huber
@ 2001-08-28 22:10 ` Michel Dänzer
  2001-08-28 23:35   ` Michel Dänzer
  2001-08-29 11:51 ` Kenneth Johansson
  2 siblings, 1 reply; 7+ messages in thread
From: Michel Dänzer @ 2001-08-28 22:10 UTC (permalink / raw)
  To: mlan; +Cc: DebianPPC, linuxppc-dev


Michel Lanners wrote:

> During my quest for improved performance in such goodies as xine and
> vlc, I came across the fact that currently on PPC, the X server eats
> between 20 and 40 percent of the cpu cycles, whereas on i386 (with GATOS
> drivers), it just sleeps doing nothing....
>
> Although I found no evidence documented evicende of this, I suppose this
> is because XFree (plain), although implementing Xvideo, doesn't use the
> hardware acceleration in the ATI chips, whereas the GATOS drivers do
> just that.

Not quite. Plain XFree86 uses the frontend scaler, which also does the
colorspace conversion. The reason for the CPU load is that the data is
transferred to the card with regular memcpy. If the GATOS drivers use
(virtually) no CPU for the transfer, that hints at that they use bus mastering
for the transfer. Very interesting, I'll have to look at the code.


> Anyway, I tried to use teh GATOS drivers on PPC; but unfortunately hit
> two problems:
>
> - XFree doesn't autoload the i2c module of which some symbols are
>   referenced by the r128 driver. Solved by adding 'Module "i2c"' to
>   XF86Config-4.

Driver bug, it should load the module if needed.


--
Earthling Michel Dänzer (MrCooper)    \   Debian GNU/Linux (powerpc) developer
CS student, Free Software enthusiast   \        XFree86 and DRI project member

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Xvideo acceleration: GATOS for PPC?
  2001-08-28 22:10 ` Michel Dänzer
@ 2001-08-28 23:35   ` Michel Dänzer
  2001-08-29  5:41     ` Michel Lanners
  0 siblings, 1 reply; 7+ messages in thread
From: Michel Dänzer @ 2001-08-28 23:35 UTC (permalink / raw)
  To: mlan, DebianPPC, linuxppc-dev


Michel Dänzer wrote:
>
> Michel Lanners wrote:
>
> > During my quest for improved performance in such goodies as xine and
> > vlc, I came across the fact that currently on PPC, the X server eats
> > between 20 and 40 percent of the cpu cycles, whereas on i386 (with GATOS
> > drivers), it just sleeps doing nothing....
> >
> > Although I found no evidence documented evicende of this, I suppose this
> > is because XFree (plain), although implementing Xvideo, doesn't use the
> > hardware acceleration in the ATI chips, whereas the GATOS drivers do
> > just that.
>
> Not quite. Plain XFree86 uses the frontend scaler, which also does the
> colorspace conversion. The reason for the CPU load is that the data is
> transferred to the card with regular memcpy. If the GATOS drivers use
> (virtually) no CPU for the transfer, that hints at that they use bus
> mastering for the transfer. Very interesting, I'll have to look at the code.

False alarm, they also use memcpy. In fact, the code looks very similar to
plain XFree86, so I'd be surprised if it makes any difference.


--
Earthling Michel Dänzer (MrCooper)    \   Debian GNU/Linux (powerpc) developer
CS student, Free Software enthusiast   \        XFree86 and DRI project member

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Xvideo acceleration: GATOS for PPC?
  2001-08-28 23:35   ` Michel Dänzer
@ 2001-08-29  5:41     ` Michel Lanners
  2001-08-29 14:59       ` Michel Dänzer
  0 siblings, 1 reply; 7+ messages in thread
From: Michel Lanners @ 2001-08-29  5:41 UTC (permalink / raw)
  To: Michel Dänzer; +Cc: debian-powerpc, linuxppc-dev

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1171 bytes --]


Hi Michel,

> Michel Dänzer wrote:
> > > Although I found no evidence documented evicende of this, I suppose this
> > > is because XFree (plain), although implementing Xvideo, doesn't use the
> > > hardware acceleration in the ATI chips, whereas the GATOS drivers do
> > > just that.
> >
> > Not quite. Plain XFree86 uses the frontend scaler, which also does the
> > colorspace conversion. The reason for the CPU load is that the data is
> > transferred to the card with regular memcpy. If the GATOS drivers use
> > (virtually) no CPU for the transfer, that hints at that they use bus
> > mastering for the transfer. Very interesting, I'll have to look at the code.
>
> False alarm, they also use memcpy. In fact, the code looks very similar to
> plain XFree86, so I'd be surprised if it makes any difference.

Did you look at the r128 driver only? My test showing the decrease in CPU load
was on a Rage Mobility-equipped Dell laptop (i.e Mach64-compatible using the ati
driver).

Anyway, Tonight I'll try the r128 on PPC and report back...

Cheers

Michel
--
.signature: no such file or directory

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Xvideo acceleration: GATOS for PPC?
  2001-08-28 21:11 Xvideo acceleration: GATOS for PPC? Michel Lanners
  2001-08-28 21:39 ` Josh Huber
  2001-08-28 22:10 ` Michel Dänzer
@ 2001-08-29 11:51 ` Kenneth Johansson
  2 siblings, 0 replies; 7+ messages in thread
From: Kenneth Johansson @ 2001-08-29 11:51 UTC (permalink / raw)
  To: mlan; +Cc: DebianPPC, linuxppc-dev


Michel Lanners wrote:
>
> Hi all,
>
> During my quest for improved performance in such goodies as xine and
> vlc, I came across the fact that currently on PPC, the X server eats
> between 20 and 40 percent of the cpu cycles, whereas on i386 (with GATOS
> drivers), it just sleeps doing nothing....

I have seen something like this on plain x86. Turns out it was the gnome
"desk guide" that tries to update the thumb nail display with the screen
contents and most of the processing ends up in X for some reason.

--
Kenneth Johansson
Ericsson Business Innovation AB   Tel: +46 8 404 71 83
Viderögatan 3                     Fax: +46 8 404 72 72
164 80 Stockholm                  kenneth.johansson@inn.ericsson.se

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Xvideo acceleration: GATOS for PPC?
  2001-08-29  5:41     ` Michel Lanners
@ 2001-08-29 14:59       ` Michel Dänzer
  0 siblings, 0 replies; 7+ messages in thread
From: Michel Dänzer @ 2001-08-29 14:59 UTC (permalink / raw)
  To: Michel Lanners; +Cc: debian-powerpc, linuxppc-dev


Michel Lanners wrote:

> > Michel Dänzer wrote:
> > > > Although I found no evidence documented evicende of this, I suppose
> > > > this is because XFree (plain), although implementing Xvideo, doesn't
> > > > use the hardware acceleration in the ATI chips, whereas the GATOS
> > > > drivers do just that.
> > >
> > > Not quite. Plain XFree86 uses the frontend scaler, which also does the
> > > colorspace conversion. The reason for the CPU load is that the data is
> > > transferred to the card with regular memcpy. If the GATOS drivers use
> > > (virtually) no CPU for the transfer, that hints at that they use bus
> > > mastering for the transfer. Very interesting, I'll have to look at the
> > > code.
> >
> > False alarm, they also use memcpy. In fact, the code looks very similar to
> > plain XFree86, so I'd be surprised if it makes any difference.
>
> Did you look at the r128 driver only? My test showing the decrease in CPU
> load was on a Rage Mobility-equipped Dell laptop (i.e Mach64-compatible
> using the ati driver).

Nope, I looked at the mach64 code as well. Looks like slightly modified r128
code. The only real difference seems to be that GATOS supports additional
video chips, but that doesn't apply to us.


--
Earthling Michel Dänzer (MrCooper)    \   Debian GNU/Linux (powerpc) developer
CS student, Free Software enthusiast   \        XFree86 and DRI project member

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2001-08-29 14:59 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-08-28 21:11 Xvideo acceleration: GATOS for PPC? Michel Lanners
2001-08-28 21:39 ` Josh Huber
2001-08-28 22:10 ` Michel Dänzer
2001-08-28 23:35   ` Michel Dänzer
2001-08-29  5:41     ` Michel Lanners
2001-08-29 14:59       ` Michel Dänzer
2001-08-29 11:51 ` Kenneth Johansson

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).