Commit 22a2f15f authored by Dave Airlie's avatar Dave Airlie Committed by Aaron Plattner
Browse files

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: default avatarDave Airlie <airlied@redhat.com>
Tested-by: default avatarMartin Peres <martin.peres@ensi-bourges.fr>
Tested-by: default avatarHohahiu <rakothedin@gmail.com>
Reviewed-by: default avatarAaron Plattner <aplattner@nvidia.com>
Signed-off-by: default avatarAaron Plattner <aplattner@nvidia.com>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=67283
parent e6c11e0b
......@@ -128,6 +128,20 @@ _vdp_DRI2Connect(Display * dpy, XID window, char **driverName, char **deviceName
req->dri2ReqType = X_DRI2Connect;
req->window = window;
req->driverType = DRI2DriverVDPAU;
#ifdef DRI2DriverPrimeShift
{
char *prime = getenv("DRI_PRIME");
if (prime) {
unsigned int primeid;
errno = 0;
primeid = strtoul(prime, NULL, 0);
if (errno == 0)
req->driverType |=
((primeid & DRI2DriverPrimeMask) << DRI2DriverPrimeShift);
}
}
#endif
if (!_XReply(dpy, (xReply *) & rep, 0, xFalse)) {
UnlockDisplay(dpy);
SyncHandle();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment