summaryrefslogtreecommitdiffstats
path: root/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver
diff options
context:
space:
mode:
Diffstat (limited to 'import-layers/yocto-poky/meta/recipes-graphics/xorg-driver')
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-evdev_2.10.1.bb20
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-keyboard_1.8.1.bb13
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-keyboard_git.bb16
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-libinput_0.16.0.bb11
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-mouse/unbreak.patch21
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-mouse_1.9.1.bb15
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-mouse_git.bb18
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-synaptics_1.8.3.bb16
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-synaptics_git.bb18
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-vmmouse_13.1.0.bb26
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-cirrus_1.5.3.bb13
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-fbdev_0.4.4.bb9
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-intel/0001-gen8-Fix-the-YUV-RGB-shader.patch65
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-intel/0001-uxa-fix-the-call-to-PixmapSyncDirtyHelper-broken-by-.patch30
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-intel/always_include_xorg_server.h.patch24
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-intel/disable-x11-dri3.patch17
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-intel/sna-Protect-against-ABI-breakage-in-recent-versions-.patch70
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-intel/udev-fstat.patch59
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-intel_2.99.917.bb42
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-omap_0.4.4.bb41
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-omapfb/0001-Prevents-omapfb-from-from-crashing-when-pixelclock-o.patch35
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-omapfb/0001-Revert-Set-a-large-CRTC-upper-limit-to-not-prune-lar.patch41
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-omapfb/0002-Revert-Set-virtual-size-when-configuring-framebuffer.patch32
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-omapfb/0003-force-plain-mode.patch31
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-omapfb/0004-blacklist-tv-out.patch33
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-omapfb/0005-Attempt-to-fix-VRFB.patch325
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-omapfb/0006-omapfb-port-to-new-xserver-video-API.patch272
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-omapfb/0007-always_include_xorg_server.h.patch48
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-omapfb_git.bb37
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-vesa_2.3.4.bb21
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-vmware/0002-add-option-for-vmwgfx.patch98
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-vmware_13.1.0.bb19
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xorg-driver-common.inc40
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xorg-driver-input.inc12
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xorg-driver-video.inc8
35 files changed, 1596 insertions, 0 deletions
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-evdev_2.10.1.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-evdev_2.10.1.bb
new file mode 100644
index 000000000..cf77ad209
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-evdev_2.10.1.bb
@@ -0,0 +1,20 @@
+require xorg-driver-input.inc
+
+SUMMARY = "X.Org X server -- event devices (evdev) input driver"
+
+DESCRIPTION = "evdev is an Xorg input driver for Linux's generic event \
+devices. It therefore supports all input devices that the kernel knows \
+about, including most mice and keyboards. \
+\
+The evdev driver can serve as both a pointer and a keyboard input \
+device, and may be used as both the core keyboard and the core pointer. \
+Multiple input devices are supported by multiple instances of this \
+driver, with one Load directive for evdev in the Module section of your \
+xorg.conf for each input device that will use this driver. "
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=fefe33b1cf0cacba0e72e3b0fa0f0e16"
+
+DEPENDS += "mtdev libevdev"
+
+SRC_URI[md5sum] = "96d89d9406a02f5e36bdaa4edd9a243a"
+SRC_URI[sha256sum] = "af9c2b47f5b272ae56b45da6bd84610fc9a3d80a4b32c8215842a39d862de017"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-keyboard_1.8.1.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-keyboard_1.8.1.bb
new file mode 100644
index 000000000..6fe51accb
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-keyboard_1.8.1.bb
@@ -0,0 +1,13 @@
+require xorg-driver-input.inc
+
+SUMMARY = "X.Org X server -- keyboard input driver"
+
+DESCRIPTION = "keyboard is an Xorg input driver for keyboards. The \
+driver supports the standard OS-provided keyboard interface. The driver \
+functions as a keyboard input device, and may be used as the X server's \
+core keyboard."
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=ea2099d24ac9e316a6d4b9f20b3d4e10"
+
+SRC_URI[md5sum] = "96ccc43d389b970afbd3893875dfd678"
+SRC_URI[sha256sum] = "1ac8ff39bf9da7d2fc7fd6c24515726e8138340c0518ab8c606e008cf93ca211"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-keyboard_git.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-keyboard_git.bb
new file mode 100644
index 000000000..dfb08f724
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-keyboard_git.bb
@@ -0,0 +1,16 @@
+require xorg-driver-input.inc
+
+SUMMARY = "X.Org X server -- keyboard input driver"
+
+DESCRIPTION = "keyboard is an Xorg input driver for keyboards. The \
+driver supports the standard OS-provided keyboard interface. The driver \
+functions as a keyboard input device, and may be used as the X server's \
+core keyboard."
+
+SRCREV = "3e28d68b50d291938734e9684b8296ca864f3892"
+PV = "1.3.2+git${SRCPV}"
+PR = "${INC_PR}.0"
+
+SRC_URI = "git://anongit.freedesktop.org/git/xorg/driver/xf86-input-keyboard"
+S = "${WORKDIR}/git"
+
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-libinput_0.16.0.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-libinput_0.16.0.bb
new file mode 100644
index 000000000..0252baff1
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-libinput_0.16.0.bb
@@ -0,0 +1,11 @@
+require xorg-driver-input.inc
+
+SUMMARY = "Generic input driver for the X.Org server based on libinput"
+LIC_FILES_CHKSUM = "file://COPYING;md5=5e6b20ea2ef94a998145f0ea3f788ee0"
+
+DEPENDS += "libinput"
+
+SRC_URI[md5sum] = "2c8cb520f88da7bafaceebc0b34ea1d4"
+SRC_URI[sha256sum] = "fdade531e91e79acf6dce8ac55fa4f65abe3f1358c5d3d777ae48dbc74b76f49"
+
+FILES_${PN} += "${datadir}/X11/xorg.conf.d"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-mouse/unbreak.patch b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-mouse/unbreak.patch
new file mode 100644
index 000000000..6930864ed
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-mouse/unbreak.patch
@@ -0,0 +1,21 @@
+Unbreak the linux mouse driver by using config.h
+
+RP - 4/11/07
+
+Upstream-Status: Pending
+
+Index: git/src/lnx_mouse.c
+===================================================================
+--- git.orig/src/lnx_mouse.c 2008-11-04 23:46:05.000000000 +0000
++++ git/src/lnx_mouse.c 2008-11-04 23:46:15.000000000 +0000
+@@ -3,8 +3,8 @@
+ * Copyright 1999 by The XFree86 Project, Inc.
+ */
+
+-#ifdef HAVE_XORG_CONFIG_H
+-#include <xorg-config.h>
++#ifdef HAVE_CONFIG_H
++#include <config.h>
+ #endif
+
+ #include <X11/X.h>
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-mouse_1.9.1.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-mouse_1.9.1.bb
new file mode 100644
index 000000000..1f0b78a15
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-mouse_1.9.1.bb
@@ -0,0 +1,15 @@
+require xorg-driver-input.inc
+
+SUMMARY = "X.Org X server -- mouse input driver"
+
+DESCRIPTION = "mouse is an Xorg input driver for mice. The driver \
+supports most available mouse types and interfaces. The mouse driver \
+functions as a pointer input device, and may be used as the X server's \
+core pointer. Multiple mice are supported by multiple instances of this \
+driver."
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=90ea9f90d72b6d9327dede5ffdb2a510"
+
+SRC_URI[md5sum] = "77085b649c5c0b333565ba562f573951"
+SRC_URI[sha256sum] = "3485d375779c08406f0789feedde15933dc703158a086ddac638598f479fc5ce"
+
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-mouse_git.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-mouse_git.bb
new file mode 100644
index 000000000..d79a2e4dd
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-mouse_git.bb
@@ -0,0 +1,18 @@
+require xorg-driver-input.inc
+
+SUMMARY = "X.Org X server -- mouse input driver"
+
+DESCRIPTION = "mouse is an Xorg input driver for mice. The driver \
+supports most available mouse types and interfaces. The mouse driver \
+functions as a pointer input device, and may be used as the X server's \
+core pointer. Multiple mice are supported by multiple instances of this \
+driver."
+
+SRCREV = "ea5cfe804e112f320f14ad896c7802d53551d3e6"
+PV = "1.3.0+git${SRCPV}"
+PR = "${INC_PR}.0"
+
+SRC_URI = "git://anongit.freedesktop.org/git/xorg/driver/xf86-input-mouse \
+ file://unbreak.patch"
+S = "${WORKDIR}/git"
+
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-synaptics_1.8.3.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-synaptics_1.8.3.bb
new file mode 100644
index 000000000..b47c82cc6
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-synaptics_1.8.3.bb
@@ -0,0 +1,16 @@
+require xorg-driver-input.inc
+
+SUMMARY = "X.Org X server -- synaptics touchpad input driver"
+
+DESCRIPTION = "synaptics is an Xorg input driver for the touchpads from \
+Synaptics Incorporated. Even though these touchpads (by default, \
+operating in a compatibility mode emulating a standard mouse) can be \
+handled by the normal evdev or mouse drivers, this driver allows more \
+advanced features of the touchpad to become available."
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=55aacd3535a741824955c5eb8f061398"
+
+SRC_URI[md5sum] = "4e3c8bed1ab4a67db2160c2c3d7e2a34"
+SRC_URI[sha256sum] = "d39f100c74f3673778b53f17bab7690161925e25dd998a15dd8cc69b52e83f01"
+
+DEPENDS += "libxi mtdev libxtst libevdev"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-synaptics_git.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-synaptics_git.bb
new file mode 100644
index 000000000..140f633b4
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-synaptics_git.bb
@@ -0,0 +1,18 @@
+require xorg-driver-input.inc
+
+SUMMARY = "X.Org X server -- synaptics touchpad input driver"
+
+DESCRIPTION = "synaptics is an Xorg input driver for the touchpads from \
+Synaptics Incorporated. Even though these touchpads (by default, \
+operating in a compatibility mode emulating a standard mouse) can be \
+handled by the normal evdev or mouse drivers, this driver allows more \
+advanced features of the touchpad to become available."
+
+SRCREV = "934bc0012f948c52aadc8eda912f7728fb7394a2"
+PV = "0.15.2+git${SRCPV}"
+PR = "${INC_PR}.1"
+
+SRC_URI = "git://anongit.freedesktop.org/git/xorg/driver/xf86-input-synaptics"
+S = "${WORKDIR}/git"
+
+DEPENDS += "libxi mtdev libxtst"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-vmmouse_13.1.0.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-vmmouse_13.1.0.bb
new file mode 100644
index 000000000..8615b48da
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-vmmouse_13.1.0.bb
@@ -0,0 +1,26 @@
+require xorg-driver-input.inc
+
+SUMMARY = "X.Org X server -- VMWare mouse input driver"
+DESCRIPTION = "The vmmouse driver enables support for the special VMMouse \
+protocol that is provided by VMware virtual machines to give absolute \
+pointer positioning. The vmmouse driver is capable of falling back to the \
+standard 'mouse' driver if a VMware virtual machine is not detected."
+
+SRC_URI[md5sum] = "85e2e464b7219c495ad3a16465c226ed"
+SRC_URI[sha256sum] = "0af558957ac1be1b2863712c2475de8f4d7f14921fd01ded2e2fde4921b19319"
+
+RDEPENDS_${PN} += "xf86-input-mouse"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=622841c068a9d7625fbfe7acffb1a8fc"
+
+COMPATIBLE_HOST = '(i.86|x86_64).*-linux'
+
+do_install_append () {
+ # We don't care about hal
+ rm -rf ${D}${datadir}/hal/
+ rm -rf ${D}${libdir}/hal/
+}
+
+EXTRA_OECONF = "--with-udev-rules-dir=${nonarch_base_libdir}/udev/rules.d"
+
+FILES_${PN} += "${nonarch_base_libdir}/udev/rules.d/ ${datadir}/X11/xorg.conf.d"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-cirrus_1.5.3.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-cirrus_1.5.3.bb
new file mode 100644
index 000000000..c49847760
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-cirrus_1.5.3.bb
@@ -0,0 +1,13 @@
+require xorg-driver-video.inc
+
+SUMMARY = "X.Org X server -- cirrus display driver"
+DESCRIPTION = "cirrus is an Xorg driver for Cirrus Logic VGA adapters. These \
+devices are not so common in the wild anymore, but QEMU can emulate one, so \
+the driver is still useful."
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=6ddc7ca860dc5fd014e7f160ea699295"
+
+SRC_URI[md5sum] = "7d7dfd4cdc42aa8b6e923510fa00ad2b"
+SRC_URI[sha256sum] = "edc87b20a55259126b5239b5c1ef913419eab7ded0ed12ae9ae989460d7351ab"
+
+DEPENDS += "libpciaccess"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-fbdev_0.4.4.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-fbdev_0.4.4.bb
new file mode 100644
index 000000000..52e9bd1df
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-fbdev_0.4.4.bb
@@ -0,0 +1,9 @@
+require xorg-driver-video.inc
+
+SUMMARY = "X.Org X server -- fbdev display driver"
+DESCRIPTION = "fbdev is an Xorg driver for framebuffer devices. This is a non-accelerated driver."
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=d8cbd99fff773f92e844948f74ef0df8"
+
+SRC_URI[md5sum] = "3931c0e19d441cc576dc088f9eb9fd73"
+SRC_URI[sha256sum] = "9dd4b326498223abbfdf786089a46ea3db4fa6bbd341308eb48a9e00bc3fd51b"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-intel/0001-gen8-Fix-the-YUV-RGB-shader.patch b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-intel/0001-gen8-Fix-the-YUV-RGB-shader.patch
new file mode 100644
index 000000000..35762192f
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-intel/0001-gen8-Fix-the-YUV-RGB-shader.patch
@@ -0,0 +1,65 @@
+From c43617b739e358064396912c7a7a8028ca91d201 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= <ville.syrjala@linux.intel.com>
+Date: Thu, 16 Apr 2015 20:40:39 +0300
+Subject: [PATCH] gen8: Fix the YUV->RGB shader
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Use the correct register (Yn_01) with first half of the
+Y samples instead of using the register (Yn_23) with the
+second half twice when computing the green channel.
+
+Also use the Yn_01 register name instead of Yn for the red
+channel as well, just for a bit of extra consistency.
+
+Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89807
+Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
+Tested-by: Chris Wilson <chris@chris-wilson.co.uk>
+
+Upstream-Status: Backport
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
+
+---
+ src/render_program/exa_wm_yuv_rgb.g8a | 4 ++--
+ src/render_program/exa_wm_yuv_rgb.g8b | 2 +-
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/render_program/exa_wm_yuv_rgb.g8a b/src/render_program/exa_wm_yuv_rgb.g8a
+index 7def093..34973ba 100644
+--- a/src/render_program/exa_wm_yuv_rgb.g8a
++++ b/src/render_program/exa_wm_yuv_rgb.g8a
+@@ -76,7 +76,7 @@ add (16) Cbn<1>F Cb<8,8,1>F -0.501961F { compr align1 };
+ /*
+ * R = Y + Cr * 1.596
+ */
+-mov (8) acc0<1>F Yn<8,8,1>F { compr align1 };
++mov (8) acc0<1>F Yn_01<8,8,1>F { compr align1 };
+ mac.sat(8) src_sample_r_01<1>F Crn_01<8,8,1>F 1.596F { compr align1 };
+
+ mov (8) acc0<1>F Yn_23<8,8,1>F { compr align1 };
+@@ -84,7 +84,7 @@ mac.sat(8) src_sample_r_23<1>F Crn_23<8,8,1>F 1.596F { compr align1 };
+ /*
+ * G = Crn * -0.813 + Cbn * -0.392 + Y
+ */
+-mov (8) acc0<1>F Yn_23<8,8,1>F { compr align1 };
++mov (8) acc0<1>F Yn_01<8,8,1>F { compr align1 };
+ mac (8) acc0<1>F Crn_01<8,8,1>F -0.813F { compr align1 };
+ mac.sat(8) src_sample_g_01<1>F Cbn_01<8,8,1>F -0.392F { compr align1 };
+
+diff --git a/src/render_program/exa_wm_yuv_rgb.g8b b/src/render_program/exa_wm_yuv_rgb.g8b
+index 4494953..2cd6fc4 100644
+--- a/src/render_program/exa_wm_yuv_rgb.g8b
++++ b/src/render_program/exa_wm_yuv_rgb.g8b
+@@ -6,7 +6,7 @@
+ { 0x80600048, 0x21c03ae8, 0x3e8d02c0, 0x3fcc49ba },
+ { 0x00600001, 0x24003ae0, 0x008d0320, 0x00000000 },
+ { 0x80600048, 0x21e03ae8, 0x3e8d02e0, 0x3fcc49ba },
+- { 0x00600001, 0x24003ae0, 0x008d0320, 0x00000000 },
++ { 0x00600001, 0x24003ae0, 0x008d0300, 0x00000000 },
+ { 0x00600048, 0x24003ae0, 0x3e8d02c0, 0xbf5020c5 },
+ { 0x80600048, 0x22003ae8, 0x3e8d0340, 0xbec8b439 },
+ { 0x00600001, 0x24003ae0, 0x008d0320, 0x00000000 },
+--
+2.5.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-intel/0001-uxa-fix-the-call-to-PixmapSyncDirtyHelper-broken-by-.patch b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-intel/0001-uxa-fix-the-call-to-PixmapSyncDirtyHelper-broken-by-.patch
new file mode 100644
index 000000000..29924bb90
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-intel/0001-uxa-fix-the-call-to-PixmapSyncDirtyHelper-broken-by-.patch
@@ -0,0 +1,30 @@
+From 2c5063938cc809f624e56efd4673041fa8141e81 Mon Sep 17 00:00:00 2001
+From: Martin Peres <martin.peres@linux.intel.com>
+Date: Thu, 9 Jul 2015 11:26:38 +0300
+Subject: [PATCH] uxa: fix the call to PixmapSyncDirtyHelper, broken by
+ xserver's 90db5ed
+
+[ickle: switch to HAS_DIRTYTRACKING_ROTATION as suggested by Dave Airlie]
+Signed-off-by: Martin Peres <martin.peres@linux.intel.com>
+
+Upstream-Status: Backport
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
+---
+ src/compat-api.h | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/compat-api.h b/src/compat-api.h
+index aa93bee..293e9d7 100644
+--- a/src/compat-api.h
++++ b/src/compat-api.h
+@@ -247,3 +247,7 @@ static inline void FreePixmap(PixmapPtr pixmap)
+ #endif
+
+ #endif
++
++#if HAS_DIRTYTRACKING_ROTATION
++#define PixmapSyncDirtyHelper(d, dd) PixmapSyncDirtyHelper(d)
++#endif
+--
+2.5.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-intel/always_include_xorg_server.h.patch b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-intel/always_include_xorg_server.h.patch
new file mode 100644
index 000000000..8a5dd39ae
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-intel/always_include_xorg_server.h.patch
@@ -0,0 +1,24 @@
+Include xorg-server.h to fix build errors seen with glibc 2.20
+
+In file included from /home/ubuntu/work/upstream/openembedded-core/build/tmp-glibc/sysroots/qemux86/usr/include/string.h:634:0,
+ from /home/ubuntu/work/upstream/openembedded-core/build/tmp-glibc/work/i586-oe-linux/xf86-video-intel/2_2.99.912-r0/xf86-video-intel-2.99.912/src/backlight.c:39:
+/home/ubuntu/work/upstream/openembedded-core/build/tmp-glibc/sysroots/qemux86/usr/include/xorg/os.h:579:1: error: expected identifier or '(' before '__extension__'
+ strndup(const char *str, size_t n);
+ ^
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Pending
+
+Index: xf86-video-intel-2.99.912/src/backlight.c
+===================================================================
+--- xf86-video-intel-2.99.912.orig/src/backlight.c 2014-04-09 10:41:18.000000000 -0700
++++ xf86-video-intel-2.99.912/src/backlight.c 2014-08-28 18:52:25.524070587 -0700
+@@ -29,6 +29,7 @@
+ #include "config.h"
+ #endif
+
++#include <xorg-server.h>
+ #include <sys/types.h>
+ #include <sys/wait.h>
+ #include <sys/stat.h>
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-intel/disable-x11-dri3.patch b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-intel/disable-x11-dri3.patch
new file mode 100644
index 000000000..dda508dcf
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-intel/disable-x11-dri3.patch
@@ -0,0 +1,17 @@
+These modules are only used for tests that don't get installed, and the
+automatic detection without explicit dependencies means that a build can find
+e.g. xshmfence at configure time but then it's been removed from the sysroot by
+the time compile happens.
+
+As the tests don't get installed, just disable the checks.
+
+Upstream-Status: Inappropriate [OE-specific]
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+diff --git a/configure.ac b/configure.ac
+index bd654f3..78a0e0d 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -251 +251 @@ fi
+-PKG_CHECK_MODULES(X11_DRI3, [xcb-dri3 xcb-sync xcb-present x11-xcb xshmfence x11 xrender xext libdrm], [x11_dri3="yes"], [x11_dri3="no"])
++#PKG_CHECK_MODULES(X11_DRI3, [xcb-dri3 xcb-sync xcb-present x11-xcb xshmfence x11 xrender xext libdrm], [x11_dri3="yes"], [x11_dri3="no"])
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-intel/sna-Protect-against-ABI-breakage-in-recent-versions-.patch b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-intel/sna-Protect-against-ABI-breakage-in-recent-versions-.patch
new file mode 100644
index 000000000..589d52e0f
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-intel/sna-Protect-against-ABI-breakage-in-recent-versions-.patch
@@ -0,0 +1,70 @@
+From 7fe2b2948652443ff43d907855bd7a051d54d309 Mon Sep 17 00:00:00 2001
+From: Chris Wilson <chris@chris-wilson.co.uk>
+Date: Thu, 19 Mar 2015 23:14:17 +0000
+Subject: [PATCH] sna: Protect against ABI breakage in recent versions of
+ libdrm
+
+commit 7fe2b2948652443ff43d907855bd7a051d54d309 upstream.
+
+Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
+Upstream-Status: Backport
+Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
+
+diff --git a/src/sna/kgem.c b/src/sna/kgem.c
+index 11f0828f2bbc..6f16cbac87f2 100644
+--- a/src/sna/kgem.c
++++ b/src/sna/kgem.c
+@@ -182,6 +182,15 @@ struct local_i915_gem_caching {
+ #define LOCAL_IOCTL_I915_GEM_SET_CACHING DRM_IOW(DRM_COMMAND_BASE + LOCAL_I915_GEM_SET_CACHING, struct local_i915_gem_caching)
+ #define LOCAL_IOCTL_I915_GEM_GET_CACHING DRM_IOW(DRM_COMMAND_BASE + LOCAL_I915_GEM_GET_CACHING, struct local_i915_gem_caching)
+
++struct local_i915_gem_mmap {
++ uint32_t handle;
++ uint32_t pad;
++ uint64_t offset;
++ uint64_t size;
++ uint64_t addr_ptr;
++};
++#define LOCAL_IOCTL_I915_GEM_MMAP DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_MMAP, struct local_i915_gem_mmap)
++
+ struct local_i915_gem_mmap2 {
+ uint32_t handle;
+ uint32_t pad;
+@@ -514,15 +523,15 @@ retry_wc:
+
+ static void *__kgem_bo_map__cpu(struct kgem *kgem, struct kgem_bo *bo)
+ {
+- struct drm_i915_gem_mmap mmap_arg;
++ struct local_i915_gem_mmap arg;
+ int err;
+
+ retry:
+- VG_CLEAR(mmap_arg);
+- mmap_arg.handle = bo->handle;
+- mmap_arg.offset = 0;
+- mmap_arg.size = bytes(bo);
+- if ((err = do_ioctl(kgem->fd, DRM_IOCTL_I915_GEM_MMAP, &mmap_arg))) {
++ VG_CLEAR(arg);
++ arg.handle = bo->handle;
++ arg.offset = 0;
++ arg.size = bytes(bo);
++ if ((err = do_ioctl(kgem->fd, LOCAL_IOCTL_I915_GEM_MMAP, &arg))) {
+ assert(err != EINVAL);
+
+ if (__kgem_throttle_retire(kgem, 0))
+@@ -536,10 +545,10 @@ retry:
+ return NULL;
+ }
+
+- VG(VALGRIND_MAKE_MEM_DEFINED(mmap_arg.addr_ptr, bytes(bo)));
++ VG(VALGRIND_MAKE_MEM_DEFINED(arg.addr_ptr, bytes(bo)));
+
+ DBG(("%s: caching CPU vma for %d\n", __FUNCTION__, bo->handle));
+- return bo->map__cpu = (void *)(uintptr_t)mmap_arg.addr_ptr;
++ return bo->map__cpu = (void *)(uintptr_t)arg.addr_ptr;
+ }
+
+ static int gem_write(int fd, uint32_t handle,
+--
+2.4.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-intel/udev-fstat.patch b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-intel/udev-fstat.patch
new file mode 100644
index 000000000..0e675ee9f
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-intel/udev-fstat.patch
@@ -0,0 +1,59 @@
+Upstream-Status: Backport
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+From 12af8a575d1518d40416f83195049157c3a062a5 Mon Sep 17 00:00:00 2001
+From: Chris Wilson <chris@chris-wilson.co.uk>
+Date: Tue, 24 Feb 2015 15:25:40 +0000
+Subject: sna: udev integration depends on fstat and sys/stat.h
+
+src/sna/sna_driver.c: In function 'sna_handle_uevents':
+src/sna/sna_driver.c:759:2: error: implicit declaration of function 'fstat' [-Werror=implicit-function-declaration]
+
+Also take the opportunity to include udev support in the configure
+summary.
+
+Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
+
+diff --git a/configure.ac b/configure.ac
+index 7476e2b..de3a4b3 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -197,11 +197,15 @@ AC_ARG_ENABLE(udev,
+
+ if test "x$UDEV" != "xno"; then
+ PKG_CHECK_MODULES(UDEV, [libudev], [udev="yes"], [udev="no"])
++ AC_CHECK_HEADERS([sys/stat.h], [], [udev="no"])
+ if test "x$UDEV" = "xyes" -a "x$udev" != "xyes"; then
+ AC_MSG_ERROR([udev support requested but not found (libudev)])
+ fi
+ if test "x$udev" = "xyes"; then
+ AC_DEFINE(HAVE_UDEV,1,[Enable udev-based monitor hotplug detection])
++ udev_msg=" yes"
++ else
++ udev_msg=" no"
+ fi
+ fi
+
+@@ -911,6 +915,7 @@ echo " Support for Kernel Mode Setting? $KMS"
+ echo " Support for legacy User Mode Setting (for i810)? $UMS"
+ echo " Support for Direct Rendering Infrastructure:$dri_msg"
+ echo " Support for Xv motion compensation (XvMC and libXvMC):$xvmc_msg"
++echo " Support for display hotplug notifications (udev):$udev_msg"
+ echo " Build additional tools and utilities?$tools_msg"
+ if test -n "$xp_msg"; then
+ echo " Experimental support:$xp_msg"
+diff --git a/src/sna/sna_driver.c b/src/sna/sna_driver.c
+index 8c0d0b5..bc20ef0 100644
+--- a/src/sna/sna_driver.c
++++ b/src/sna/sna_driver.c
+@@ -740,6 +740,8 @@ sna_wakeup_handler(WAKEUPHANDLER_ARGS_DECL)
+ }
+
+ #if HAVE_UDEV
++#include <sys/stat.h>
++
+ static void
+ sna_handle_uevents(int fd, void *closure)
+ {
+--
+cgit v0.10.2
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-intel_2.99.917.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-intel_2.99.917.bb
new file mode 100644
index 000000000..d75b44f17
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-intel_2.99.917.bb
@@ -0,0 +1,42 @@
+require xorg-driver-video.inc
+
+SUMMARY = "X.Org X server -- Intel integrated graphics chipsets driver"
+
+DESCRIPTION = "intel is an Xorg driver for Intel integrated graphics \
+chipsets. The driver supports depths 8, 15, 16 and 24. On some chipsets, \
+the driver supports hardware accelerated 3D via the Direct Rendering \
+Infrastructure (DRI)."
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=8730ad58d11c7bbad9a7066d69f7808e"
+
+SRC_URI += "file://disable-x11-dri3.patch \
+ file://always_include_xorg_server.h.patch \
+ file://sna-Protect-against-ABI-breakage-in-recent-versions-.patch \
+ file://udev-fstat.patch \
+ file://0001-uxa-fix-the-call-to-PixmapSyncDirtyHelper-broken-by-.patch \
+ file://0001-gen8-Fix-the-YUV-RGB-shader.patch \
+ "
+
+SRC_URI[md5sum] = "fa196a66e52c0c624fe5d350af7a5e7b"
+SRC_URI[sha256sum] = "00b781eea055582820a123c47b62411bdf6aabf4f03dc0568faec55faf9667c9"
+
+DEPENDS += "virtual/libx11 drm libpciaccess pixman"
+
+PACKAGECONFIG ??= "xvmc sna udev ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'dri dri1 dri2', '', d)}"
+
+PACKAGECONFIG[dri] = "--enable-dri,--disable-dri"
+PACKAGECONFIG[dri1] = "--enable-dri1,--disable-dri1,xf86driproto"
+PACKAGECONFIG[dri2] = "--enable-dri2,--disable-dri2,dri2proto"
+PACKAGECONFIG[dri3] = "--enable-dri3,--disable-dri3,dri3proto"
+PACKAGECONFIG[sna] = "--enable-sna,--disable-sna"
+PACKAGECONFIG[uxa] = "--enable-uxa,--disable-uxa"
+PACKAGECONFIG[udev] = "--enable-udev,--disable-udev,udev"
+PACKAGECONFIG[xvmc] = "--enable-xvmc,--disable-xvmc,libxvmc xcb-util"
+PACKAGECONFIG[tools] = "--enable-tools,--disable-tools,libxinerama libxrandr libxdamage libxfixes libxcursor libxtst libxext libxrender"
+
+# --enable-kms-only option is required by ROOTLESS_X
+EXTRA_OECONF += '${@base_conditional( "ROOTLESS_X", "1", " --enable-kms-only", "", d )}'
+
+COMPATIBLE_HOST = '(i.86|x86_64).*-linux'
+
+FILES_${PN} += "${datadir}/polkit-1"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-omap_0.4.4.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-omap_0.4.4.bb
new file mode 100644
index 000000000..78954497a
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-omap_0.4.4.bb
@@ -0,0 +1,41 @@
+require xorg-driver-video.inc
+
+SUMMARY = "X.Org X server -- Texas Instruments OMAP framebuffer driver"
+
+SUMMARY = "X.Org X server -- TI OMAP integrated graphics chipsets driver"
+
+DESCRIPTION = "Open-source X.org graphics driver for TI OMAP graphics \
+Currently relies on a closed-source submodule for EXA acceleration on \
+the following chipsets: \
+ + OMAP3430 \
+ + OMAP3630 \
+ + OMAP4430 \
+ + OMAP4460 \
+ + OMAP5430 \
+ + OMAP5432 \
+\
+NOTE: this driver is work in progress.. you probably don't want to try \
+and use it yet. The API/ABI between driver and kernel, and driver and \
+acceleration submodules is not stable yet. This driver requires the \
+omapdrm kernel driver w/ GEM support. \
+"
+
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=10ce5de3b111315ea652a5f74ec0c602"
+DEPENDS += "virtual/libx11 libdrm xf86driproto"
+
+SRC_URI[md5sum] = "a364e151a537948f75bb8c9b840a31da"
+SRC_URI[sha256sum] = "a7192690b8638f5c8d611a1bae07cc13081e22edd4070f37a2f5c3f8d79e7ebc"
+
+CFLAGS += " -I${STAGING_INCDIR}/xorg "
+
+# Use overlay 2 on omap3 to enable other apps to use overlay 1 (e.g. dmai or omapfbplay)
+do_compile_prepend_armv7a () {
+ sed -i -e s:fb1:fb2:g ${S}/src/omap_xv.c
+}
+
+python () {
+ if not bb.utils.contains ('DISTRO_FEATURES', 'opengl', True, False, d):
+ raise bb.parse.SkipPackage("'opengl' not in DISTRO_FEATURES")
+}
+
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-omapfb/0001-Prevents-omapfb-from-from-crashing-when-pixelclock-o.patch b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-omapfb/0001-Prevents-omapfb-from-from-crashing-when-pixelclock-o.patch
new file mode 100644
index 000000000..c4cf16eb0
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-omapfb/0001-Prevents-omapfb-from-from-crashing-when-pixelclock-o.patch
@@ -0,0 +1,35 @@
+From 28c006c94e57ea71df11ec4fff79d7ffcfc4860f Mon Sep 17 00:00:00 2001
+From: Far McKon <FarMcKon@buglabs.net>
+Date: Tue, 3 May 2011 20:59:04 +0300
+Subject: [PATCH] Prevents omapfb from from crashing when pixelclock of 0 is
+ sent to it.
+
+Due to a Linux design bug it is easy to get a pixelclock set to zero
+when changing displays at runtime.
+---
+ src/omapfb-output.c | 9 +++++++--
+ 1 file changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/src/omapfb-output.c b/src/omapfb-output.c
+index f8b4db3..4d59265 100644
+--- a/src/omapfb-output.c
++++ b/src/omapfb-output.c
+@@ -125,8 +125,13 @@ OMAPFBOutputGetModes(xf86OutputPtr output)
+ /* Only populate the native (current) mode */
+ mode = calloc(1, sizeof(DisplayModeRec));
+ mode->type |= M_T_PREFERRED;
+- mode->Clock = PICOS2KHZ(ofb->state_info.pixclock);
+- mode->SynthClock = PICOS2KHZ(ofb->state_info.pixclock);
++ if (ofb->state_info.pixclock == 0) {
++ mode->Clock = 0;
++ mode->SynthClock = 0;
++ } else {
++ mode->Clock = PICOS2KHZ(ofb->state_info.pixclock);
++ mode->SynthClock = PICOS2KHZ(ofb->state_info.pixclock);
++ }
+ mode->HDisplay = ofb->state_info.xres;
+ mode->HSyncStart = mode->HDisplay
+ + ofb->state_info.right_margin;
+--
+2.1.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-omapfb/0001-Revert-Set-a-large-CRTC-upper-limit-to-not-prune-lar.patch b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-omapfb/0001-Revert-Set-a-large-CRTC-upper-limit-to-not-prune-lar.patch
new file mode 100644
index 000000000..9fb01d438
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-omapfb/0001-Revert-Set-a-large-CRTC-upper-limit-to-not-prune-lar.patch
@@ -0,0 +1,41 @@
+From 8fb7d0f99d4afbb574b30cb4f1e66a8f89d94ad5 Mon Sep 17 00:00:00 2001
+From: Koen Kooi <koen@dominion.thruhere.net>
+Date: Wed, 26 Jan 2011 12:04:36 +0100
+Subject: [PATCH 1/6] Revert "Set a large CRTC upper limit to not prune larger
+ resolutions"
+
+Picture is garbled after switching resolutions, so revert it.
+Virtual size too big, revert the commit 9c4d7592dcb7dc20a48a6f941d9d94bd73d34153.
+
+Upstream-Status: Pending
+
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+---
+ src/omapfb-crtc.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/src/omapfb-crtc.c b/src/omapfb-crtc.c
+index 9aaa52f..cbeff35 100644
+--- a/src/omapfb-crtc.c
++++ b/src/omapfb-crtc.c
+@@ -190,13 +190,13 @@ OMAPFBCRTCInit(ScrnInfoPtr pScrn)
+ * In practise, this doesn't seem to be supported.
+ * (no way to setup the overlay offset/base address)
+ */
+- /* FIXME: figure out what makes sense here. A known max resolution?
+- * framebuffer size?
+- */
+ xf86CrtcSetSizeRange(pScrn,
+- 8, 8, 2048, 2048);
++ 8, 8,
++ ofb->state_info.xres_virtual,
++ ofb->state_info.yres_virtual);
+
+ ofb->crtc = xf86CrtcCreate(pScrn, &OMAPFBCrtcFuncs);
++
+ }
+
+
+--
+1.8.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-omapfb/0002-Revert-Set-virtual-size-when-configuring-framebuffer.patch b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-omapfb/0002-Revert-Set-virtual-size-when-configuring-framebuffer.patch
new file mode 100644
index 000000000..683a98983
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-omapfb/0002-Revert-Set-virtual-size-when-configuring-framebuffer.patch
@@ -0,0 +1,32 @@
+From 855c333ac0d16350f895f1d1b9391e9cbb0b6db4 Mon Sep 17 00:00:00 2001
+From: Koen Kooi <koen@dominion.thruhere.net>
+Date: Wed, 26 Jan 2011 13:27:20 +0100
+Subject: [PATCH 2/6] Revert "Set virtual size when configuring framebuffer"
+
+Virtual size too big, so revert it.
+
+This reverts commit 2653ef07883fbd1a5e7025f9300cf89b79ba429a.
+
+Upstream-Status: Pending
+
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+---
+ src/omapfb-crtc.c | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/src/omapfb-crtc.c b/src/omapfb-crtc.c
+index cbeff35..9655db2 100644
+--- a/src/omapfb-crtc.c
++++ b/src/omapfb-crtc.c
+@@ -98,8 +98,6 @@ OMAPFBCrtcCommitChangeMode (xf86CrtcPtr crtc)
+ v = ofb->state_info;
+ v.xres = mode->HDisplay;
+ v.yres = mode->VDisplay;
+- v.xres_virtual = crtc->scrn->virtualX;
+- v.yres_virtual = crtc->scrn->virtualY;
+ v.activate = FB_ACTIVATE_NOW;
+ v.pixclock = KHZ2PICOS(mode->Clock ? mode->Clock : 56000);
+ v.left_margin = mode->HTotal - mode->HSyncEnd;
+--
+1.8.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-omapfb/0003-force-plain-mode.patch b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-omapfb/0003-force-plain-mode.patch
new file mode 100644
index 000000000..67ea7c1a5
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-omapfb/0003-force-plain-mode.patch
@@ -0,0 +1,31 @@
+From 252f44c072d3447a32127fc9afe5d0d40f3c510e Mon Sep 17 00:00:00 2001
+From: Koen Kooi <koen@dominion.thruhere.net>
+Date: Wed, 26 Jan 2011 13:20:20 +0100
+Subject: [PATCH 3/6] force 'plain' mode
+
+The new DSS mode breaks XV, so force plain mode
+
+Upstream-Status: Pending
+
+Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+---
+ src/omapfb-driver.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/omapfb-driver.c b/src/omapfb-driver.c
+index 018e040..48aa09c 100644
+--- a/src/omapfb-driver.c
++++ b/src/omapfb-driver.c
+@@ -326,7 +326,7 @@ OMAPFBPreInit(ScrnInfoPtr pScrn, int flags)
+ OMAPFBProbeController(ofb->ctrl_name);
+
+ /* Do we have the DSS kernel API? */
+- if (stat(SYSFS_DSS_DIR, &st) == 0) {
++ if (0) { //stat(SYSFS_DSS_DIR, &st) == 0) {
+ ofb->dss = TRUE;
+ } else {
+ ofb->dss = FALSE;
+--
+1.8.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-omapfb/0004-blacklist-tv-out.patch b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-omapfb/0004-blacklist-tv-out.patch
new file mode 100644
index 000000000..b0ac9a44c
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-omapfb/0004-blacklist-tv-out.patch
@@ -0,0 +1,33 @@
+From cfa46b67f59115f6d8ef9414af60380749ff3eb3 Mon Sep 17 00:00:00 2001
+From: Koen Kooi <koen@dominion.thruhere.net>
+Date: Wed, 26 Jan 2011 13:21:12 +0100
+Subject: [PATCH 4/6] blacklist tv out
+
+The tv-out gets added last and the driver tries to reconfigure dvi to TV resolutions, which fails. so blacklist it
+
+Upstream-Status: Pending
+
+Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+---
+ src/omapfb-output-dss.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/omapfb-output-dss.c b/src/omapfb-output-dss.c
+index 6cc52de..83cb711 100644
+--- a/src/omapfb-output-dss.c
++++ b/src/omapfb-output-dss.c
+@@ -205,6 +205,10 @@ OMAPFBDSSOutputDetect (xf86OutputPtr output)
+ if(ofb->timings[idx][0] == '\0')
+ return XF86OutputStatusDisconnected;
+
++ // Hack to disable the tv out
++ if (strncmp(output->name, "tv", 2) == 0)
++ return XF86OutputStatusDisconnected;
++
+ return XF86OutputStatusConnected;
+ }
+
+--
+1.8.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-omapfb/0005-Attempt-to-fix-VRFB.patch b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-omapfb/0005-Attempt-to-fix-VRFB.patch
new file mode 100644
index 000000000..67b284023
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-omapfb/0005-Attempt-to-fix-VRFB.patch
@@ -0,0 +1,325 @@
+From 8b1f697a60e35ab82fffdabfaefdb45e9a9df379 Mon Sep 17 00:00:00 2001
+From: Eino-Ville Talvala <talvala@stanford.edu>
+Date: Tue, 23 Aug 2011 18:37:01 +0200
+Subject: [PATCH 5/6] Attempt to fix VRFB
+
+Upstream-Status: Pending
+
+http://dominion.thruhere.net/git/cgit.cgi/xf86-video-omapfb/commit/?h=koen/fixups&id=6833fc9f795265e4943d248103fbaf3463b515d6
+
+Signed-off-by: Sebastian Krzyszkowiak <dos@dosowisko.net>
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+---
+ src/image-format-conversions.c | 4 +--
+ src/image-format-conversions.h | 2 +-
+ src/omapfb-driver.c | 28 +++++++++++++---
+ src/omapfb-xv-blizzard.c | 1 +
+ src/omapfb-xv-generic.c | 72 +++++++++++++++++++++++++++++++++---------
+ src/omapfb-xv.c | 3 ++
+ 6 files changed, 88 insertions(+), 22 deletions(-)
+
+diff --git a/src/image-format-conversions.c b/src/image-format-conversions.c
+index dcefa9b..d43427d 100644
+--- a/src/image-format-conversions.c
++++ b/src/image-format-conversions.c
+@@ -38,13 +38,13 @@
+ #include "image-format-conversions.h"
+
+ /* Basic line-based copy for packed formats */
+-void packed_line_copy(int w, int h, int stride, uint8_t *src, uint8_t *dest)
++void packed_line_copy(int w, int h, int src_stride, int dst_stride, uint8_t *src, uint8_t *dest)
+ {
+ int i;
+ int len = w * 2;
+ for (i = 0; i < h; i++)
+ {
+- memcpy(dest + i * len, src + i * stride, len);
++ memcpy(dest + i * dst_stride, src + i * src_stride, len);
+ }
+ }
+
+diff --git a/src/image-format-conversions.h b/src/image-format-conversions.h
+index 584896a..ba7caf2 100644
+--- a/src/image-format-conversions.h
++++ b/src/image-format-conversions.h
+@@ -27,7 +27,7 @@
+ #include <stdint.h>
+
+ /* Basic line-based copy for packed formats */
+-void packed_line_copy(int w, int h, int stride, uint8_t *src, uint8_t *dest);
++void packed_line_copy(int w, int h, int src_stride, int dst_stride, uint8_t *src, uint8_t *dest);
+
+ /* Basic C implementation of YV12/I420 to UYVY conversion */
+ void uv12_to_uyvy(int w, int h, int y_pitch, int uv_pitch, uint8_t *y_p, uint8_t *u_p, uint8_t *v_p, uint8_t *dest);
+diff --git a/src/omapfb-driver.c b/src/omapfb-driver.c
+index 48aa09c..07989f5 100644
+--- a/src/omapfb-driver.c
++++ b/src/omapfb-driver.c
+@@ -66,6 +66,7 @@
+ #define OMAPFB_VERSION 1000
+ #define OMAPFB_DRIVER_NAME "OMAPFB"
+ #define OMAPFB_NAME "omapfb"
++#define ENFORCE_MODES
+
+ static Bool OMAPFBProbe(DriverPtr drv, int flags);
+ static Bool OMAPFBPreInit(ScrnInfoPtr pScrn, int flags);
+@@ -105,11 +106,13 @@ static SymTabRec OMAPFBChipsets[] = {
+ typedef enum {
+ OPTION_ACCELMETHOD,
+ OPTION_FB,
++ OPTION_ROTATE,
+ } FBDevOpts;
+
+ static const OptionInfoRec OMAPFBOptions[] = {
+ { OPTION_ACCELMETHOD, "AccelMethod", OPTV_STRING, {0}, FALSE },
+ { OPTION_FB, "fb", OPTV_STRING, {0}, FALSE },
++ { OPTION_ROTATE, "rotation", OPTV_STRING, {0}, FALSE },
+ { -1, NULL, OPTV_NONE, {0}, FALSE }
+ };
+
+@@ -286,6 +289,7 @@ OMAPFBPreInit(ScrnInfoPtr pScrn, int flags)
+ {
+ OMAPFBPtr ofb;
+ EntityInfoPtr pEnt;
++ char *rotate;
+ rgb zeros = { 0, 0, 0 };
+ struct stat st;
+
+@@ -379,6 +383,8 @@ OMAPFBPreInit(ScrnInfoPtr pScrn, int flags)
+ pScrn->progClock = TRUE;
+ pScrn->chipset = "omapfb";
+
++ xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Rotate test version 0.02\n");
++
+ /* Start with configured virtual size */
+ pScrn->virtualX = pScrn->display->virtualX;
+ pScrn->virtualY = pScrn->display->virtualY;
+@@ -496,12 +502,21 @@ OMAPFBScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
+ ofb->CloseScreen = pScreen->CloseScreen;
+ pScreen->CloseScreen = OMAPFBCloseScreen;
+
++ /* Enforce the default mode (this is silly I guess) */
++#ifdef ENFORCE_MODES
++ //xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Enforcing modes\n");
++ //set_mode(ofb, &ofb->default_mode);
++ //pScrn->displayWidth = ofb->fixed_info.line_length /
++ // (ofb->state_info.bits_per_pixel>>3); //ofb->state_info.xres;
++#endif
++
+ /* Map our framebuffer memory */
++ ofb->mem_info.size = ofb->fixed_info.line_length * ofb->state_info.yres;
+ ofb->fb = mmap (NULL, ofb->mem_info.size,
+ PROT_READ | PROT_WRITE, MAP_SHARED,
+ ofb->fd, 0);
+- if (ofb->fb == NULL) {
+- xf86DrvMsg(scrnIndex, X_ERROR, "Mapping framebuffer memory failed\n");
++ if (ofb->fb == MAP_FAILED) {
++ xf86DrvMsg(scrnIndex, X_ERROR, "Mapping framebuffer memory failed, wanted %d bytes.\n", ofb->mem_info.size);
+ return FALSE;
+ }
+
+@@ -578,8 +593,13 @@ OMAPFBScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
+ } else if (!ofb->dss) {
+
+ ofb->plane_info.enabled = 1;
+- ofb->plane_info.out_width = ofb->state_info.xres;
+- ofb->plane_info.out_height = ofb->state_info.yres;
++ if (ofb->state_info.rotate == 0 || ofb->state_info.rotate == 2) {
++ ofb->plane_info.out_width = ofb->state_info.xres;
++ ofb->plane_info.out_height = ofb->state_info.yres;
++ } else {
++ ofb->plane_info.out_width = ofb->state_info.yres;
++ ofb->plane_info.out_height = ofb->state_info.xres;
++ }
+
+ if (ioctl (ofb->fd, OMAPFB_SETUP_PLANE, &ofb->plane_info)) {
+ xf86DrvMsg(scrnIndex, X_ERROR,
+diff --git a/src/omapfb-xv-blizzard.c b/src/omapfb-xv-blizzard.c
+index 406ffc6..b71d2aa 100644
+--- a/src/omapfb-xv-blizzard.c
++++ b/src/omapfb-xv-blizzard.c
+@@ -220,6 +220,7 @@ int OMAPFBXVPutImageBlizzard (ScrnInfoPtr pScrn,
+ packed_line_copy(src_w & ~3,
+ src_h & ~3,
+ ((src_w + 1) & ~1) * 2,
++ ofb->port->fixed_info.line_length,
+ (uint8_t*)buf,
+ (uint8_t*)ofb->port->fb);
+ break;
+diff --git a/src/omapfb-xv-generic.c b/src/omapfb-xv-generic.c
+index e6f89fe..b33f344 100644
+--- a/src/omapfb-xv-generic.c
++++ b/src/omapfb-xv-generic.c
+@@ -62,7 +62,7 @@ int OMAPXVAllocPlane(ScrnInfoPtr pScrn)
+ {
+ OMAPFBPtr ofb = OMAPFB(pScrn);
+
+- /* The memory size is already set in OMAPFBXVQueryImageAttributes */
++ /* The memory size is already set before we get here */
+ if (ioctl(ofb->port->fd, OMAPFB_SETUP_MEM, &ofb->port->mem_info) != 0) {
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+ "Failed to allocate video plane memory\n");
+@@ -73,19 +73,20 @@ int OMAPXVAllocPlane(ScrnInfoPtr pScrn)
+ ofb->port->fb = mmap (NULL, ofb->port->mem_info.size,
+ PROT_READ | PROT_WRITE, MAP_SHARED,
+ ofb->port->fd, 0);
+- if (ofb->port->fb == NULL) {
++ if (ofb->port->fb == MAP_FAILED) {
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+ "Mapping video memory failed\n");
+ return XvBadAlloc;
+ }
+
+ /* Update the state info */
++ /* Let's not - it's bad
+ if (ioctl (ofb->port->fd, FBIOGET_VSCREENINFO, &ofb->port->state_info))
+ {
+ xf86Msg(X_ERROR, "%s: Reading state info failed\n", __FUNCTION__);
+ return XvBadAlloc;
+ }
+-
++ */
+ return Success;
+ }
+
+@@ -93,6 +94,7 @@ int OMAPXVAllocPlane(ScrnInfoPtr pScrn)
+ int OMAPXVSetupVideoPlane(ScrnInfoPtr pScrn)
+ {
+ OMAPFBPtr ofb = OMAPFB(pScrn);
++ int ret;
+
+ if (ioctl (ofb->port->fd, FBIOPUT_VSCREENINFO, &ofb->port->state_info))
+ {
+@@ -104,6 +106,31 @@ int OMAPXVSetupVideoPlane(ScrnInfoPtr pScrn)
+ xf86Msg(X_ERROR, "%s: Reading state info failed\n", __FUNCTION__);
+ return XvBadAlloc;
+ }
++ /* Changing rotation/nonstd flags can change the fixed info! */
++ if (ioctl (ofb->port->fd, FBIOGET_FSCREENINFO, &ofb->port->fixed_info))
++ {
++ xf86Msg(X_ERROR, "%s: Reading state info failed\n", __FUNCTION__);
++ return XvBadAlloc;
++ }
++ /* Correct fixed info requires recalculation of needed memory */
++ ofb->port->mem_info.size = ofb->port->fixed_info.line_length * ofb->port->state_info.yres;
++
++ /* Allocate buffer memory */
++ ret = OMAPXVAllocPlane(pScrn);
++ if (ret != Success)
++ return ret;
++
++ /* Workaround for reset of mode after memory allo */
++ if (ioctl (ofb->port->fd, FBIOPUT_VSCREENINFO, &ofb->port->state_info))
++ {
++ xf86Msg(X_ERROR, "%s: setting state info failed\n", __FUNCTION__);
++ return XvBadAlloc;
++ }
++ if (ioctl (ofb->port->fd, FBIOGET_VSCREENINFO, &ofb->port->state_info))
++ {
++ xf86Msg(X_ERROR, "%s: Reading state info failed\n", __FUNCTION__);
++ return XvBadAlloc;
++ }
+
+ if(ioctl(ofb->port->fd, OMAPFB_SETUP_PLANE,
+ &ofb->port->plane_info) != 0) {
+@@ -124,6 +151,8 @@ int OMAPFBXVPutImageGeneric (ScrnInfoPtr pScrn,
+ DrawablePtr pDraw)
+ {
+ OMAPFBPtr ofb = OMAPFB(pScrn);
++ short drw_temp;
++ short rot_xres, rot_yres;
+
+ if (!ofb->port->plane_info.enabled
+ || ofb->port->update_window.x != src_x
+@@ -163,13 +192,6 @@ int OMAPFBXVPutImageGeneric (ScrnInfoPtr pScrn,
+ return Success;
+ }
+
+- /* If we don't have the plane running, enable it */
+- if (!ofb->port->plane_info.enabled) {
+- ret = OMAPXVAllocPlane(pScrn);
+- if (ret != Success)
+- return ret;
+- }
+-
+ /* Set up the state info, xres and yres will be used for
+ * scaling to the values in the plane info struct
+ */
+@@ -179,12 +201,31 @@ int OMAPFBXVPutImageGeneric (ScrnInfoPtr pScrn,
+ ofb->port->state_info.yres_virtual = 0;
+ ofb->port->state_info.xoffset = 0;
+ ofb->port->state_info.yoffset = 0;
+- ofb->port->state_info.rotate = 0;
++ //ofb->port->state_info.rotate = 0;
+ ofb->port->state_info.grayscale = 0;
+ ofb->port->state_info.activate = FB_ACTIVATE_NOW;
+ ofb->port->state_info.bits_per_pixel = 0;
+ ofb->port->state_info.nonstd = xv_to_omapfb_format(image);
+
++ /* Plane info does not rotate with state_info */
++ if (ofb->port->state_info.rotate == 1 ||
++ ofb->port->state_info.rotate == 3) {
++ drw_temp = drw_x;
++ drw_x = drw_y;
++ drw_y = drw_temp;
++
++ drw_temp = drw_w;
++ drw_w = drw_h;
++ drw_h = drw_temp;
++
++ rot_xres = ofb->port->state_info.yres;
++ rot_yres = ofb->port->state_info.xres;
++ } else {
++ rot_xres = ofb->port->state_info.xres;
++ rot_yres = ofb->port->state_info.yres;
++ }
++
++
+ /* Set up the video plane info */
+ ofb->port->plane_info.enabled = 1;
+ ofb->port->plane_info.pos_x = drw_x;
+@@ -193,13 +234,13 @@ int OMAPFBXVPutImageGeneric (ScrnInfoPtr pScrn,
+ ofb->port->plane_info.out_height = drw_h & ~15;
+
+ /* Cap output to screen size */
+- if (ofb->port->plane_info.out_width > ofb->state_info.xres) {
++ if (ofb->port->plane_info.out_width > rot_xres) {
+ ofb->port->plane_info.pos_x = 0;
+- ofb->port->plane_info.out_width = ofb->state_info.xres;
++ ofb->port->plane_info.out_width = rot_xres;
+ }
+- if (ofb->port->plane_info.out_height > ofb->state_info.yres) {
++ if (ofb->port->plane_info.out_height > rot_yres) {
+ ofb->port->plane_info.pos_y = 0;
+- ofb->port->plane_info.out_height = ofb->state_info.yres;
++ ofb->port->plane_info.out_height = rot_yres;
+ }
+
+ ret = OMAPXVSetupVideoPlane(pScrn);
+@@ -223,6 +264,7 @@ int OMAPFBXVPutImageGeneric (ScrnInfoPtr pScrn,
+ packed_line_copy(src_w & ~15,
+ src_h & ~15,
+ ((src_w + 1) & ~1) * 2,
++ ofb->port->fixed_info.line_length,
+ (uint8_t*)buf,
+ (uint8_t*)ofb->port->fb);
+ break;
+diff --git a/src/omapfb-xv.c b/src/omapfb-xv.c
+index 1df651e..0fee2c6 100644
+--- a/src/omapfb-xv.c
++++ b/src/omapfb-xv.c
+@@ -169,8 +169,11 @@ static int OMAPFBXVQueryImageAttributes (ScrnInfoPtr pScrn,
+ h = *height;
+
+ w = (w + 1) & ~1;
++
++ /* Can't calculate these here - don't know line length
+ ofb->port->mem_info.size = w << 1;
+ ofb->port->mem_info.size *= h;
++ */
+
+ return size;
+ }
+--
+1.8.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-omapfb/0006-omapfb-port-to-new-xserver-video-API.patch b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-omapfb/0006-omapfb-port-to-new-xserver-video-API.patch
new file mode 100644
index 000000000..d56729987
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-omapfb/0006-omapfb-port-to-new-xserver-video-API.patch
@@ -0,0 +1,272 @@
+From 803ecf2909949e6152f4a81b6cbb92a4430679ac Mon Sep 17 00:00:00 2001
+From: Martin Jansa <Martin.Jansa@gmail.com>
+Date: Fri, 23 Nov 2012 00:31:06 +0100
+Subject: [PATCH 6/6] omapfb: port to new xserver video API
+
+Upstream-Status: Pending
+
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+---
+ src/compat-api.h | 96 +++++++++++++++++++++++++++++++++++++++++++++++++++++
+ src/omapfb-driver.c | 41 ++++++++++++-----------
+ 2 files changed, 118 insertions(+), 19 deletions(-)
+ create mode 100644 src/compat-api.h
+
+diff --git a/src/compat-api.h b/src/compat-api.h
+new file mode 100644
+index 0000000..b1591b1
+--- /dev/null
++++ b/src/compat-api.h
+@@ -0,0 +1,96 @@
++/*
++ * Copyright 2012 Red Hat, Inc.
++ *
++ * 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.
++ *
++ * Author: Dave Airlie <airlied@redhat.com>
++ */
++
++/* this file provides API compat between server post 1.13 and pre it,
++ it should be reused inside as many drivers as possible */
++#ifndef COMPAT_API_H
++#define COMPAT_API_H
++
++#ifndef GLYPH_HAS_GLYPH_PICTURE_ACCESSOR
++#define GetGlyphPicture(g, s) GlyphPicture((g))[(s)->myNum]
++#define SetGlyphPicture(g, s, p) GlyphPicture((g))[(s)->myNum] = p
++#endif
++
++#ifndef XF86_HAS_SCRN_CONV
++#define xf86ScreenToScrn(s) xf86Screens[(s)->myNum]
++#define xf86ScrnToScreen(s) screenInfo.screens[(s)->scrnIndex]
++#endif
++
++#ifndef XF86_SCRN_INTERFACE
++
++#define SCRN_ARG_TYPE int
++#define SCRN_INFO_PTR(arg1) ScrnInfoPtr pScrn = xf86Screens[(arg1)]
++
++#define SCREEN_ARG_TYPE int
++#define SCREEN_PTR(arg1) ScreenPtr pScreen = screenInfo.screens[(arg1)]
++
++#define SCREEN_INIT_ARGS_DECL int index, ScreenPtr pScreen, int argc, char **argv
++
++#define BLOCKHANDLER_ARGS_DECL int arg, pointer blockData, pointer pTimeout, pointer pReadmask
++#define BLOCKHANDLER_ARGS arg, blockData, pTimeout, pReadmask
++
++#define CLOSE_SCREEN_ARGS_DECL int scrnIndex, ScreenPtr pScreen
++#define CLOSE_SCREEN_ARGS scrnIndex, pScreen
++
++#define ADJUST_FRAME_ARGS_DECL int arg, int x, int y, int flags
++
++#define SWITCH_MODE_ARGS_DECL int arg, DisplayModePtr mode, int flags
++
++#define FREE_SCREEN_ARGS_DECL int arg, int flags
++#define FREE_SCREEN_ARGS(x) (x)->scrnIndex, 0
++
++#define VT_FUNC_ARGS_DECL int arg, int flags
++#define VT_FUNC_ARGS(flags) pScrn->scrnIndex, (flags)
++
++#define XF86_ENABLEDISABLEFB_ARG(x) ((x)->scrnIndex)
++#else
++#define SCRN_ARG_TYPE ScrnInfoPtr
++#define SCRN_INFO_PTR(arg1) ScrnInfoPtr pScrn = (arg1)
++
++#define SCREEN_ARG_TYPE ScreenPtr
++#define SCREEN_PTR(arg1) ScreenPtr pScreen = (arg1)
++
++#define SCREEN_INIT_ARGS_DECL ScreenPtr pScreen, int argc, char **argv
++
++#define BLOCKHANDLER_ARGS_DECL ScreenPtr arg, pointer pTimeout, pointer pReadmask
++#define BLOCKHANDLER_ARGS arg, pTimeout, pReadmask
++
++#define CLOSE_SCREEN_ARGS_DECL ScreenPtr pScreen
++#define CLOSE_SCREEN_ARGS pScreen
++
++#define ADJUST_FRAME_ARGS_DECL ScrnInfoPtr arg, int x, int y
++#define SWITCH_MODE_ARGS_DECL ScrnInfoPtr arg, DisplayModePtr mode
++
++#define FREE_SCREEN_ARGS_DECL ScrnInfoPtr arg
++#define FREE_SCREEN_ARGS(x) (x)
++
++#define VT_FUNC_ARGS_DECL ScrnInfoPtr arg
++#define VT_FUNC_ARGS(flags) pScrn
++
++#define XF86_ENABLEDISABLEFB_ARG(x) (x)
++
++#endif
++
++#endif
+diff --git a/src/omapfb-driver.c b/src/omapfb-driver.c
+index 07989f5..486ffa4 100644
+--- a/src/omapfb-driver.c
++++ b/src/omapfb-driver.c
+@@ -44,6 +44,8 @@
+
+ #include "exa.h"
+
++#include "compat-api.h"
++
+ #ifdef HAVE_XEXTPROTO_71
+ #include <X11/extensions/dpmsconst.h>
+ #else
+@@ -70,10 +72,10 @@
+
+ static Bool OMAPFBProbe(DriverPtr drv, int flags);
+ static Bool OMAPFBPreInit(ScrnInfoPtr pScrn, int flags);
+-static Bool OMAPFBScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv);
+-static Bool OMAPFBEnterVT(int scrnIndex, int flags);
+-static void OMAPFBLeaveVT(int scrnIndex, int flags);
+-static Bool OMAPFBSwitchMode(int scrnIndex, DisplayModePtr mode, int flags);
++static Bool OMAPFBScreenInit(SCREEN_INIT_ARGS_DECL);
++static Bool OMAPFBEnterVT(VT_FUNC_ARGS_DECL);
++static void OMAPFBLeaveVT(VT_FUNC_ARGS_DECL);
++static Bool OMAPFBSwitchMode(SWITCH_MODE_ARGS_DECL);
+
+ static Bool
+ OMAPFBEnsureRec(ScrnInfoPtr pScrn)
+@@ -481,7 +483,7 @@ OMAPFBXvScreenInit(ScreenPtr pScreen)
+ }
+
+ static Bool
+-OMAPFBCloseScreen(int scrnIndex, ScreenPtr pScreen)
++OMAPFBCloseScreen(CLOSE_SCREEN_ARGS_DECL)
+ {
+ ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ OMAPFBPtr ofb = OMAPFB(pScrn);
+@@ -490,11 +492,11 @@ OMAPFBCloseScreen(int scrnIndex, ScreenPtr pScreen)
+
+ pScreen->CloseScreen = ofb->CloseScreen;
+
+- return (*pScreen->CloseScreen)(scrnIndex, pScreen);
++ return (*pScreen->CloseScreen)(CLOSE_SCREEN_ARGS);
+ }
+
+ static Bool
+-OMAPFBScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
++OMAPFBScreenInit(SCREEN_INIT_ARGS_DECL)
+ {
+ ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ OMAPFBPtr ofb = OMAPFB(pScrn);
+@@ -516,7 +518,7 @@ OMAPFBScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
+ PROT_READ | PROT_WRITE, MAP_SHARED,
+ ofb->fd, 0);
+ if (ofb->fb == MAP_FAILED) {
+- xf86DrvMsg(scrnIndex, X_ERROR, "Mapping framebuffer memory failed, wanted %d bytes.\n", ofb->mem_info.size);
++ xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Mapping framebuffer memory failed, wanted %d bytes.\n", ofb->mem_info.size);
+ return FALSE;
+ }
+
+@@ -526,7 +528,7 @@ OMAPFBScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
+ /* Only support TrueColor for now */
+ if (!miSetVisualTypes(pScrn->depth, TrueColorMask,
+ pScrn->rgbBits, pScrn->defaultVisual)) {
+- xf86DrvMsg(scrnIndex, X_ERROR, "visual type setup failed"
++ xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "visual type setup failed"
+ " for %d bits per pixel [1]\n",
+ pScrn->bitsPerPixel);
+ return FALSE;
+@@ -534,7 +536,7 @@ OMAPFBScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
+
+ /* Set up pixmap depth information */
+ if (!miSetPixmapDepths()) {
+- xf86DrvMsg(scrnIndex,X_ERROR,"pixmap depth setup failed\n");
++ xf86DrvMsg(pScrn->scrnIndex,X_ERROR,"pixmap depth setup failed\n");
+ return FALSE;
+ }
+
+@@ -546,7 +548,7 @@ OMAPFBScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
+ pScrn->virtualY, pScrn->xDpi,
+ pScrn->yDpi, pScrn->displayWidth,
+ pScrn->bitsPerPixel)) {
+- xf86DrvMsg(scrnIndex, X_ERROR, "fbScreenInit failed\n");
++ xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "fbScreenInit failed\n");
+ return FALSE;
+ }
+
+@@ -567,7 +569,7 @@ OMAPFBScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
+
+ /* Initialize XRender fallbacks */
+ if (!fbPictureInit(pScreen, NULL, 0)) {
+- xf86DrvMsg(scrnIndex, X_ERROR, "fbPictureInit failed\n");
++ xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "fbPictureInit failed\n");
+ return FALSE;
+ }
+
+@@ -579,7 +581,7 @@ OMAPFBScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
+
+ /* Initialize default colormap */
+ if (!miCreateDefColormap(pScreen)) {
+- xf86DrvMsg(scrnIndex, X_ERROR,
++ xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+ "creating default colormap failed\n");
+ return FALSE;
+ }
+@@ -589,7 +591,7 @@ OMAPFBScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
+ /* This is non-fatal since we might be running against older
+ * kernel driver in which case we only do basic 2D stuff...
+ */
+- xf86DrvMsg(scrnIndex, X_ERROR, "Reading plane info failed\n");
++ xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Reading plane info failed\n");
+ } else if (!ofb->dss) {
+
+ ofb->plane_info.enabled = 1;
+@@ -602,7 +604,7 @@ OMAPFBScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
+ }
+
+ if (ioctl (ofb->fd, OMAPFB_SETUP_PLANE, &ofb->plane_info)) {
+- xf86DrvMsg(scrnIndex, X_ERROR,
++ xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+ "%s: Plane setup failed: %s\n",
+ __FUNCTION__, strerror(errno));
+ return FALSE;
+@@ -645,9 +647,10 @@ OMAPFBScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
+ return TRUE;
+ }
+
+-static Bool OMAPFBSwitchMode(int scrnIndex, DisplayModePtr mode, int flags)
++static Bool OMAPFBSwitchMode(SWITCH_MODE_ARGS_DECL)
+ {
+- return xf86SetSingleMode (xf86Screens[scrnIndex], mode, RR_Rotate_0);
++ SCRN_INFO_PTR(arg);
++ return xf86SetSingleMode (pScrn, mode, RR_Rotate_0);
+ }
+
+ void
+@@ -699,14 +702,14 @@ OMAPFBPrintCapabilities(ScrnInfoPtr pScrn,
+ /*** Unimplemented: */
+
+ static Bool
+-OMAPFBEnterVT(int scrnIndex, int flags)
++OMAPFBEnterVT(VT_FUNC_ARGS_DECL)
+ {
+ xf86Msg(X_NOT_IMPLEMENTED, "%s\n", __FUNCTION__);
+ return TRUE;
+ }
+
+ static void
+-OMAPFBLeaveVT(int scrnIndex, int flags)
++OMAPFBLeaveVT(VT_FUNC_ARGS_DECL)
+ {
+ xf86Msg(X_NOT_IMPLEMENTED, "%s\n", __FUNCTION__);
+ }
+--
+1.8.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-omapfb/0007-always_include_xorg_server.h.patch b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-omapfb/0007-always_include_xorg_server.h.patch
new file mode 100644
index 000000000..dc0b9b3f4
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-omapfb/0007-always_include_xorg_server.h.patch
@@ -0,0 +1,48 @@
+Fix errors with glibc 2.20
+
+In file included from /home/ubuntu/work/upstream/openembedded-core/build/tmp-glibc/sysroots/qemux86/usr/include/string.h:634:0,
+ from /home/ubuntu/work/upstream/openembedded-core/build/tmp-glibc/sysroots/qemux86/usr/include/xorg/os.h:53,
+ from /home/ubuntu/work/upstream/openembedded-core/build/tmp-glibc/sysroots/qemux86/usr/include/xorg/misc.h:115,
+ from /home/ubuntu/work/upstream/openembedded-core/build/tmp-glibc/sysroots/qemux86/usr/include/xorg/xf86str.h:37,
+ from /home/ubuntu/work/upstream/openembedded-core/build/tmp-glibc/sysroots/qemux86/usr/include/xorg/xf86.h:44,
+ from /home/ubuntu/work/upstream/openembedded-core/build/tmp-glibc/work/i586-oe-linux/xf86-video-omapfb/2_0.1.1+gitrAUTOINC+28c006c94e-r21.7/git/src/omapfb-xv-blizzard.c:33:
+/home/ubuntu/work/upstream/openembedded-core/build/tmp-glibc/sysroots/qemux86/usr/include/xorg/os.h:579:1: error: expected identifier or '(' before '__extension__'
+ strndup(const char *str, size_t n);
+ ^
+In file included from /home/ubuntu/work/upstream/openembedded-core/build/tmp-glibc/sysroots/qemux86/usr/include/string.h:634:0,
+ from /home/ubuntu/work/upstream/openembedded-core/build/tmp-glibc/sysroots/qemux86/usr/include/xorg/os.h:53,
+ from /home/ubuntu/work/upstream/openembedded-core/build/tmp-glibc/sysroots/qemux86/usr/include/xorg/misc.h:115,
+ from /home/ubuntu/work/upstream/openembedded-core/build/tmp-glibc/sysroots/qemux86/usr/include/xorg/xf86str.h:37,
+ from /home/ubuntu/work/upstream/openembedded-core/build/tmp-glibc/sysroots/qemux86/usr/include/xorg/xf86.h:44,
+ from /home/ubuntu/work/upstream/openembedded-core/build/tmp-glibc/work/i586-oe-linux/xf86-video-omapfb/2_0.1.1+gitrAUTOINC+28c006c94e-r21.7/git/src/omapfb-xv-generic.c:28:
+/home/ubuntu/work/upstream/openembedded-core/build/tmp-glibc/sysroots/qemux86/usr/include/xorg/os.h:579:1: error: expected identifier or '(' before '__extension__'
+ strndup(const char *str, size_t n);
+ ^
+
+Singed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Pending
+Index: git/src/omapfb-xv-blizzard.c
+===================================================================
+--- git.orig/src/omapfb-xv-blizzard.c 2014-08-28 05:16:25.684070587 -0700
++++ git/src/omapfb-xv-blizzard.c 2014-08-28 19:05:39.440070587 -0700
+@@ -30,6 +30,7 @@
+ * -
+ */
+
++#include <xorg-server.h>
+ #include "xf86.h"
+ #include "xf86_OSlib.h"
+ #include "xf86xv.h"
+Index: git/src/omapfb-xv-generic.c
+===================================================================
+--- git.orig/src/omapfb-xv-generic.c 2014-08-28 05:16:25.684070587 -0700
++++ git/src/omapfb-xv-generic.c 2014-08-28 19:05:51.780070587 -0700
+@@ -25,6 +25,7 @@
+ * Generic functions for the XV driver
+ */
+
++#include <xorg-server.h>
+ #include "xf86.h"
+ #include "xf86_OSlib.h"
+ #include "xf86xv.h"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-omapfb_git.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-omapfb_git.bb
new file mode 100644
index 000000000..7ebb960f1
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-omapfb_git.bb
@@ -0,0 +1,37 @@
+require xorg-driver-video.inc
+
+SUMMARY = "X.Org X server -- Texas Instruments OMAP framebuffer driver"
+
+DESCRIPTION = "omapfb driver supports the basic Texas Instruments OMAP \
+framebuffer."
+
+LICENSE = "MIT-X & GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=63e2cbac53863f60e2f43343fb34367f"
+DEPENDS += "virtual/libx11"
+
+SRCREV = "33e36c12dde336edbdd34626dd8adfcaebc8fbb8"
+PR = "${INC_PR}.7"
+PV = "0.1.1+gitr${SRCPV}"
+
+# Blacklist debian-specific tags in upstream version check
+UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+)(?!-)"
+
+SRC_URI = "git://anonscm.debian.org/collab-maint/xf86-video-omapfb.git \
+ file://0001-Prevents-omapfb-from-from-crashing-when-pixelclock-o.patch \
+ file://0001-Revert-Set-a-large-CRTC-upper-limit-to-not-prune-lar.patch \
+ file://0002-Revert-Set-virtual-size-when-configuring-framebuffer.patch \
+ file://0003-force-plain-mode.patch \
+ file://0004-blacklist-tv-out.patch \
+ file://0005-Attempt-to-fix-VRFB.patch \
+ file://0006-omapfb-port-to-new-xserver-video-API.patch \
+ file://0007-always_include_xorg_server.h.patch \
+"
+
+S = "${WORKDIR}/git"
+
+CFLAGS += " -I${STAGING_INCDIR}/xorg "
+
+# Use overlay 2 on omap3 to enable other apps to use overlay 1 (e.g. dmai or omapfbplay)
+do_compile_prepend_armv7a () {
+ sed -i -e s:fb1:fb2:g ${S}/src/omapfb-xv.c
+}
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-vesa_2.3.4.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-vesa_2.3.4.bb
new file mode 100644
index 000000000..fa251b50e
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-vesa_2.3.4.bb
@@ -0,0 +1,21 @@
+require xorg-driver-video.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=a1f0610ebdc6f314a9fa5102a8c5c1b0"
+
+SUMMARY = "X.Org X server -- Generic Vesa video driver"
+
+DESCRIPTION = "vesa is an Xorg driver for generic VESA video cards. It \
+can drive most VESA-compatible video cards, but only makes use of the \
+basic standard VESA core that is common to these cards. The driver \
+supports depths 8, 15 16 and 24."
+
+PR = "${INC_PR}.0"
+
+DEPENDS += "virtual/libx11 randrproto libpciaccess"
+
+COMPATIBLE_HOST = '(i.86|x86_64).*-linux'
+
+RRECOMMENDS_${PN} += "xserver-xorg-module-libint10"
+
+SRC_URI[md5sum] = "a893c37c589f7a31cea929a5d896a0e2"
+SRC_URI[sha256sum] = "7bddf4d879dd6f67088ecb203a31e12334aab980174bd0909930a21f32e251c1"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-vmware/0002-add-option-for-vmwgfx.patch b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-vmware/0002-add-option-for-vmwgfx.patch
new file mode 100644
index 000000000..6039d089a
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-vmware/0002-add-option-for-vmwgfx.patch
@@ -0,0 +1,98 @@
+Upstream-Status:Submitted
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+From f103d6f570671c649ccd7b225e6d6c9f14371888 Mon Sep 17 00:00:00 2001
+From: Ross Burton <ross.burton@intel.com>
+Date: Wed, 25 Jun 2014 16:16:44 +0100
+Subject: [PATCH 2/2] add option for vmwgfx
+
+---
+ configure.ac | 49 ++++++++++++++++++++-----------------------------
+ 1 file changed, 20 insertions(+), 29 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index be40ed7..8e15307 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -64,6 +64,13 @@ AC_ARG_ENABLE(vmwarectrl-client,
+ [VMWARECTRL=$enableval], [VMWARECTRL=no])
+ AM_CONDITIONAL(BUILD_VMWARECTRL, [test "x$VMWARECTRL" = xyes])
+
++# Define a configure option to build the vmwgfx driver
++AC_ARG_ENABLE(vmwgfx,
++ AS_HELP_STRING([--disable-vmwgfx],
++ [Disable vmwgfx driver (KMS/3D) (default: enabled)]),
++ [VMWGFX="$enableval"], [VMWGFX="yes"])
++AM_CONDITIONAL(BUILD_VMWGFX, test "x$VMWGFX" = xyes)
++
+ # Store the list of server defined optional extensions in REQUIRED_MODULES
+ XORG_DRIVER_CHECK_EXT(RANDR, randrproto)
+ XORG_DRIVER_CHECK_EXT(RENDER, renderproto)
+@@ -85,11 +92,6 @@ PKG_CHECK_EXISTS([xorg-server >= 1.4.99],
+ [AC_DEFINE([HAVE_XORG_SERVER_1_5_0], 1,
+ [Has version 1.5.0 or greater of the Xserver])])
+
+-PKG_CHECK_EXISTS([xorg-server >= 1.7.0],
+- [AC_DEFINE([HAVE_XORG_SERVER_1_7_0], 1,
+- [Has version 1.7.0 or greater of the Xserver])
+- BUILD_VMWGFX=yes],[BUILD_VMWGFX=no])
+-
+ PKG_CHECK_EXISTS([xorg-server >= 1.12.0],
+ [AC_DEFINE([HAVE_XORG_SERVER_1_12_0], 1,
+ [Has version 1.12.0 or greater of the Xserver])])
+@@ -114,39 +116,28 @@ AM_CONDITIONAL(XSERVER_LIBPCIACCESS, test "x$XSERVER_LIBPCIACCESS" = xyes)
+
+ AC_SUBST([moduledir])
+
+-if test x$BUILD_VMWGFX = xyes; then
+- PKG_CHECK_MODULES([LIBDRM], [libdrm],[],[BUILD_VMWGFX=no])
+-fi
+-if test x$BUILD_VMWGFX = xyes; then
+-#
+-# Early versions of mesa 10 forgot to bump the XA major version number in
+-# the xa_tracker.h header
+-#
+- PKG_CHECK_MODULES([XATRACKER], [xatracker >= 0.4.0],
+- [PKG_CHECK_EXISTS([xatracker = 2.0.0],
+- [AC_DEFINE([HAVE_XA_2], 1,
+- [Has version 2 of XA])])],
+- [BUILD_VMWGFX=no])
+-#
+-# Check for prime.
+-#
++AC_MSG_CHECKING([whether to build Kernel Mode Setting and 3D])
++if test x$VMWGFX = xyes; then
++ PKG_CHECK_MODULES([LIBDRM], [libdrm])
++ # Check for prime.
+ PKG_CHECK_EXISTS([libdrm >= 2.4.38],
+ [AC_DEFINE([HAVE_LIBDRM_2_4_38], 1,
+ [Has version 2.4.38 or greater of libdrm])])
+-fi
+
+-DRIVER_NAME=vmware
+-AC_SUBST([DRIVER_NAME])
+-
+-AC_MSG_CHECKING([whether to build Kernel Mode Setting and 3D])
+-if test x$BUILD_VMWGFX = xyes; then
+- AC_MSG_RESULT([yes])
++ # Early versions of mesa 10 forgot to bump the XA major version number
++ # in the xa_tracker.h header
++ PKG_CHECK_MODULES([XATRACKER], [xatracker >= 0.4.0],
++ [PKG_CHECK_EXISTS([xatracker = 2.0.0],
++ [AC_DEFINE([HAVE_XA_2], 1,
++ [Has version 2 of XA])])])
+ AC_DEFINE([BUILD_VMWGFX], 1, [Building the vmwgfx driver path])
++ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ fi
+
+-AM_CONDITIONAL(BUILD_VMWGFX, test "x$BUILD_VMWGFX" = xyes)
++DRIVER_NAME=vmware
++AC_SUBST([DRIVER_NAME])
+
+ AC_CONFIG_FILES([
+ Makefile
+--
+1.7.10.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-vmware_13.1.0.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-vmware_13.1.0.bb
new file mode 100644
index 000000000..8c891e6ae
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-vmware_13.1.0.bb
@@ -0,0 +1,19 @@
+require xorg-driver-video.inc
+
+SUMMARY = "X.Org X server -- VMware SVGA display driver"
+
+DESCRIPTION = "vmware is an Xorg driver for VMware virtual video cards."
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=5fcd7d437a959a15fbee8707747c6b53"
+
+DEPENDS += "virtual/libx11 xineramaproto videoproto libpciaccess"
+
+SRC_URI += "file://0002-add-option-for-vmwgfx.patch"
+
+SRC_URI[md5sum] = "0cba22fed4cb639d5c4276f7892c543d"
+SRC_URI[sha256sum] = "3c1d244e4b1b77e92126957965cdc9fb82de4c215c0706a3a8aaff6939e4a0cc"
+
+COMPATIBLE_HOST = '(i.86.*-linux|x86_64.*-linux)'
+
+PACKAGECONFIG ?= ""
+PACKAGECONFIG[vmwgfx] = "--enable-vmwgfx, --disable-vmwgfx, libdrm virtual/mesa"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xorg-driver-common.inc b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xorg-driver-common.inc
new file mode 100644
index 000000000..57a4c827d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xorg-driver-common.inc
@@ -0,0 +1,40 @@
+SUMMARY = "X driver"
+HOMEPAGE = "http://www.x.org"
+BUGTRACKER = "https://bugs.freedesktop.org"
+SECTION = "x11/drivers"
+LICENSE = "MIT-X"
+
+PE = "2"
+INC_PR = "r21"
+
+DEPENDS = "virtual/xserver xproto randrproto util-macros"
+
+SRC_URI = "${XORG_MIRROR}/individual/driver/${BPN}-${PV}.tar.bz2"
+
+FILES_${PN} += " ${libdir}/xorg/modules/drivers/*.so"
+
+inherit autotools pkgconfig distro_features_check
+# depends on virtual/xserver
+REQUIRED_DISTRO_FEATURES = "x11"
+
+# FIXME: We don't want to include the libtool archives (*.la) from modules
+# directory, as they serve no useful purpose. Upstream should fix Makefile.am
+do_install_append() {
+ find ${D}${libdir}/xorg/modules -regex ".*\.la$" | xargs rm -f --
+}
+
+# Function to add the relevant ABI dependency to drivers, which should be called
+# from a PACKAGEFUNC.
+def _add_xorg_abi_depends(d, name):
+ # Map of ABI names exposed in the dependencies to pkg-config variables
+ abis = {
+ "video": "abi_videodrv",
+ "input": "abi_xinput"
+ }
+
+ output = os.popen("pkg-config xorg-server --variable=%s" % abis[name]).read()
+ mlprefix = d.getVar('MLPREFIX', True) or ''
+ abi = "%sxorg-abi-%s-%s" % (mlprefix, name, output.split(".")[0])
+
+ pn = d.getVar("PN", True)
+ d.appendVar('RDEPENDS_' + pn, ' ' + abi)
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xorg-driver-input.inc b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xorg-driver-input.inc
new file mode 100644
index 000000000..c4dba1b19
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xorg-driver-input.inc
@@ -0,0 +1,12 @@
+include xorg-driver-common.inc
+
+DEPENDS += "inputproto kbproto "
+
+python add_xorg_abi_depends() {
+ _add_xorg_abi_depends(d, "input")
+}
+PACKAGEFUNCS =+ "add_xorg_abi_depends"
+
+FILES_${PN} += " ${libdir}/xorg/modules/input/*.so \
+ ${datadir}/X11/xorg.conf.d \
+ "
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xorg-driver-video.inc b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xorg-driver-video.inc
new file mode 100644
index 000000000..38281e0f2
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xorg-driver-video.inc
@@ -0,0 +1,8 @@
+include xorg-driver-common.inc
+
+DEPENDS =+ "renderproto videoproto xextproto fontsproto"
+
+python add_xorg_abi_depends() {
+ _add_xorg_abi_depends(d, "video")
+}
+PACKAGEFUNCS =+ "add_xorg_abi_depends"
OpenPOWER on IntegriCloud