[PATCH] dri2: SourceOffloads may be for DRI3 only

David Airlie airlied at redhat.com
Sun Jan 18 14:00:30 PST 2015



----- Original Message -----
> From: "Chris Wilson" <chris at chris-wilson.co.uk>
> To: xorg-devel at lists.x.org
> Cc: "Chris Wilson" <chris at chris-wilson.co.uk>, "Ilia Mirkin" <imirkin at alum.mit.edu>, "Dave Airlie"
> <airlied at redhat.com>
> Sent: Saturday, 17 January, 2015 8:09:54 PM
> Subject: [PATCH] dri2: SourceOffloads may be for DRI3 only
> 
> As a DDX may declare offload support without supporting DRI2
> (because it is using an alternative acceleration mechanism like DRI3),
> when iterating the list of offload_source Screens to find a matching
> DRI2 provider we need to check before assuming it is DRI2 capable.
> 
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=88514
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> Cc: Ilia Mirkin <imirkin at alum.mit.edu>
> Cc: Dave Airlie <airlied at redhat.com>

Reviewed-by: Dave Airlie <airlied at redhat.com>
> ---
>  hw/xfree86/dri2/dri2.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/hw/xfree86/dri2/dri2.c b/hw/xfree86/dri2/dri2.c
> index 8b94b8f..e048224 100644
> --- a/hw/xfree86/dri2/dri2.c
> +++ b/hw/xfree86/dri2/dri2.c
> @@ -158,6 +158,9 @@ GetScreenPrime(ScreenPtr master, int prime_id)
>          DRI2ScreenPtr ds;
>  
>          ds = DRI2GetScreen(slave);
> +        if (ds == NULL)
> +            continue;
> +
>          if (ds->prime_id == prime_id)
>              return slave;
>      }
> --
> 2.1.4
> 
> 


More information about the xorg-devel mailing list