[meta-xilinx] [RFC] xf86-video-armsoc_git.bb: Add xf86-video-armsoc

Manjukumar Matha manjukumar.harthikote-matha at xilinx.com
Mon May 2 18:30:20 PDT 2016


This patch adds support Xilinx ARM SOC display driver X server support
 - Custom xorg config files for KB and Mouse
 - X11 ARMSOC driver support

Signed-off-by: Manjukumar Matha <manjukumar.harthikote-matha at xilinx.com>
---
 ..._xilinx-Add-the-dumb-gem-support-for-Xili.patch | 99 ++++++++++++++++++++++
 .../0002-enable-subdir-objects.patch               | 13 +++
 .../xorg-driver/xf86-video-armsoc/10-input.conf    | 11 +++
 .../xorg-driver/xf86-video-armsoc/20-zynqmp.conf   | 15 ++++
 .../xorg-driver/xf86-video-armsoc_git.bb           | 32 +++++++
 5 files changed, 170 insertions(+)
 create mode 100644 recipes-graphics/xorg-driver/xf86-video-armsoc/0001-src-drmmode_xilinx-Add-the-dumb-gem-support-for-Xili.patch
 create mode 100644 recipes-graphics/xorg-driver/xf86-video-armsoc/0002-enable-subdir-objects.patch
 create mode 100644 recipes-graphics/xorg-driver/xf86-video-armsoc/10-input.conf
 create mode 100644 recipes-graphics/xorg-driver/xf86-video-armsoc/20-zynqmp.conf
 create mode 100644 recipes-graphics/xorg-driver/xf86-video-armsoc_git.bb

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 0000000..0d8bb5c
--- /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,99 @@
+From 622db2862220b8fc2ae56e9caceac70cbb0c15ce Mon Sep 17 00:00:00 2001
+From: Hyun Kwon <hyun.kwon at xilinx.com>
+Date: Wed, 21 Jan 2015 11:53:19 -0800
+Subject: [PATCH 1/1] src: drmmode_xilinx: Add the dumb gem support for Xilinx
+
+Add the dumb gem support for Xilinx
+---
+ src/drmmode_xilinx/drmmode_xilinx.c | 80 +++++++++++++++++++++++++++++++++++++
+ 1 file changed, 80 insertions(+)
+ create mode 100644 src/drmmode_xilinx/drmmode_xilinx.c
+
+diff --git a/src/drmmode_xilinx/drmmode_xilinx.c b/src/drmmode_xilinx/drmmode_xilinx.c
+new file mode 100644
+index 0000000..2cd4e35
+--- /dev/null
++++ b/src/drmmode_xilinx/drmmode_xilinx.c
+@@ -0,0 +1,80 @@
++/*
++ * Xilinx X11 ARMSOC driver
++ *
++ * Author: Hyun Woo Kwon <hyun.kwon at xilinx.com>
++ *
++ * Copyright (C) 2014 Xilinx, Inc.
++ *
++ * Based on drmmode_exynos.c
++ *
++ * Copyright © 2013 ARM Limited.
++ *
++ * Permission is hereby granted, free of charge, to any person obtaining a
++ * copy of this software and associated documentation files (the "Software"),
++ * to deal in the Software without restriction, including without limitation
++ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
++ * and/or sell copies of the Software, and to permit persons to whom the
++ * Software is furnished to do so, subject to the following conditions:
++ *
++ * The above copyright notice and this permission notice (including the next
++ * paragraph) shall be included in all copies or substantial portions of the
++ * Software.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
++ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
++ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
++ * SOFTWARE.
++ *
++ */
++
++#include <stdlib.h>
++
++#include <drm.h>
++#include <xf86drm.h>
++
++#include "../drmmode_driver.h"
++
++static int create_custom_gem(int fd, struct armsoc_create_gem *create_gem)
++{
++	struct drm_mode_create_dumb arg;
++	int ret;
++
++	memset(&arg, 0, sizeof(arg));
++	arg.height = create_gem->height;
++	arg.width = create_gem->width;
++	arg.bpp = create_gem->bpp;
++
++	ret = drmIoctl(fd, DRM_IOCTL_MODE_CREATE_DUMB, &arg);
++	if (ret)
++		return ret;
++
++	create_gem->height = arg.height;
++	create_gem->width = arg.width;
++	create_gem->bpp = arg.bpp;
++	create_gem->handle = arg.handle;
++	create_gem->pitch = arg.pitch;
++	create_gem->size = arg.size;
++
++	return 0;
++}
++
++struct drmmode_interface xilinx_interface = {
++	1                     /* use_page_flip_events */,
++	1                     /* use_early_display */,
++	0                     /* cursor width */,
++	0                     /* cursor_height */,
++	0                     /* cursor padding */,
++	HWCURSOR_API_NONE     /* cursor_api */,
++	NULL                  /* init_plane_for_cursor */,
++	0                     /* vblank_query_supported */,
++	create_custom_gem     /* create_custom_gem */,
++};
++
++struct drmmode_interface *drmmode_interface_get_implementation(int drm_fd)
++{
++	return &xilinx_interface;
++}
++
+-- 
+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 0000000..12815a0
--- /dev/null
+++ b/recipes-graphics/xorg-driver/xf86-video-armsoc/0002-enable-subdir-objects.patch
@@ -0,0 +1,13 @@
+diff --git a/configure.ac b/configure.ac
+index eeffd92..88473a3 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -32,7 +32,7 @@ AC_CONFIG_HEADERS([config.h])
+ AC_CONFIG_AUX_DIR(.)
+ AC_CONFIG_MACRO_DIR([m4])
+ 
+-AM_INIT_AUTOMAKE([dist-bzip2])
++AM_INIT_AUTOMAKE([dist-bzip2 foreign subdir-objects])
+ 
+ AM_MAINTAINER_MODE
+ 
diff --git a/recipes-graphics/xorg-driver/xf86-video-armsoc/10-input.conf b/recipes-graphics/xorg-driver/xf86-video-armsoc/10-input.conf
new file mode 100644
index 0000000..0c9d90f
--- /dev/null
+++ b/recipes-graphics/xorg-driver/xf86-video-armsoc/10-input.conf
@@ -0,0 +1,11 @@
+Section "InputDevice"
+	Identifier	"System Mouse"
+	Driver		"mouse"
+	Option		"Device" "/dev/input/mouse0"
+EndSection
+
+Section "InputDevice"
+	Identifier	"System Keyboard"
+	Driver		"kbd"
+	Option		"Device" "/dev/input/event0"
+EndSection
diff --git a/recipes-graphics/xorg-driver/xf86-video-armsoc/20-zynqmp.conf b/recipes-graphics/xorg-driver/xf86-video-armsoc/20-zynqmp.conf
new file mode 100644
index 0000000..5300283
--- /dev/null
+++ b/recipes-graphics/xorg-driver/xf86-video-armsoc/20-zynqmp.conf
@@ -0,0 +1,15 @@
+Section "Device"
+        Identifier      "ZynqMP"
+        Driver          "armsoc"
+        Option          "DRI2"                  "true"
+        Option          "DRI2_PAGE_FLIP"        "false"
+        Option          "DRI2_WAIT_VSYNC"       "true"
+        Option          "SWcursorLCD"           "false"
+        Option          "DEBUG"                 "false"
+EndSection
+
+Section "Screen"
+        Identifier      "DefaultScreen"
+        Device          "ZynqMP"
+        DefaultDepth    16
+EndSection
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 0000000..fa3ee02
--- /dev/null
+++ b/recipes-graphics/xorg-driver/xf86-video-armsoc_git.bb
@@ -0,0 +1,32 @@
+require recipes-graphics/xorg-driver/xorg-driver-video.inc
+
+SUMMARY = "X.Org X server -- Xilinx ARM SOC display driver"
+DESCRIPTION = "Xilinx ARM SOC display driver "
+
+LICENSE = "MIT-X & GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=10ce5de3b111315ea652a5f74ec0c602"
+
+DEPENDS += "libx11 libdrm xf86driproto"
+RDEPENDS_${PN} += "xserver-xorg-module-exa"
+
+PV = "1.3.0+git${SRCPV}"
+
+SRCREV_pn-${PN} = "8ca8513880697f9a34d4006c43342b830bdd1ff2"
+SRC_URI = " \
+	git://anongit.freedesktop.org/xorg/driver/xf86-video-armsoc \
+	file://0001-src-drmmode_xilinx-Add-the-dumb-gem-support-for-Xili.patch \
+	file://0002-enable-subdir-objects.patch \
+	file://10-input.conf \
+	file://20-zynqmp.conf \
+	"
+
+S = "${WORKDIR}/git"
+
+EXTRA_OECONF = " --enable-maintainer-mode --with-drmmode=xilinx"
+CFLAGS += " -I${STAGING_INCDIR}/xorg "
+
+do_install_append() {
+	install -d ${D}/etc/X11/xorg.conf.d
+	install -m 0644 ${WORKDIR}/10-input.conf ${D}/etc/X11/xorg.conf.d
+	install -m 0644 ${WORKDIR}/20-zynqmp.conf ${D}/etc/X11/xorg.conf.d
+}
-- 
2.1.4




More information about the meta-xilinx mailing list