Re: [RFC libdrm] Use __sync_val_compare_and_swap to implement DRM_CAS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Don, 2010-10-28 at 19:59 -0400, Matt Turner wrote: 
> Can we use gcc's __sync_val_compare_and_swap to implement DRM_CAS?
> (If so, do we actually need the __sync_val version, or can we use
> __sync_bool?)
> 
> I just threw the patch together in two minutes, so I've got no idea
> if it's right, just looking for feedback. The purpose of this is to
> remove a lot of inline assembly that hasn't been touched since the
> file was added in 2004, including some awesome already-assembled
> SPARC instructions.

Given that DRM_CAS is part of a kernel<->userspace ABI and is only used
for the DRI1 'hardware lock', I suspect this is more risky than it's
worth. At the least though, it would need to be verified for each
architecture which has a specific DRM_CAS implementation now that this
change doesn't result in DRM_CAS always failing and the HW lock falling
back to calling the slow path ioctl every time.


-- 
Earthling Michel DÃnzer           |                http://www.vmware.com
Libre software enthusiast         |          Debian, X and DRI developer
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux