[PATCH 08/10] drm/radeon: replace pflip and sw_int counters with atomics

Koenig, Christian Christian.Koenig at amd.com
Thu May 24 05:29:42 PDT 2012


> -----Original Message-----
> From: Sylvain BERTRAND [mailto:sylware at legeek.net]
> Sent: Thursday, May 24, 2012 1:59 PM
> To: Christian König
> Cc: j.glisse at gmail.com; Koenig, Christian; dri-devel at lists.freedesktop.org
> Subject: Re: [PATCH 08/10] drm/radeon: replace pflip and sw_int counters
> with atomics
> 
> > +	atomic_t			ring_int[RADEON_NUM_RINGS];
> >  	bool
> 	crtc_vblank_int[RADEON_MAX_CRTCS];
> > -	bool				pflip[RADEON_MAX_CRTCS];
> > -	int
> 	pflip_refcount[RADEON_MAX_CRTCS];
> > +	atomic_t			pflip[RADEON_MAX_CRTCS];
> 
> Hi,
> 
> Does the linux API mandates atomic_t to be a 32bits word?

AFAIK it is, at least for the platforms we care about. But since this depends on the vertical refresh frequency even a 8bit counter should do fine.

On the other hand it was an accident that those patches hit the maillinglist in the first place, cause only the first four where supposed to be send out (my fault, sorry). This one isn't tested beside compiling, and I don't think it will work out of the box.

Cheers,
Christian.



More information about the dri-devel mailing list