summaryrefslogtreecommitdiff
path: root/recipes-graphics/drm/files/0001-sync-kernel-UAPI.patch
diff options
context:
space:
mode:
authorDominik Sliwa <dominik.sliwa@toradex.com>2016-12-15 14:22:05 +0100
committerMarcel Ziswiler <marcel.ziswiler@toradex.com>2017-01-11 12:03:36 +0100
commit74a74be23feb5d44121f059e1ab96787be4b7532 (patch)
treefece7a2f7713323611ee79af38a34b98b8fd6446 /recipes-graphics/drm/files/0001-sync-kernel-UAPI.patch
parent66898c40b3772c19d8d076c4fac6324379e72629 (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/drm/files/0001-sync-kernel-UAPI.patch')
-rw-r--r--recipes-graphics/drm/files/0001-sync-kernel-UAPI.patch51
1 files changed, 51 insertions, 0 deletions
diff --git a/recipes-graphics/drm/files/0001-sync-kernel-UAPI.patch b/recipes-graphics/drm/files/0001-sync-kernel-UAPI.patch
new file mode 100644
index 0000000..19e69aa
--- /dev/null
+++ b/recipes-graphics/drm/files/0001-sync-kernel-UAPI.patch
@@ -0,0 +1,51 @@
+From 9bfdb183a7c50266caa97e5fcbabeaf54db6c2a1 Mon Sep 17 00:00:00 2001
+From: Alexandre Courbot <acourbot@nvidia.com>
+Date: Tue, 20 Sep 2016 11:33:51 +0900
+Subject: [PATCH] sync kernel UAPI
+
+---
+ include/drm/drm_fourcc.h | 23 +++++++++++++++++++++++
+ 1 file changed, 23 insertions(+)
+
+diff --git a/include/drm/drm_fourcc.h b/include/drm/drm_fourcc.h
+index 4d8da69..7fed8a2 100644
+--- a/include/drm/drm_fourcc.h
++++ b/include/drm/drm_fourcc.h
+@@ -26,6 +26,10 @@
+
+ #include "drm.h"
+
++#if defined(__cplusplus)
++extern "C" {
++#endif
++
+ #define fourcc_code(a, b, c, d) ((__u32)(a) | ((__u32)(b) << 8) | \
+ ((__u32)(c) << 16) | ((__u32)(d) << 24))
+
+@@ -229,4 +233,23 @@
+ */
+ #define DRM_FORMAT_MOD_SAMSUNG_64_32_TILE fourcc_mod_code(SAMSUNG, 1)
+
++
++/* NVIDIA Frame buffer modifiers */
++
++#define NV_FORMAT_MOD_TEGRA_SHIFT 32
++
++#define NV_FORMAT_MOD_TEGRA_TILED \
++ fourcc_mod_code(NV, 1ULL << NV_FORMAT_MOD_TEGRA_SHIFT)
++
++#define NV_FORMAT_MOD_TEGRA_BLOCK_MASK \
++ fourcc_mod_code(NV, 2ULL << NV_FORMAT_MOD_TEGRA_SHIFT)
++#define NV_FORMAT_MOD_TEGRA_BLOCK_VALUE(m) \
++ (m & ((1ULL << NV_FORMAT_MOD_TEGRA_SHIFT) - 1))
++#define NV_FORMAT_MOD_TEGRA_BLOCK(v) \
++ (NV_FORMAT_MOD_TEGRA_BLOCK_MASK | NV_FORMAT_MOD_TEGRA_BLOCK_VALUE(v))
++
++#if defined(__cplusplus)
++}
++#endif
++
+ #endif /* DRM_FOURCC_H */
+--
+2.9.3
+