diff options
author | Manjukumar Matha <manjukumar.harthikote-matha@xilinx.com> | 2016-11-17 15:12:11 -0800 |
---|---|---|
committer | Nathan Rossi <nathan@nathanrossi.com> | 2016-11-18 23:18:08 +1000 |
commit | 6f4fe6d8cdd97cc5b55c40472140d70267fff5a6 (patch) | |
tree | 8fc76dee400611f39d8dd03bad30f8452f02de63 | |
parent | 83dd3c8441009638873a9b18d19fd342d54a5fae (diff) | |
download | meta-xilinx-6f4fe6d8cdd97cc5b55c40472140d70267fff5a6.tar.gz |
xf86-video-armsoc_git.bb:Add armsoc display driver
This patch adds Xilinx ARM SOC displat driver for ZU+ boards
Signed-off-by: Manjukumar Matha <manjukumar.harthikote-matha@xilinx.com>
Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
3 files changed, 140 insertions, 0 deletions
diff --git a/recipes-graphics/xorg-driver/xf86-video-armsoc/0001-src-drmmode_xilinx-Add-the-dumb-gem-support-for-Xili.patch b/recipes-graphics/xorg-driver/xf86-video-armsoc/0001-src-drmmode_xilinx-Add-the-dumb-gem-support-for-Xili.patch new file mode 100644 index 00000000..c99392e3 --- /dev/null +++ b/recipes-graphics/xorg-driver/xf86-video-armsoc/0001-src-drmmode_xilinx-Add-the-dumb-gem-support-for-Xili.patch | |||
@@ -0,0 +1,100 @@ | |||
1 | From 622db2862220b8fc2ae56e9caceac70cbb0c15ce Mon Sep 17 00:00:00 2001 | ||
2 | From: Hyun Kwon <hyun.kwon@xilinx.com> | ||
3 | Date: Wed, 21 Jan 2015 11:53:19 -0800 | ||
4 | Subject: [PATCH 1/1] src: drmmode_xilinx: Add the dumb gem support for Xilinx | ||
5 | |||
6 | Add the dumb gem support for Xilinx | ||
7 | Upstream-Status: Pending | ||
8 | --- | ||
9 | src/drmmode_xilinx/drmmode_xilinx.c | 80 +++++++++++++++++++++++++++++++++++++ | ||
10 | 1 file changed, 80 insertions(+) | ||
11 | create mode 100644 src/drmmode_xilinx/drmmode_xilinx.c | ||
12 | |||
13 | diff --git a/src/drmmode_xilinx/drmmode_xilinx.c b/src/drmmode_xilinx/drmmode_xilinx.c | ||
14 | new file mode 100644 | ||
15 | index 0000000..2cd4e35 | ||
16 | --- /dev/null | ||
17 | +++ b/src/drmmode_xilinx/drmmode_xilinx.c | ||
18 | @@ -0,0 +1,80 @@ | ||
19 | +/* | ||
20 | + * Xilinx X11 ARMSOC driver | ||
21 | + * | ||
22 | + * Author: Hyun Woo Kwon <hyun.kwon@xilinx.com> | ||
23 | + * | ||
24 | + * Copyright (C) 2014 Xilinx, Inc. | ||
25 | + * | ||
26 | + * Based on drmmode_exynos.c | ||
27 | + * | ||
28 | + * Copyright © 2013 ARM Limited. | ||
29 | + * | ||
30 | + * Permission is hereby granted, free of charge, to any person obtaining a | ||
31 | + * copy of this software and associated documentation files (the "Software"), | ||
32 | + * to deal in the Software without restriction, including without limitation | ||
33 | + * the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||
34 | + * and/or sell copies of the Software, and to permit persons to whom the | ||
35 | + * Software is furnished to do so, subject to the following conditions: | ||
36 | + * | ||
37 | + * The above copyright notice and this permission notice (including the next | ||
38 | + * paragraph) shall be included in all copies or substantial portions of the | ||
39 | + * Software. | ||
40 | + * | ||
41 | + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
42 | + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
43 | + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
44 | + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
45 | + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
46 | + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
47 | + * SOFTWARE. | ||
48 | + * | ||
49 | + */ | ||
50 | + | ||
51 | +#include <stdlib.h> | ||
52 | + | ||
53 | +#include <drm.h> | ||
54 | +#include <xf86drm.h> | ||
55 | + | ||
56 | +#include "../drmmode_driver.h" | ||
57 | + | ||
58 | +static int create_custom_gem(int fd, struct armsoc_create_gem *create_gem) | ||
59 | +{ | ||
60 | + struct drm_mode_create_dumb arg; | ||
61 | + int ret; | ||
62 | + | ||
63 | + memset(&arg, 0, sizeof(arg)); | ||
64 | + arg.height = create_gem->height; | ||
65 | + arg.width = create_gem->width; | ||
66 | + arg.bpp = create_gem->bpp; | ||
67 | + | ||
68 | + ret = drmIoctl(fd, DRM_IOCTL_MODE_CREATE_DUMB, &arg); | ||
69 | + if (ret) | ||
70 | + return ret; | ||
71 | + | ||
72 | + create_gem->height = arg.height; | ||
73 | + create_gem->width = arg.width; | ||
74 | + create_gem->bpp = arg.bpp; | ||
75 | + create_gem->handle = arg.handle; | ||
76 | + create_gem->pitch = arg.pitch; | ||
77 | + create_gem->size = arg.size; | ||
78 | + | ||
79 | + return 0; | ||
80 | +} | ||
81 | + | ||
82 | +struct drmmode_interface xilinx_interface = { | ||
83 | + 1 /* use_page_flip_events */, | ||
84 | + 1 /* use_early_display */, | ||
85 | + 0 /* cursor width */, | ||
86 | + 0 /* cursor_height */, | ||
87 | + 0 /* cursor padding */, | ||
88 | + HWCURSOR_API_NONE /* cursor_api */, | ||
89 | + NULL /* init_plane_for_cursor */, | ||
90 | + 0 /* vblank_query_supported */, | ||
91 | + create_custom_gem /* create_custom_gem */, | ||
92 | +}; | ||
93 | + | ||
94 | +struct drmmode_interface *drmmode_interface_get_implementation(int drm_fd) | ||
95 | +{ | ||
96 | + return &xilinx_interface; | ||
97 | +} | ||
98 | + | ||
99 | -- | ||
100 | 2.1.4 | ||
diff --git a/recipes-graphics/xorg-driver/xf86-video-armsoc/0002-enable-subdir-objects.patch b/recipes-graphics/xorg-driver/xf86-video-armsoc/0002-enable-subdir-objects.patch new file mode 100644 index 00000000..a8015ab8 --- /dev/null +++ b/recipes-graphics/xorg-driver/xf86-video-armsoc/0002-enable-subdir-objects.patch | |||
@@ -0,0 +1,16 @@ | |||
1 | Add foreign for automake | ||
2 | Upstream-Status: Pending | ||
3 | --- | ||
4 | diff --git a/configure.ac b/configure.ac | ||
5 | index eeffd92..88473a3 100644 | ||
6 | --- a/configure.ac | ||
7 | +++ b/configure.ac | ||
8 | @@ -32,7 +32,7 @@ AC_CONFIG_HEADERS([config.h]) | ||
9 | AC_CONFIG_AUX_DIR(.) | ||
10 | AC_CONFIG_MACRO_DIR([m4]) | ||
11 | |||
12 | -AM_INIT_AUTOMAKE([dist-bzip2]) | ||
13 | +AM_INIT_AUTOMAKE([dist-bzip2 foreign subdir-objects]) | ||
14 | |||
15 | AM_MAINTAINER_MODE | ||
16 | |||
diff --git a/recipes-graphics/xorg-driver/xf86-video-armsoc_git.bb b/recipes-graphics/xorg-driver/xf86-video-armsoc_git.bb new file mode 100644 index 00000000..1186d948 --- /dev/null +++ b/recipes-graphics/xorg-driver/xf86-video-armsoc_git.bb | |||
@@ -0,0 +1,24 @@ | |||
1 | require recipes-graphics/xorg-driver/xorg-driver-video.inc | ||
2 | |||
3 | SUMMARY = "X.Org X server -- Xilinx ARM SOC display driver" | ||
4 | DESCRIPTION = "Xilinx ARM SOC display driver " | ||
5 | |||
6 | LICENSE = "MIT-X & GPLv2+" | ||
7 | LIC_FILES_CHKSUM = "file://COPYING;md5=10ce5de3b111315ea652a5f74ec0c602" | ||
8 | |||
9 | DEPENDS += "libx11 libdrm xf86driproto" | ||
10 | RDEPENDS_${PN} += "xserver-xorg-module-exa" | ||
11 | |||
12 | PV = "1.3.0+git${SRCPV}" | ||
13 | |||
14 | SRCREV_pn-${PN} = "8ca8513880697f9a34d4006c43342b830bdd1ff2" | ||
15 | SRC_URI = " \ | ||
16 | git://anongit.freedesktop.org/xorg/driver/xf86-video-armsoc \ | ||
17 | file://0001-src-drmmode_xilinx-Add-the-dumb-gem-support-for-Xili.patch \ | ||
18 | file://0002-enable-subdir-objects.patch \ | ||
19 | " | ||
20 | |||
21 | S = "${WORKDIR}/git" | ||
22 | |||
23 | EXTRA_OECONF = " --enable-maintainer-mode --with-drmmode=xilinx" | ||
24 | CFLAGS += " -I${STAGING_INCDIR}/xorg " | ||