From 74a74be23feb5d44121f059e1ab96787be4b7532 Mon Sep 17 00:00:00 2001 From: Dominik Sliwa Date: Thu, 15 Dec 2016 14:22:05 +0100 Subject: apalis-tk1: Mainline kernel machine This patch adds mainline linux based Apalis TK1 machine. It includes compatible recipes for libdrm, mesa, Xorg, and weston. Signed-off-by: Dominik Sliwa Acked-by: Max Krummenacher --- ...sed-detection-of-display-and-render-nodes.patch | 73 ++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 recipes-graphics/wayland/files/0004-use-name-based-detection-of-display-and-render-nodes.patch (limited to 'recipes-graphics/wayland/files/0004-use-name-based-detection-of-display-and-render-nodes.patch') diff --git a/recipes-graphics/wayland/files/0004-use-name-based-detection-of-display-and-render-nodes.patch b/recipes-graphics/wayland/files/0004-use-name-based-detection-of-display-and-render-nodes.patch new file mode 100644 index 0000000..a5969ab --- /dev/null +++ b/recipes-graphics/wayland/files/0004-use-name-based-detection-of-display-and-render-nodes.patch @@ -0,0 +1,73 @@ +From 6c8d3da72fabd2a915e18dbf9fb65b7c1134d65d Mon Sep 17 00:00:00 2001 +From: Alexandre Courbot +Date: Fri, 9 Sep 2016 15:06:27 +0900 +Subject: [PATCH 4/6] use name-based detection of display and render nodes + +The previous detection scheme assumed that the graphics nodes were under +"soc0". This is no longer true for Jetson TX1. Instead, assume that +card0 is the display node, and card1 the render one. +--- + src/compositor-drm.c | 39 ++++++++------------------------------- + 1 file changed, 8 insertions(+), 31 deletions(-) + +diff --git a/src/compositor-drm.c b/src/compositor-drm.c +index 17ba640..214fc41 100644 +--- a/src/compositor-drm.c ++++ b/src/compositor-drm.c +@@ -2871,7 +2871,7 @@ find_primary_gpu(struct drm_backend *b, const char *seat) + struct udev_enumerate *e; + struct udev_list_entry *entry; + const char *path, *device_seat, *id; +- struct udev_device *device, *drm_device, *pci, *soc = NULL; ++ struct udev_device *device, *drm_device, *pci; + + e = udev_enumerate_new(b->udev); + udev_enumerate_add_match_subsystem(e, "drm"); +@@ -2904,37 +2904,14 @@ find_primary_gpu(struct drm_backend *b, const char *seat) + break; + } + } else { +- soc = udev_device_get_parent_with_subsystem_devtype( +- device, +- "soc", +- NULL); +- if (soc) { +- id = udev_device_get_sysattr_value(soc, +- "family"); +- if (id && !strcmp(id, "Tegra")) { +- if (drm_device) { +- /* Previously have found the +- * drm device, use this device +- * as the GBM device +- */ +- if (udev_device_get_devnode( +- device)) { +- b->gbm.filename = strdup( +- udev_device_get_devnode(device)); +- break; +- } +- continue; +- } +- drm_device = device; +- continue; +- } +- } ++ id = udev_device_get_sysname(device); ++ if (!strcmp(id, "card0")) ++ drm_device = device; ++ else if (!strcmp(id, "card1")) ++ b->gbm.filename = strdup(udev_device_get_devnode(device)); ++ else ++ udev_device_unref(device); + } +- +- if (!drm_device) +- drm_device = device; +- else +- udev_device_unref(device); + } + + udev_enumerate_unref(e); +-- +2.9.3 + -- cgit v1.2.3