[PATCH] dri2proto: add prime protocol support. (v2.1)
Kristian Høgsberg
krh at bitplanet.net
Fri Jul 6 06:32:21 PDT 2012
On Fri, Jul 6, 2012 at 6:27 AM, Dave Airlie <airlied at gmail.com> wrote:
> From: Dave Airlie <airlied at redhat.com>
>
> 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
Looks fine to me. Is there a version bump that goes along with this
so drivers can know they can ask for prime devices or should they just
try and expect a NULL reply if it's not available?
Reviewed-by: Kristian Høgsberg <krh at bitplanet.net>
> Signed-off-by: Dave Airlie <airlied at redhat.com>
> ---
> dri2tokens.h | 5 +++++
> 1 file changed, 5 insertions(+)
>
> 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
>
> --
> 1.7.10.2
>
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: http://lists.x.org/mailman/listinfo/xorg-devel
More information about the xorg-devel
mailing list