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

Michel Dänzer michel at daenzer.net
Thu May 31 23:30:49 PDT 2012


On Fre, 2012-06-01 at 08:19 +0200, Michel Dänzer wrote: 
> 
> I think this might introduce a race condition:
> 
> Thread 0 Thread 1
> -------- --------
> atomic_inc_return() returns 1
> spin_lock_irqsave()
> atomic_dec_and_test()
> radeon_irq_set()
> 
> => the interrupt won't be enabled.

Hrmm, I messed up the formatting there, let me try one more time:

Thread 0				Thread 1
--------				--------
atomic_inc_return() returns 1
spin_lock_irqsave()
					atomic_dec_and_test()
radeon_irq_set()


-- 
Earthling Michel Dänzer           |                   http://www.amd.com
Libre software enthusiast         |          Debian, X and DRI developer



More information about the dri-devel mailing list