[Mesa-dev] [PATCH 13/28] st/va: check if vl_*_screen_create has failed only once

Nayan Deshmukh nayan26deshmukh at gmail.com
Tue Dec 13 17:34:33 UTC 2016


Reviewed-by: Nayan Deshmukh <nayan26deshmukh at gmail.com>

On Tue, Dec 13, 2016 at 11:04 PM, Nayan Deshmukh
<nayan26deshmukh at gmail.com> wrote:
> Reviewed-by: Nayan Deshmukh <nayan26deshmukh at gmail.com>
>
>
> On Fri, Dec 9, 2016 at 1:30 AM, Emil Velikov <emil.l.velikov at gmail.com> wrote:
>> From: Emil Velikov <emil.velikov at collabora.com>
>>
>> Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
>> ---
>>  src/gallium/state_trackers/va/context.c | 7 +++----
>>  1 file changed, 3 insertions(+), 4 deletions(-)
>>
>> diff --git a/src/gallium/state_trackers/va/context.c b/src/gallium/state_trackers/va/context.c
>> index 0f18399..1ff19a8 100644
>> --- a/src/gallium/state_trackers/va/context.c
>> +++ b/src/gallium/state_trackers/va/context.c
>> @@ -126,8 +126,6 @@ VA_DRIVER_INIT_FUNC(VADriverContextP ctx)
>>  #endif
>>        if (!drv->vscreen)
>>           drv->vscreen = vl_dri2_screen_create(ctx->native_dpy, ctx->x11_screen);
>> -      if (!drv->vscreen)
>> -         goto error_screen;
>>        break;
>>     case VA_DISPLAY_WAYLAND:
>>     case VA_DISPLAY_DRM:
>> @@ -144,8 +142,6 @@ VA_DRIVER_INIT_FUNC(VADriverContextP ctx)
>>        }
>>
>>        drv->vscreen = vl_drm_screen_create(drm_info->fd);
>> -      if (!drv->vscreen)
>> -         goto error_screen;
>>        break;
>>     }
>>     default:
>> @@ -153,6 +149,9 @@ VA_DRIVER_INIT_FUNC(VADriverContextP ctx)
>>        return VA_STATUS_ERROR_INVALID_DISPLAY;
>>     }
>>
>> +   if (!drv->vscreen)
>> +      goto error_screen;
>> +
>>     drv->pipe = drv->vscreen->pscreen->context_create(drv->vscreen->pscreen,
>>                                                       drv->vscreen, 0);
>>     if (!drv->pipe)
>> --
>> 2.10.2
>>
>> _______________________________________________
>> mesa-dev mailing list
>> mesa-dev at lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list