Re: [RFC] [PATCH] DRM TTM Memory Manager patch

From: Keith Packard
Date: Fri May 04 2007 - 12:26:50 EST


On Fri, 2007-05-04 at 16:57 +0100, Keith Whitwell wrote:

> That's a special case of a the general problem of what do you do when a
> client submits any validation list that can't be satisfied. Failing to
> render isn't really an option, either the client or the memory manager
> has to either prevent it happening in the first place or have some
> mechanism for chopping up the dma buffer into segments which are
> satisfiable... Neither of which I can see an absolutely reliable way to
> do.

I think we must return an error from the kernel and let user mode sort
it out; potentially by breaking up the operation into smaller pieces, or
(ick), simply falling back to software. Eliminating per-submit flushing
will even make this reasonably efficient as we remap the GTT as objects
are used. I don't think we want to support automatic partitioning of the
operation in the kernel; punting that step to user mode seems like a
sensible option.

Certainly presenting all of the objects to the kernel atomically will
permit it to succeed if the device can possibly perform the operation;
ejecting all existing objects and reloading with precisely the objects
proposed by the application can be done, and is even inexpensive on UMA
hardware.

> The way to get around this is to mandate that hardware supports paged
> virtual memory... But that seems to be a difficult trick.

Yeah, especially as we don't currently have any examples in our
environment.

--
keith.packard@xxxxxxxxx

Attachment: signature.asc
Description: This is a digitally signed message part