From: <uni...@sh...> - 2004-08-24 05:58:29
|
Hi! Mike Mestnik wrote: >--- Eric Anholt <et...@lc...> wrote: > > =20 > >>On Mon, 2004-08-23 at 15:24, Ian Romanick wrote: >> =20 >> >>>Thomas Hellstr=F6m wrote: >>> >>> =20 >>> >>>>As some of you might have read on another thread, there is a >>>> =20 >>>> >>discussion=20 >> =20 >> >>>>how to handle the X server (and possibly other) 2d contexts in the >>>> =20 >>>> >>via /=20 >> =20 >> >>>>unichrome family of drivers that expects certain 2d engine register=20 >>>>values to stay the same even when other contexts or DMA commands >>>> =20 >>>> >>have=20 >> =20 >> >>>>played. >>>> >>>>Looking at the now obsolete gamma driver and ffb_context.c, some=20 >>>>register values are saved at context switches whereas in other >>>> =20 >>>> >>drivers=20 >> =20 >> >>>>this does not seem to happen. >>>> >>>>What is the common practice? That all clients always reinitialize >>>> =20 >>>> >>the=20 >> =20 >> >>>>engines every time they are used or that the drm saves the registers >>>> =20 >>>> >>>>that are commonly used by different clients as part of the context >>>> =20 >>>> >>switch? >> =20 >> >>>The common practice is to define a set of register "groups", and >>> =20 >>> >>define=20 >> =20 >> >>>a bit mask for with 1 bit per group (usually called "dirty bits").=20 >>> =20 >>> >>When=20 >> =20 >> >>>a context gets the hardware lock, it checks to see if any other >>> =20 >>> >>context=20 >> =20 >> >>>has held the lock since the last time it held it. If another context=20 >>>has, it looks at the bit mask (stored in the SAREA). Any set dirty >>> =20 >>> >>bits=20 >> =20 >> >>>mean the some other context modified some register in that group. The >>> =20 >>> >>>dirty register(s) is then reset to the value expect by the context now >>> =20 >>> >>>holding the lock. >>> =20 >>> >>Another way is what the radeon/r200 drivers do: When you grab the lock >>from someone else, *all* state is dirty. You can see an example in >>radeon_dri.c. When we grab the lock, we mark the 3d state invalid so >>that the next use of it (Render acceleration) resets it all. >> >>To be totally correct, in my opinion, the EnterServer for Radeon should >>be resetting some of the 2d state that it depends on, as well. As it >>is, it looks like if someone wanted to set things like the default >>offset in the 3d driver, they'd have to update the 2d driver to reset i= t >>when grabbing the lock, bump the DDX version, and check for that versio= n >>in the 3d driver and deal with it appropriately. >> >> =20 >> >Are there alot of registers, more then 300? If not why would they be >broken up into groups, I'm guessing each function/group only has 7 to 10 >registers. It seams like you would wast more cycles on conditional jump= s >then on just pushing the state. > > =20 > Thanks all. The register number is quite small; As long as we are=20 limited to the 2d engine, the choice is probably to let all clients=20 assume that register state is lost between HW_LOCKS. The other option=20 seems to be to let drm save the 2d engine and reload it when it is=20 "dirty" as part of the context switch. /Thomas >>--=20 >>Eric Anholt et...@lc... =20 >>http://people.freebsd.org/~anholt/ anholt@FreeBSD.org >> >> >> >> >>------------------------------------------------------- >>SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media >>100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 >>Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. >>http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 >>-- >>_______________________________________________ >>Dri-devel mailing list >>Dri...@li... >>https://lists.sourceforge.net/lists/listinfo/dri-devel >> >> =20 >> > > > > =09 >__________________________________ >Do you Yahoo!? >Yahoo! Mail Address AutoComplete - You start. We finish. >http://promotions.yahoo.com/new_mail=20 > > >------------------------------------------------------- >SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media >100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 >Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. >http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 >-- >_______________________________________________ >Dri-devel mailing list >Dri...@li... >https://lists.sourceforge.net/lists/listinfo/dri-devel > =20 > |