You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#if 0
drmDevice *devices[64];
memset(devices, 0, sizeof(*devices) * 64);
int num_devices = drmGetDevices2(0, devices, 64);
if (num_devices < 0)
return FALSE;
for (int i = 0; i < num_devices; ++i) {
drmDevice* device = devices[i];
g_debug ("init_drm: enumerated device %p, available_nodes %d",
device, device->available_nodes);
if (device->available_nodes & (1 << DRM_NODE_PRIMARY))
g_debug ("init_drm: DRM_NODE_PRIMARY: %s", device->nodes[DRM_NODE_PRIMARY]);
if (device->available_nodes & (1 << DRM_NODE_CONTROL))
g_debug ("init_drm: DRM_NODE_CONTROL: %s", device->nodes[DRM_NODE_CONTROL]);
if (device->available_nodes & (1 << DRM_NODE_RENDER))
g_debug ("init_drm: DRM_NODE_RENDER: %s", device->nodes[DRM_NODE_RENDER]);
}
for (int i = 0; i < num_devices; ++i) {
drmDevice* device = devices[i];
if (!(device->available_nodes & (1 << DRM_NODE_PRIMARY)))
continue;
drm_data.fd = open (device->nodes[DRM_NODE_PRIMARY], O_RDWR);
if (drm_data.fd < 0)
continue;
drm_data.base_resources = drmModeGetResources (drm_data.fd);
if (drm_data.base_resources) {
g_debug ("init_drm: using device %p, DRM_NODE_PRIMARY %s",
device, device->nodes[DRM_NODE_PRIMARY]);
break;
}
close (drm_data.fd);
drm_data.fd = -1;
}
drmFreeDevices(devices, num_devices);
#else
struct dlm_lease *lease = dlm_get_lease("card1-DPI-1");
drm_data.fd = dlm_lease_fd(lease);
drm_data.base_resources = drmModeGetResources (drm_data.fd);
#endif
if (!drm_data.base_resources)
return FALSE;
It works well, in a sense that it gets the drm device, detects resolution, modesettings etc. But at some point, it tries to authenticate wl_display, which fails. I find this strange as I'm running it from console with platform -P drm, so don't know where this wl_display is coming from, why it's trying to authenticate, and why it is failing. If I run it via drm directly, it succeeds.
What I'm trying to accomplish, is there a way to have video played on it's own hw plane? Without going through the gpu? and maybe without using punch hole approach too? And if using punch hole, what's the best proven approach?
I'm trying to get cog working with drm lease in stead of drm directly. For that I adapted cog-platform-drm.c, to work together with drm-lease-manager (https://gerrit.automotivelinux.org/gerrit/gitweb?p=src/drm-lease-manager.git):
It works well, in a sense that it gets the drm device, detects resolution, modesettings etc. But at some point, it tries to authenticate wl_display, which fails. I find this strange as I'm running it from console with platform -P drm, so don't know where this wl_display is coming from, why it's trying to authenticate, and why it is failing. If I run it via drm directly, it succeeds.
This is with drm:
[3083033.269] [email protected](1)
[3083033.520] -> [email protected]()
This is with a lease:
[2887550.595] [email protected](1)
[2887550.866] -> [email protected](wl_drm@5, 0, "authenticate failed")
Any help or pointer?
The text was updated successfully, but these errors were encountered: