From: Keith W. <ke...@tu...> - 2003-02-09 01:23:36
|
Michel D=E4nzer wrote: > On Sam, 2003-02-08 at 18:56, Michel D=E4nzer wrote: >=20 >>On Sam, 2003-02-08 at 18:45, Charl P. Botha wrote: >> >>>On Sat, Feb 08, 2003 at 06:24:28PM +0100, Felix K=FChling wrote: >>> >>>>Found it. DRIVER_RELEASE in radeon.h has to call radeon_reclaim_buffe= rs >>>>as the drm_drv.h template seems to expect DRIVER_RELEASE to handle th= is. >>>>DRIVER_RELEASE in i810.h does this too. The (1 line) patch is attache= d. >>> >>>Thanks for fixing yet another one Felix! =20 >> >>Indeed, keep up the good work! :) >> >> >>>Should this not be forwarded to de...@xf... or fi...@xf... >>>as well? >> >>It should get picked up from the mesa-4-0-4-branch, where I'll commit i= t >>shortly, as well as to the trunk. >=20 >=20 > Hmm, moving this to mesa-4-0-4-branch is trickier than I thought. Here'= s > a quick'n'dirty merge, but maybe we want to move over more of Keith's > recent work in this area? Keith? >=20 >=20 >=20 >=20 > -----------------------------------------------------------------------= - >=20 > Index: radeon.h > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > RCS file: /cvsroot/dri/xc/xc/programs/Xserver/hw/xfree86/os-support/sha= red/drm/kernel/radeon.h,v > retrieving revision 1.8 > diff -p -u -r1.8 radeon.h > --- radeon.h 28 Oct 2002 19:05:37 -0000 1.8 > +++ radeon.h 8 Feb 2003 18:35:23 -0000 > @@ -114,8 +114,6 @@ > /* When a client dies: > * - Check for and clean up flipped page state > * - Free any alloced agp memory. > - * > - * DRM infrastructure takes care of reclaiming dma buffers. > */ > #define DRIVER_PRERELEASE() do { \ > if ( dev->dev_private ) { \ > @@ -125,6 +123,14 @@ > } \ > radeon_mem_release( dev_priv->agp_heap ); \ > } \ > +} while (0) > + > +/* Reclaim DMA buffers when a client dies > + */ > +#define __HAVE_RELEASE 1 > +#define DRIVER_RELEASE() \ > +do { \ > + DRM(reclaim_buffers)( dev, priv->pid ); \ > } while (0) > =20 > /* On unloading the module: Actually if __HAVE_RELEASE isn't defined, the driver on that branch shoul= d=20 already be doing the right thing... The trouble is if you define=20 __HAVE_RELEASE, the templates no longer do the DRM(reclaim_buffers) thing= for=20 you -- I didn't realize this, and Felix has located my error. However th= e=20 version in the mesa-4-0-4 branch should (I think) work fine without the c= hange. Keith |