dri2proto: Branch 'master'

Dave Airlie airlied at kemper.freedesktop.org
Fri Jul 6 07:58:54 PDT 2012


 dri2tokens.h |    5 +++++
 1 file changed, 5 insertions(+)

New commits:
commit fb9e9339876d0a7c4821f9dbea1635a43a06da01
Author: Dave Airlie <airlied at redhat.com>
Date:   Fri Jan 20 10:34:58 2012 +0000

    dri2proto: add prime protocol support. (v2.1)
    
    So we reserve bits 16->19 for offload device ids, this means we can
    have 6 offload devices, which is plenty for now, and we can bump
    this further later without fear.
    
    v2: I suck at maths, that is all. Fixed up the maths to match reality.
    v2.1: fix typo
    
    Reviewed-by: Michel Dänzer <michel.daenzer at amd.com>
    Reviewed-by: Kristian Høgsberg <krh at bitplanet.net>
    Signed-off-by: Dave Airlie <airlied at redhat.com>

diff --git a/dri2tokens.h b/dri2tokens.h
index 16c9008..bdca866 100644
--- a/dri2tokens.h
+++ b/dri2tokens.h
@@ -45,6 +45,11 @@
 #define DRI2BufferDepthStencil		9
 #define DRI2BufferHiz			10
 
+/* keep bits 16 and above for prime IDs */
+#define DRI2DriverPrimeMask             7 /* 0 - 7 - allows for 6 devices*/
+#define DRI2DriverPrimeShift           16
+#define DRI2DriverPrimeId(x)         (((x) >> DRI2DriverPrimeShift) & (DRI2DriverPrimeMask))
+
 #define DRI2DriverDRI			0
 #define DRI2DriverVDPAU			1
 


More information about the xorg-commit mailing list