server questions

Keith Packard keithp@keithp.com
Tue, 20 Jan 2004 09:58:53 -0800


Around 11 o'clock on Jan 19, stuart kreitman wrote:

> Questions on hardware panning in XFree implementation:

The XFree86 hardware panning is done by changing the video origin used to 
scan data out to the DAC; the underlying frame buffer is the full virtual 
size.  It's really more of a mode selection issue; the mode happens to be 
smaller than the screen.  A hack in the mouse code causes the server to 
reset the origin so that the mouse is always visible on the screen.

I always found this hack annoying -- I think the monitor should always display
the whole root window.  So, I've never supported it in the kdrive 
infrastructure.

You can do the same thing in the window manager with a giant window 
containing the applications and some input-only windows to trigger the 
panning action.  Using Composite, you can eliminate any repaint artifacts.

> I wonder if there is a natural limitation to the max available size that 
> can be configured. EG some current graphics
> cards have huge memory.  If this is texture store, is it still possible 
> to somehow apply it to panning? I'm
> aware of some limitations where 3D engines are involved.

With the current XFree86 hack, the only limit is the maximum stride you can
configure in the video output logic.  With a software solution, there 
would be no limit to the size; in fact, there would be no storage 
allocated for the full-sized image anywhere.

> I would like to see some control in allocation of the onboard memory so
> that panning-freaks, pixmap-freaks, or 3D freaks could tune the hardware to
> their liking. Would appreciate a push in the right direction if this work
> is possible.

The kdrive acceleration architecture uses a linear video memory allocator 
that allows new allocations to kick existing users back into main memory.  
There's a lot of tuning left to do in this system, but the goal is to use 
video memory as a cache and main memory as a backing store.

I'd also like to look at using AGP memory for video cards without 
sufficient memory onboard; my lowly laptop has only 4Meg of video memory, 
which isn't sufficient for the kinds of operations we'd like to be able to 
do these days.

-keith