On 21/01/2021 21:34, Chris Wilson wrote:
Quoting Tvrtko Ursulin (2021-01-21 18:10:05)
+static struct clients *init_clients(const char *drm_card)
+{
+       struct clients *clients = malloc(sizeof(*clients));
+       const char *slash;
+       ssize_t ret;
+
+       memset(clients, 0, sizeof(*clients));
+
+       if (drm_card) {
+               slash = rindex(drm_card, '/');
+               assert(slash);
+       } else {
+               slash = "card0";
+       }
+
+       ret = snprintf(clients->sysfs_root, sizeof(clients->sysfs_root),
+                      "/sys/class/drm/%s/clients/", slash);
+       assert(ret > 0 && ret < sizeof(clients->sysfs_root));

Afaict, igt_device_card_match_pci et al are not guaranteed to fill in
dev->drm_card and may leave it blank instead of finding the
corresponding /dev/dri/cardN.

I did the rest but this is giving me trouble - can't see locally that it doesn't populate it. Do you know how to trigger that?

Regards,

Tvrtko
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to