9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Venkatesh Srinivas <me@endeavour.zapto.org>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] ctrl radeon: not working for ATI Radeon 9600 Mobility?
Date: Sat,  1 May 2010 09:53:28 -0400	[thread overview]
Message-ID: <x2qf75780241005010653uf164703bxea0fa70d26b9231f@mail.gmail.com> (raw)
In-Reply-To: <589116.91988.qm@web1202.biz.mail.gq1.yahoo.com>

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 <gdiaz@rejaa.com> 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	other threads:[~2010-05-01 13:53 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <d7a540d6-2751-4e30-8766-e3511bb8c202@g11g2000yqe.googlegroups.co>
2010-04-26 13:15 ` erik quanstrom
2010-04-29  9:58 ` Anton.Pavlovetsky
     [not found] ` <7caa7a0a-fb6d-4ffa-81ef-ad3256100f2c@g21g2000yqk.googlegroups.co>
2010-04-29 11:17   ` erik quanstrom
2010-04-29 12:44     ` Venkatesh Srinivas
2010-04-30  8:53     ` Anton.Pavlovetsky
2010-04-30  8:53   ` Anton.Pavlovetsky
     [not found]   ` <9e5fc5ec-43d5-4cf3-be92-3fc8c4829ba0@l32g2000yqm.googlegroups.co>
2010-04-30 12:07     ` erik quanstrom
2010-04-30 12:30       ` Gabriel Díaz
2010-05-01 13:53         ` Venkatesh Srinivas [this message]
2010-05-01 14:08           ` erik quanstrom
2010-05-01 19:05             ` Venkatesh Srinivas
2010-05-01 22:48       ` Venkatesh Srinivas
2010-05-02  0:42         ` erik quanstrom
2010-05-04  8:47         ` Anton.Pavlovetsky
2010-04-26 11:17 Anton.Pavlovetsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=x2qf75780241005010653uf164703bxea0fa70d26b9231f@mail.gmail.com \
    --to=me@endeavour.zapto.org \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).