init_config: remove unused local variable 'ret'

Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Don't leak the vdpau_wrapper.cfg file pointer

init_config opens vdpau_wrapper.cfg and reads its contents, but never closes it.
This causes a file descriptor leak if libvdpau is unloaded and reloaded.

Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Reviewed-by: Andy Ritger <aritger@nvidia.com>
Reviewed-by: Josep Torra <josep@fluendo.com>
vdpau: add prime support at connection setup

This just ports the code from the mesa glx setup into vdpau,
this just picks the correct driver to load on the client side,

at least for gallium/vl code we need another similiar change
inside the driver code to pick the correct drm device.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Tested-by: Martin Peres <martin.peres@ensi-bourges.fr>
Tested-by: Hohahiu <rakothedin@gmail.com>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=67283