Subject: Re: mmap'ing framebuffer memory in MI drivers...
To: Jason Thorpe <>
From: Eduardo E. Horvath <>
List: tech-kern
Date: 03/04/1999 13:10:46
On Thu, 4 Mar 1999, Jason Thorpe wrote:

> On Thu, 4 Mar 1999 09:50:30 -0800 (PST) 
>  "Eduardo E. Horvath" <> wrote:
>  > Why doesn't the VM layer call the driver mmap() routine and let the driver
>  > mmap() routine do the entire operation, possibly using some MD entry point
>  > into the pmap layer where all this special information can be passed in as
>  > separate parameters?  O.K., so we need another driver vector for munmap(), 
>  > I consider this a good thing since it lets the driver keep track of a use
>  > count on this resource which are necessary to know if the driver is
>  > detachable (if we ever support detach) or allow optimizations in the area
>  > of cache flushes, etc.  For example, it lets a video card driver install a
>  > locked large page mapping during the map operation and remove it when the
>  > mapping goes away.
> Because d_mmap() is called many times:
> 	(1) At mmap time, once for each page to see if the request
> 	    mmap operation is legal.  No mappings are entered here.
> 	(2) At fault time, as page faults occur in the mmap'd object,
> 	    on a per-page basis.

Now, since the memory should be wired why are we doing per-page mapin
during pagefaults?  Is anyone planning on paging his framebuffer out to

Eduardo Horvath
	"I need to find a pithy new quote." -- me