Re: radeon-pre-2

From: Alan Cox
Date: Sun Sep 12 2004 - 13:34:48 EST


On Sul, 2004-09-12 at 12:36, Hamie wrote:
> But this relies on drivers co-operating with each other.

Only minimally, and providing the co-operation is easy the rest comes
out fine. We don't often get ide-disk and ide-cd people arguing over
whose fault something is

> Yeah. Would fglrx be more stable if you used the external AGP rather
> than fglrx's built in AGP driver?

Who knows, ATI have the source, ask them 8)

> >My code ends up looking like
> >
> > lock
> > if(someone_else_used_it)
> > restore_my_state()
> > blah
> > unlock
>
> Ah... Now I understand what you've been talking about as well... The
> only caveat is whether you can always restore your own state from the
> state the other person put it into. Do any cards exist where you could
> perhaps still lock the card up because you didn't know the current state
> of the card?

There are lots of cards where you might need more than the basic
example. You need to know your own state clearly, you often can't
retrieve that from the card. You may also need to know the previous user
has left it in a sane state. That might lead you to say

lock
oldowner->release()
blah
unlock (&release_func)

so that the previous caller is told it is losing the lock and can
for example wait for its commands to complete.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/