erik quanstrom wrote:
> /sys/src/cmd/aux/vga/radeon.c uses radeon_pciids in radeon.h.
> it ignores the vids and dids in /lib/vgadb.  this is probablly a
> mistake.

Agreed.

erik quanstrom wrote:
> i think it's mainly a question of getting the best graphics
> performance.  but these days the 2d accelleration (especially
> for radeon) is fairly poor.

Do you happen to have any workloads where this is a problem? There is
a lot more we can do for the radeon, particularly the r100-r300 chips,
which could improve draw performance.

Have you ever tried enabling HW_ACCEL in the Radeon driver? It
accelerates fill/scroll to some degree, which would certainly be a
first step.

Gabriel Díaz <[email protected]> wrote:
> I guess the radeon driver is unable to work with modern ati cards no?

Right now the Radeon driver can deal with r100-r300; it is missing PCI
VID/DIDs for a number of r200 cards, mostly the later 9200 and 9250
series. It is also missing a number of r300s (9600, 9800) and the PCIe
X1050, X3xx, X5xx, and X6xx. I don't know how well the later cards
will work, but they are nominally the same as the 9500/9700, which are
supported.

Sean Stangl at CMU started working on support for more modern
(R500/R600 iirc) cards; I believe he got most of ATOMBIOS support and
snarf() routines for the r600 done.

> I would love a book recommendation to learn something about graphics 
> programming, so at least i can guess what or where to look to try to debug 
> the problem.

I don't know of a book that describes any modern graphics hardware,
sorry. However, here is a bit of an overview of what is going on with
the radeon, at least:

The radeon exposes a pair of bus-accessible memory regions (BARs), the
framebuffer and the MMIO region; these regions appear in physical
memory and are mapped by vgaradeon.c (take a look at radeonenable()).
On the Radeon, BAR 0 holds the framebuffer, IIRC; vgalinearpci()
searches the card for the largest region and guesses that that is the
framebuffer. BAR 2 holds the MMIO region. We ask that the framebuffer
segment is set to write-combining via the MTRRs; we cannot do the same
for the MMIO region.

To just draw, you can write to the framebuffer region.

To ask the radeon gpu to do anything interesting for you, you must
carry out a series of register writes - for example, to fill a
rectangle with a solid color, you write the rectangle's color to
DP_BRUSH_FGRD_CLR (register 0x147c), the start to DST_X_Y, and the
width and height to DST_WIDTH_HEIGHT. Everything you can ask the
radeon to do is ultimately done via register writes.

agd5f's blog has two entries that are pretty useful:
http://www.botchco.com/agd5f/?p=50 and
http://www.botchco.com/agd5f/?p=16.

-- vs

Reply via email to