diff options
author | Dominik Sliwa <dominik.sliwa@toradex.com> | 2016-12-15 14:22:05 +0100 |
---|---|---|
committer | Marcel Ziswiler <marcel.ziswiler@toradex.com> | 2017-01-11 12:03:36 +0100 |
commit | 74a74be23feb5d44121f059e1ab96787be4b7532 (patch) | |
tree | fece7a2f7713323611ee79af38a34b98b8fd6446 /recipes-graphics/wayland/files/0004-use-name-based-detection-of-display-and-render-nodes.patch | |
parent | 66898c40b3772c19d8d076c4fac6324379e72629 (diff) |
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 <dominik.sliwa@toradex.com>
Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
Diffstat (limited to 'recipes-graphics/wayland/files/0004-use-name-based-detection-of-display-and-render-nodes.patch')
-rw-r--r-- | recipes-graphics/wayland/files/0004-use-name-based-detection-of-display-and-render-nodes.patch | 73 |
1 files changed, 73 insertions, 0 deletions
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 <acourbot@nvidia.com> +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 + |