diff --git a/packages/extras-buildpkgs/07-xf86-video-armsoc.conf b/packages/extras-buildpkgs/07-xf86-video-armsoc.conf new file mode 100644 index 0000000000..db40cc2234 --- /dev/null +++ b/packages/extras-buildpkgs/07-xf86-video-armsoc.conf @@ -0,0 +1,19 @@ +# xf86-video-armsoc +local package_name="xf86-video-armsoc" +local package_repo="https://anongit.freedesktop.org/git/xorg/driver/xf86-video-armsoc.git" +local package_ref="tag:1.4.1" +local package_builddeps="quilt dh-autoreconf libdrm-dev libudev-dev libxext-dev pkg-config x11proto-core-dev x11proto-fonts-dev x11proto-gl-dev x11proto-xf86dri-dev xutils-dev xserver-xorg-dev" +local package_install_target="xserver-xorg-video-armsoc" +local package_component="${release}-desktop" + +package_checkbuild() +{ + true +} + +package_checkinstall() +{ + # TODO: enable installing this after testing and updating the repository + #[[ ( $LINUXFAMILY == sunxi || $LINUXFAMILY == sunxi64 ) && $BUILD_DESKTOP == yes && $BRANCH != default ]] + false +} diff --git a/packages/extras-buildpkgs/xf86-video-armsoc/debian/changelog b/packages/extras-buildpkgs/xf86-video-armsoc/debian/changelog new file mode 100644 index 0000000000..70dd636941 --- /dev/null +++ b/packages/extras-buildpkgs/xf86-video-armsoc/debian/changelog @@ -0,0 +1,103 @@ +xf86-video-armsoc (1.4.0-0ubuntu2) xenial; urgency=medium + + * Rebuild against the new xserver. + + -- Timo Aaltonen Thu, 03 Mar 2016 13:17:50 +0200 + +xf86-video-armsoc (1.4.0-0ubuntu1) xenial; urgency=medium + + * New upstream release. + * fix-mali-t604.patch dropped, upstream. + + -- Timo Aaltonen Tue, 09 Feb 2016 11:56:56 +0200 + +xf86-video-armsoc (0.6.0-0ubuntu4build1) vivid; urgency=medium + + * Rebuild to pick up new Xserver dependencies + + -- Maarten Lankhorst Thu, 12 Mar 2015 07:59:09 +0000 + +xf86-video-armsoc (0.6.0-0ubuntu4) utopic; urgency=medium + + * Rebuild for xorg 1.16 abi. + + -- Maarten Lankhorst Wed, 10 Sep 2014 16:41:49 +0200 + +xf86-video-armsoc (0.6.0-0ubuntu3) trusty; urgency=medium + + * Rebuild for xorg 1.15 abi. + + -- Maarten Lankhorst Wed, 05 Feb 2014 09:29:09 +0000 + +xf86-video-armsoc (0.6.0-0ubuntu2) trusty; urgency=low + + * Fix transitions from the old xserver-xorg-armsoc to + xserver-xorg-armsoc-exynos. + + -- Mathieu Trudel-Lapierre Thu, 31 Oct 2013 16:55:40 -0700 + +xf86-video-armsoc (0.6.0-0ubuntu1) trusty; urgency=low + + * New upstream version 0.6.0 (from git snapshot of tag 0.6.0). + * debian/patches/fix-mali-t604.patch: fix Mali T604: use non-scanout buffers + all the time for exynos DRM. + + -- Mathieu Trudel-Lapierre Thu, 31 Oct 2013 16:40:42 -0400 + +xf86-video-armsoc (0.0+git20121019+rebdf1e3-0ubuntu5) saucy; urgency=low + + * Add patch to kill mibstore.h, rebuild bump against new abi. + + -- Maarten Lankhorst Mon, 08 Jul 2013 12:29:17 +0200 + +xf86-video-armsoc (0.0+git20121019+rebdf1e3-0ubuntu4) saucy; urgency=low + + * Added forgotten exynos.conf part of Xorg configuration. + * Fixed maintainer information. + * Changed Vcs-git entries to point to Github repository. + * Updated Standards-Version to 3.9.4 (no changes required). + + -- Marcin Juszkiewicz Sun, 28 Apr 2013 13:42:59 +0200 + +xf86-video-armsoc (0.0+git20121019+rebdf1e3-0ubuntu1) raring; urgency=low + + * First version for Chromebook. + * Updated Chromium version to XServer 1.13 ABI (with code from + xf86-video-omap). + * Due to complicated history of that driver I decided to use 0.0 version. + More in README.source file. + * Added udev rule to get /dev/mali0 accessible for non-root users - DRI + support and OpenGL ES (no package for it) requires it. + + -- Marcin Juszkiewicz Sun, 11 Nov 2012 23:43:18 +0100 + +xf86-video-omap (0.4.0-0ubuntu2) quantal; urgency=low + + * Build depending and using quilt for patch management + * debian/patches/01-adding-support-for-platformProbe.patch: + - Adding support for platformProbe, for proper platform device support + (LP: #1015292) + + -- Ricardo Salveti de Araujo Thu, 23 Aug 2012 02:02:54 -0300 + +xf86-video-omap (0.4.0-0ubuntu1) quantal-proposed; urgency=low + + * New upstream release. + + -- Timo Aaltonen Tue, 14 Aug 2012 11:41:13 +0300 + +xf86-video-omap (0.3.0-1) experimental; urgency=low + + * New upstream release (Closes: #671897) + - now depends on libdrm-omap + * Update Debian Standards Version to 3.9.3 + * Update Debian Copyright Format to 1.0 + * Enable hardening build flags + + -- Sebastian Reichel Wed, 27 Jun 2012 22:03:30 +0200 + +xf86-video-omap (0.0.1~git20110717-1) experimental; urgency=low + + * Initial Release (Closes: #640721) + + -- Sebastian Reichel Sun, 04 Sep 2011 21:45:41 +0200 diff --git a/packages/extras-buildpkgs/xf86-video-armsoc/debian/compat b/packages/extras-buildpkgs/xf86-video-armsoc/debian/compat new file mode 100644 index 0000000000..45a4fb75db --- /dev/null +++ b/packages/extras-buildpkgs/xf86-video-armsoc/debian/compat @@ -0,0 +1 @@ +8 diff --git a/packages/extras-buildpkgs/xf86-video-armsoc/debian/control b/packages/extras-buildpkgs/xf86-video-armsoc/debian/control new file mode 100644 index 0000000000..0cac32a6cd --- /dev/null +++ b/packages/extras-buildpkgs/xf86-video-armsoc/debian/control @@ -0,0 +1,41 @@ +Source: xf86-video-armsoc +Section: x11 +Priority: optional +XSBC-Original-Maintainer: Marcin Juszkiewicz +Maintainer: Ubuntu Developers +Build-Depends: debhelper (>= 8), + quilt, + dh-autoreconf, + libdrm-dev, + libudev-dev, + libxext-dev, + pkg-config, + x11proto-core-dev, + x11proto-fonts-dev, + x11proto-gl-dev, + x11proto-xf86dri-dev, + xutils-dev, + xserver-xorg-dev +Standards-Version: 3.9.4 + +Package: xserver-xorg-video-armsoc-sun4i +Architecture: any +Pre-Depends: ${misc:Pre-Depends} +Depends: ${misc:Depends}, + ${shlibs:Depends}, + ${xviddriver:Depends} +Provides: ${xviddriver:Provides} +Description: X.Org X server -- ARM SoC display driver for Allwinner DRM + This driver for the X.Org X server (see xserver-xorg for a further + description) provides support for devices including + Allwinner H3, H5 and A64. + . + The driver depends on drm support in the kernel, which is + in the staging area of the mainline kernel since version 3.3. + . + More information about X.Org can be found at: + * + * + * + . + This package contains the armsoc driver for the Sunxi DRM driver. diff --git a/packages/extras-buildpkgs/xf86-video-armsoc/debian/copyright b/packages/extras-buildpkgs/xf86-video-armsoc/debian/copyright new file mode 100644 index 0000000000..328484fae7 --- /dev/null +++ b/packages/extras-buildpkgs/xf86-video-armsoc/debian/copyright @@ -0,0 +1,37 @@ +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Contact: Rob Clark +Source: http://cgit.freedesktop.org/xorg/driver/xf86-video-omap/ + +Files: * +Copyright: 2011-2012, Texas Instruments, Inc +License: Expat + +Files: src/drmmode_display.c +Copyright: 2007, Red Hat, Inc. + 2008, Maarten Maathuis + 2011-2012, Texas Instruments, Inc +License: Expat + +Files: debian/* +Copyright: 2011-2012, Sebastian Reichel +License: Expat + +License: Expat + 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. diff --git a/packages/extras-buildpkgs/xf86-video-armsoc/debian/patches/0001-Add-sun4i-drmmode-driver.patch b/packages/extras-buildpkgs/xf86-video-armsoc/debian/patches/0001-Add-sun4i-drmmode-driver.patch new file mode 100644 index 0000000000..6ab25c6ba3 --- /dev/null +++ b/packages/extras-buildpkgs/xf86-video-armsoc/debian/patches/0001-Add-sun4i-drmmode-driver.patch @@ -0,0 +1,164 @@ +From 85545c7b30bfb53a6329d6e41447e52b6e5512c2 Mon Sep 17 00:00:00 2001 +From: Maxime Ripard +Date: Tue, 8 Dec 2015 15:09:48 +0100 +Subject: [PATCH] Add sun4i drmmode driver + +Originally-created-by: Maxime Ripard +[Icenowy: changed commit message and change README] +Signed-off-by: Icenowy Zheng +--- + README | 1 + + src/Makefile.am | 3 +- + src/armsoc_driver.c | 1 + + src/drmmode_driver.h | 1 + + src/drmmode_sun4i/drmmode_sun4i.c | 88 +++++++++++++++++++++++++++++++++++++++ + 5 files changed, 93 insertions(+), 1 deletion(-) + create mode 100644 src/drmmode_sun4i/drmmode_sun4i.c + +diff --git a/README b/README +index 707356a..d2ff0de 100644 +--- a/README ++++ b/README +@@ -13,6 +13,7 @@ The currently supported DRM drivers are: + - exynos + - kirin + - sti ++- sun4i + + For other drivers, you will need to implement this support yourself. A template implementation is + provided in src/drmmode_template. +diff --git a/src/Makefile.am b/src/Makefile.am +index 3b26019..ae39d1e 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -43,7 +43,8 @@ armsoc_drv_ladir = @moduledir@/drivers + DRMMODE_SRCS = drmmode_exynos/drmmode_exynos.c \ + drmmode_pl111/drmmode_pl111.c \ + drmmode_kirin/drmmode_kirin.c \ +- drmmode_sti/drmmode_sti.c ++ drmmode_sti/drmmode_sti.c \ ++ drmmode_sun4i/drmmode_sun4i.c + + + armsoc_drv_la_SOURCES = \ +diff --git a/src/armsoc_driver.c b/src/armsoc_driver.c +index 83e74a7..abae36c 100644 +--- a/src/armsoc_driver.c ++++ b/src/armsoc_driver.c +@@ -737,6 +737,7 @@ static struct drmmode_interface *get_drmmode_implementation(int drm_fd) + &pl111_interface, + &kirin_interface, + &sti_interface, ++ &sun4i_interface, + }; + int i; + +diff --git a/src/drmmode_driver.h b/src/drmmode_driver.h +index 879fc60..1a75cde 100644 +--- a/src/drmmode_driver.h ++++ b/src/drmmode_driver.h +@@ -106,6 +106,7 @@ extern struct drmmode_interface exynos_interface; + extern struct drmmode_interface pl111_interface; + extern struct drmmode_interface kirin_interface; + extern struct drmmode_interface sti_interface; ++extern struct drmmode_interface sun4i_interface; + + + #endif +diff --git a/src/drmmode_sun4i/drmmode_sun4i.c b/src/drmmode_sun4i/drmmode_sun4i.c +new file mode 100644 +index 0000000..5513d80 +--- /dev/null ++++ b/src/drmmode_sun4i/drmmode_sun4i.c +@@ -0,0 +1,88 @@ ++/* ++ * 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 ++ ++#include "../drmmode_driver.h" ++ ++#define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d)) ++ ++#define __ALIGN_KERNEL_MASK(x, mask) (((x) + (mask)) & ~(mask)) ++#define __ALIGN_KERNEL(x, a) __ALIGN_KERNEL_MASK(x, (typeof(x))(a) - 1) ++#define ALIGN(x, a) __ALIGN_KERNEL((x), (a)) ++ ++/* This should be included from uapi headers once the driver is ++ * mainlined ++ */ ++struct drm_sun4i_gem_create { ++ uint64_t size; ++ uint32_t flags; ++ uint32_t handle; ++}; ++ ++#define DRM_SUN4I_GEM_CREATE 0x00 ++ ++#define DRM_IOCTL_SUN4I_GEM_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_SUN4I_GEM_CREATE, \ ++ struct drm_sun4i_gem_create) ++ ++static int create_custom_gem(int fd, struct armsoc_create_gem *create_gem) ++{ ++ struct drm_sun4i_gem_create create_sun4i; ++ int ret; ++ unsigned int pitch; ++ ++ assert((create_gem->buf_type == ARMSOC_BO_SCANOUT) || ++ (create_gem->buf_type == ARMSOC_BO_NON_SCANOUT)); ++ ++ /* make pitch a multiple of 64 bytes for best performance */ ++ pitch = DIV_ROUND_UP(create_gem->width * create_gem->bpp, 8); ++ pitch = ALIGN(pitch, 64); ++ ++ memset(&create_sun4i, 0, sizeof(create_sun4i)); ++ create_sun4i.size = create_gem->height * pitch; ++ ++ ret = drmIoctl(fd, DRM_IOCTL_SUN4I_GEM_CREATE, &create_sun4i); ++ if (ret) ++ return ret; ++ ++ /* Convert custom create_sun4i to generic create_gem */ ++ create_gem->handle = create_sun4i.handle; ++ create_gem->pitch = pitch; ++ create_gem->size = create_sun4i.size; ++ ++ return 0; ++} ++ ++struct drmmode_interface sun4i_interface = { ++ "sun4i-drm" /* name of drm driver*/, ++ 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 */, ++}; +-- +2.12.2 + diff --git a/packages/extras-buildpkgs/xf86-video-armsoc/debian/patches/series b/packages/extras-buildpkgs/xf86-video-armsoc/debian/patches/series new file mode 100644 index 0000000000..334c1d6923 --- /dev/null +++ b/packages/extras-buildpkgs/xf86-video-armsoc/debian/patches/series @@ -0,0 +1 @@ +0001-Add-sun4i-drmmode-driver.patch diff --git a/packages/extras-buildpkgs/xf86-video-armsoc/debian/rules b/packages/extras-buildpkgs/xf86-video-armsoc/debian/rules new file mode 100644 index 0000000000..25ba858e04 --- /dev/null +++ b/packages/extras-buildpkgs/xf86-video-armsoc/debian/rules @@ -0,0 +1,37 @@ +#!/usr/bin/make -f + +DRMMODES = sun4i +COMMON_CONFIGURE_FLAGS = $(shell dpkg-buildflags --export=configure) + +%: + dh $@ --with autoreconf,xsf + +# create m4 directory before running autoreconf +override_dh_autoreconf: + mkdir -p m4 + NOCONFIGURE=1 dh_autoreconf ./autogen.sh + +# remove m4 directory after autoreconf cleanup +override_dh_autoreconf_clean: + dh_autoreconf_clean + rm -rf m4 + +override_dh_auto_configure: $(DRMMODES:%=doconfigure-%) + +doconfigure-%: + DH_VERBOSE=1 dh_auto_configure --builddirectory=build/$* -- $(COMMON_CONFIGURE_FLAGS) --with-drmmode=$* + +override_dh_auto_build: $(DRMMODES:%=dobuild-%) + +dobuild-%: + dh_auto_build --builddirectory=build/$* + +override_dh_auto_install: $(DRMMODES:%=doinstall-%) + +doinstall-%: + dh_auto_install --builddirectory=build/$* --destdir=debian/xserver-xorg-video-armsoc-$* + find debian/xserver-xorg-video-armsoc-$* -name "*.la" -delete + +# use appropriate warning level for a plugin +override_dh_shlibdeps: + dh_shlibdeps -- --warnings=6 diff --git a/packages/extras-buildpkgs/xf86-video-armsoc/debian/source/format b/packages/extras-buildpkgs/xf86-video-armsoc/debian/source/format new file mode 100644 index 0000000000..163aaf8d82 --- /dev/null +++ b/packages/extras-buildpkgs/xf86-video-armsoc/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/packages/extras-buildpkgs/xf86-video-armsoc/debian/sun4i.conf b/packages/extras-buildpkgs/xf86-video-armsoc/debian/sun4i.conf new file mode 100644 index 0000000000..e83154cd3e --- /dev/null +++ b/packages/extras-buildpkgs/xf86-video-armsoc/debian/sun4i.conf @@ -0,0 +1,25 @@ +Section "Device" + Identifier "Mali FBDEV" + Driver "armsoc" + Option "fbdev" "/dev/fb0" + Option "Fimg2DExa" "false" + Option "DRI2" "true" + Option "DRI2_PAGE_FLIP" "false" + Option "DRI2_WAIT_VSYNC" "true" +# Option "Fimg2DExaSolid" "false" +# Option "Fimg2DExaCopy" "false" +# Option "Fimg2DExaComposite" "false" + Option "SWcursorLCD" "false" +EndSection + +Section "Screen" + Identifier "DefaultScreen" + Device "Mali FBDEV" + DefaultDepth 24 +EndSection + +Section "Device" + Identifier "ARMSOC DRM driver" + Driver "armsoc" + Option "DRI2" "true" +EndSection diff --git a/packages/extras-buildpkgs/xf86-video-armsoc/debian/xserver-xorg-video-armsoc-sun4i.install b/packages/extras-buildpkgs/xf86-video-armsoc/debian/xserver-xorg-video-armsoc-sun4i.install new file mode 100644 index 0000000000..55fa6bae33 --- /dev/null +++ b/packages/extras-buildpkgs/xf86-video-armsoc/debian/xserver-xorg-video-armsoc-sun4i.install @@ -0,0 +1 @@ +debian/sun4i.conf /etc/X11/xorg.conf.d/ diff --git a/packages/extras-buildpkgs/xf86-video-armsoc/debian/xserver-xorg-video-armsoc-sun4i.udev b/packages/extras-buildpkgs/xf86-video-armsoc/debian/xserver-xorg-video-armsoc-sun4i.udev new file mode 100644 index 0000000000..962b5b8d94 --- /dev/null +++ b/packages/extras-buildpkgs/xf86-video-armsoc/debian/xserver-xorg-video-armsoc-sun4i.udev @@ -0,0 +1,11 @@ +# Do not edit this file, it will be overwritten on update +# +# Set the right permissions to the devices provided by the +# armsoc driver +ENV{ACL_MANAGE}=="0", GOTO="mali_gpu_end" +ACTION!="add|change", GOTO="mali_gpu_end" + +# graphics devices +ACTION=="add|change", KERNEL=="mali*", TAG+="udev-acl" + +LABEL="mali_gpu_end"