On 29 October 2015 at 12:05, Christian König <deathsim...@vodafone.de> wrote: > >> + drm_info = (struct drm_state *) ctx->drm_state; >> + if (!drm_info) { >> + FREE(drv); >> + return VA_STATUS_ERROR_INVALID_PARAMETER; >> + } >> + >> +#if GALLIUM_STATIC_TARGETS >> + drm_fd = drm_info->fd; >> +#else >> + drm_fd = dup(drm_info->fd); >> +#endif >> + >> + if (drm_fd < 0) { >> + FREE(drv); >> + return VA_STATUS_ERROR_INVALID_PARAMETER; >> + } >> + >> + drv->vscreen = CALLOC_STRUCT(vl_screen); >> + if (!drv->vscreen) >> + goto error_screen; >> + >> +#if GALLIUM_STATIC_TARGETS >> + drv->vscreen->pscreen = dd_create_screen(drm_fd); >> +#else >> + if (pipe_loader_drm_probe_fd(&drv->dev, drm_fd)) >> + drv->vscreen->pscreen = pipe_loader_create_screen(drv->dev, >> PIPE_SEARCH_DIR); >> +#endif >> + >> + if (!drv->vscreen->pscreen) >> + goto error_pipe; >> + >> + } > > > It would be nice to have this snip-set in something like a vl_winsys_drm.c > if possible, but that's not a hard requirement and can happen when we > actually need this elsewhere as well. > I doubt we'll need it elsewhere any time soon, so whenever one wants to hack on something different it'll be fine :-P Although we should consider splitting out the non platform specifics out of vl_winsys_dri.c and perhaps fetching the xlib/xcb symbols via dlsym/dlopen.
> Emil any further comments? With the VA_RT_FORMAT_YUV400 handling dropped, and the VA_RT_FORMAT_RGB32 + vlVaDestroySurfaces comments in "st/va: implement VaCreateSurfaces2 and VaQuerySurfaceAttributes" the whole 9 patches look great. Fwiw Reviewed-by: Emil Velikov <emil.l.veli...@gmail.com> Thank you for sticking around and addressing with all the comments Julien ! Christian, you are definitely more authoritative person on the topic, so I'd leave the final decision up-to you. > Did you static target cleanup already land? I > would like to get at least quite a bunch of the patches upstream sooner than > later. > Most people value their sanity and haven't looked at the static target patches :( That said, none of that work is not a blocker for landing these. Cheers, Emil _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev