mirror of
https://github.com/jojo61/vdr-plugin-softhdcuvid.git
synced 2023-10-10 13:37:41 +02:00
No root for softhddrm needed anymore
This commit is contained in:
parent
3578e3212d
commit
cb466dd894
22
drm.c
22
drm.c
@ -240,7 +240,27 @@ static int FindDevice(VideoRender * render)
|
|||||||
fprintf(stderr, "FindDevice: cannot open /dev/dri/card0: %m\n");
|
fprintf(stderr, "FindDevice: cannot open /dev/dri/card0: %m\n");
|
||||||
return -errno;
|
return -errno;
|
||||||
}
|
}
|
||||||
drmSetMaster(render->fd_drm);
|
|
||||||
|
int ret = drmSetMaster(render->fd_drm);
|
||||||
|
|
||||||
|
if (ret < 0)
|
||||||
|
{
|
||||||
|
drm_magic_t magic;
|
||||||
|
|
||||||
|
ret = drmGetMagic(render->fd_drm, &magic);
|
||||||
|
if (ret < 0)
|
||||||
|
{
|
||||||
|
Debug(3, "drm:%s - failed to get drm magic: %s\n", __FUNCTION__, strerror(errno));
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
ret = drmAuthMagic(render->fd_drm, magic);
|
||||||
|
if (ret < 0)
|
||||||
|
{
|
||||||
|
Debug(3, "drm:%s - failed to authorize drm magic: %s\n", __FUNCTION__, strerror(errno));
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
version = drmGetVersion(render->fd_drm);
|
version = drmGetVersion(render->fd_drm);
|
||||||
fprintf(stderr, "FindDevice: open /dev/dri/card0: %s\n", version->name);
|
fprintf(stderr, "FindDevice: open /dev/dri/card0: %s\n", version->name);
|
||||||
|
Loading…
Reference in New Issue
Block a user