On Tue, 2004-03-09 at 17:50, Ian Romanick wrote: > Michel DÃnzer wrote: > > On Tue, 2004-03-09 at 05:28, Ian Romanick wrote: > > > >>- Keep the queue of pending swaps in the user-space driver. Spawn a > >>second thread that *only* performs swaps. It blocks on a futuex or > >>similar the gets uped each time a vblank occurs. When the required > >>vblank has happend, it calls the existing ioctl to perform the swap. > > > > Nothing would need adding here either, just use the vblank ioctl in the > > default blocking mode. > > That would work as long as swaps are always request in strictly > increasing vblank order. With some of the swap extensions, such as > OML_sync_control, that may not always be the case.
You could block for every single vblank, or would a futex or whatever offer something over that? > >>All of these options would require extra logic in the driver to prevent > >>rendering operations (but certain state-changes should be okay?) > > > > Anything that doesn't actually emit stuff to the hardware I guess? > > Some stuff, like uploading textures, should be okay. Dunno. True, although if you do that early, there's a chance that they get kicked out again before they're used? Anyway, exactly which operations need to block on pending swaps is a technical detail. :) > >>while a swap was pending. > > > > One idea would be a 'swapPending' flag; it would be set when a swap gets > > scheduled, and when it's set, any attempt at emitting stuff to the > > hardware would block using the vblank ioctl. Unless I'm missing > > something, this should work in either the 3D driver or the DRM, but the > > latter would probably be better? > > I was thinking of just using a mutex. When a swap is pending the > swap-thread holds the mutex. When the other thread wants to emit > something to the hardware, it tries to get the mutex. I really feel this had better be handled in the kernel. -- Earthling Michel DÃnzer | Debian (powerpc), X and DRI developer Libre software enthusiast | http://svcs.affero.net/rm.php?r=daenzer ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click -- _______________________________________________ Dri-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/dri-devel