Patchwork [meta-fsl-arm,v4,7/9] xf86-dri-vivante: Upgrade to 1.1.0

login
register
mail settings
Submitter Otavio Salvador
Date Feb. 12, 2013, 9:58 p.m.
Message ID <1360706330-12665-8-git-send-email-otavio@ossystems.com.br>
Download mbox | patch
Permalink /patch/44557/
State Changes Requested
Delegated to: Otavio Salvador
Headers show

Comments

Otavio Salvador - Feb. 12, 2013, 9:58 p.m.
This upgrades to the 1.1.0 version and also include the build fix for
newer Xorg API done by Andrei Gherzan.

Change-Id: I8935341e3513bcf845478a5a54a723b96c8cdcbf
Signed-off-by: Andrei Gherzan <andrei.gherzan@windriver.com>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---
 .../xf86-dri-vivante/fix-with-xorg-1-13.patch      | 141 +++++++++++++++++++++
 .../xorg-driver/xf86-dri-vivante_1.1.0.bb          |  45 +++++++
 .../xorg-driver/xf86-dri-vivante_12.09.01.bb       |  36 ------
 3 files changed, 186 insertions(+), 36 deletions(-)
 create mode 100644 recipes-graphics/xorg-driver/xf86-dri-vivante/fix-with-xorg-1-13.patch
 create mode 100644 recipes-graphics/xorg-driver/xf86-dri-vivante_1.1.0.bb
 delete mode 100644 recipes-graphics/xorg-driver/xf86-dri-vivante_12.09.01.bb

Patch

diff --git a/recipes-graphics/xorg-driver/xf86-dri-vivante/fix-with-xorg-1-13.patch b/recipes-graphics/xorg-driver/xf86-dri-vivante/fix-with-xorg-1-13.patch
new file mode 100644
index 0000000..0f138e9
--- /dev/null
+++ b/recipes-graphics/xorg-driver/xf86-dri-vivante/fix-with-xorg-1-13.patch
@@ -0,0 +1,141 @@ 
+Fix module for Xorg 1.13.
+
+Upstream-Status: Pending
+Signed-off-by: Andrei Gherzan <andrei.gherzan@windriver.com>
+
+Index: dri-xorg-graphic-imx-viv-12.09.01/src/dri.c
+===================================================================
+--- dri-xorg-graphic-imx-viv-12.09.01.orig/src/dri.c	2012-07-02 05:25:06.000000000 +0300
++++ dri-xorg-graphic-imx-viv-12.09.01/src/dri.c	2012-12-21 11:42:09.000000000 +0200
+@@ -1675,7 +1675,7 @@
+ 
+ 	if (pDRIPriv &&
+ 	    pDRIPriv->pDriverInfo->wrap.WakeupHandler)
+-	    (*pDRIPriv->pDriverInfo->wrap.WakeupHandler)(i, wakeupData,
++	    (*pDRIPriv->pDriverInfo->wrap.WakeupHandler)(pScreen,
+ 							 result, pReadmask);
+     }
+ }
+@@ -1691,16 +1691,15 @@
+ 
+ 	if (pDRIPriv &&
+ 	    pDRIPriv->pDriverInfo->wrap.BlockHandler)
+-	    (*pDRIPriv->pDriverInfo->wrap.BlockHandler)(i, blockData,
++	    (*pDRIPriv->pDriverInfo->wrap.BlockHandler)(pScreen,
+ 							pTimeout, pReadmask);
+     }
+ }
+ 
+ void
+-DRIDoWakeupHandler(int screenNum, pointer wakeupData,
++DRIDoWakeupHandler(ScreenPtr pScreen,
+                    unsigned long result, pointer pReadmask)
+ {
+-    ScreenPtr pScreen = screenInfo.screens[screenNum];
+     DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen);
+ 
+     DRILock(pScreen, 0);
+@@ -2383,7 +2382,7 @@
+ 	/* unwrap */
+ 	pScrn->AdjustFrame = pDRIPriv->wrap.AdjustFrame;
+ 	/* call lower layers */
+-	(*pScrn->AdjustFrame)(scrnIndex, x, y, flags);
++	(*pScrn->AdjustFrame)(pScrn, x, y);
+ 	/* rewrap */
+ 	pDRIPriv->wrap.AdjustFrame = pScrn->AdjustFrame;
+ 	pScrn->AdjustFrame         = DRIAdjustFrame;
+Index: dri-xorg-graphic-imx-viv-12.09.01/src/dri.h
+===================================================================
+--- dri-xorg-graphic-imx-viv-12.09.01.orig/src/dri.h	2012-07-02 05:25:06.000000000 +0300
++++ dri-xorg-graphic-imx-viv-12.09.01/src/dri.h	2012-12-21 11:42:15.000000000 +0200
+@@ -372,16 +372,14 @@
+ 
+ extern _X_EXPORT Bool DRIFinishScreenInit(ScreenPtr pScreen);
+ 
+-extern _X_EXPORT void DRIWakeupHandler(pointer wakeupData,
+-                             int result,
++extern _X_EXPORT void DRIWakeupHandler(pointer wakeupData, int result,
+                              pointer pReadmask);
+ 
+ extern _X_EXPORT void DRIBlockHandler(pointer blockData,
+                             OSTimePtr pTimeout,
+                             pointer pReadmask);
+ 
+-extern _X_EXPORT void DRIDoWakeupHandler(int screenNum,
+-                               pointer wakeupData,
++extern _X_EXPORT void DRIDoWakeupHandler(ScreenPtr pScreen,
+                                unsigned long result,
+                                pointer pReadmask);
+ 
+Index: dri-xorg-graphic-imx-viv-12.09.01/src/xf86dri.c
+===================================================================
+--- dri-xorg-graphic-imx-viv-12.09.01.orig/src/xf86dri.c	2012-07-02 05:25:06.000000000 +0300
++++ dri-xorg-graphic-imx-viv-12.09.01/src/xf86dri.c	2012-12-21 10:27:32.000000000 +0200
+@@ -102,7 +102,6 @@
+ )
+ {
+     xXF86DRIQueryVersionReply rep;
+-    register int n;
+ 
+     REQUEST_SIZE_MATCH(xXF86DRIQueryVersionReq);
+     rep.type = X_Reply;
+@@ -112,11 +111,11 @@
+     rep.minorVersion = SERVER_XF86DRI_MINOR_VERSION;
+     rep.patchVersion = SERVER_XF86DRI_PATCH_VERSION;
+     if (client->swapped) {
+-    	swaps(&rep.sequenceNumber, n);
+-    	swapl(&rep.length, n);
+-	swaps(&rep.majorVersion, n);
+-	swaps(&rep.minorVersion, n);
+-	swapl(&rep.patchVersion, n);
++    	swaps(&rep.sequenceNumber);
++    	swapl(&rep.length);
++	swaps(&rep.majorVersion);
++	swaps(&rep.minorVersion);
++	swapl(&rep.patchVersion);
+     }
+     WriteToClient(client, sizeof(xXF86DRIQueryVersionReply), (char *)&rep);
+     return Success;
+@@ -129,7 +128,6 @@
+ {
+     xXF86DRIQueryDirectRenderingCapableReply	rep;
+     Bool isCapable;
+-    register int n;
+ 
+     REQUEST(xXF86DRIQueryDirectRenderingCapableReq);
+     REQUEST_SIZE_MATCH(xXF86DRIQueryDirectRenderingCapableReq);
+@@ -152,8 +150,8 @@
+ 	rep.isCapable = 0;
+ 
+     if (client->swapped) {
+-    	swaps(&rep.sequenceNumber, n);
+-    	swapl(&rep.length, n);
++    	swaps(&rep.sequenceNumber);
++    	swapl(&rep.length);
+     }
+ 
+     WriteToClient(client,
+@@ -611,9 +609,8 @@
+     register ClientPtr	client
+ )
+ {
+-    register int n;
+     REQUEST(xXF86DRIQueryVersionReq);
+-    swaps(&stuff->length, n);
++    swaps(&stuff->length);
+     return ProcXF86DRIQueryVersion(client);
+ }
+ 
+@@ -622,10 +619,9 @@
+     register ClientPtr client
+ )
+ {
+-    register int n;
+     REQUEST(xXF86DRIQueryDirectRenderingCapableReq);
+-    swaps(&stuff->length, n);
+-    swapl(&stuff->screen, n);
++    swaps(&stuff->length);
++    swapl(&stuff->screen);
+     return ProcXF86DRIQueryDirectRenderingCapable(client);
+ }
+ 
diff --git a/recipes-graphics/xorg-driver/xf86-dri-vivante_1.1.0.bb b/recipes-graphics/xorg-driver/xf86-dri-vivante_1.1.0.bb
new file mode 100644
index 0000000..aaab593
--- /dev/null
+++ b/recipes-graphics/xorg-driver/xf86-dri-vivante_1.1.0.bb
@@ -0,0 +1,45 @@ 
+# Copyright (C) 2012-2013 Freescale Semiconductor
+# Copyright (C) 2012-2013 O.S. Systems Software LTDA.
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+LICENSE = "MIT"
+SECTION = "x11/base"
+DEPENDS = "virtual/libx11 virtual/xserver xf86-video-imxfb-vivante"
+LIC_FILES_CHKSUM = "file://src/dri.h;enline=27;md5=c0a9f5e55df7fb9d8c7445890e52e859"
+
+SRC_URI = "${FSL_MIRROR}/xserver-xorg-video-imx-viv-${PV}.tar.gz \
+           file://fix-with-xorg-1-13.patch"
+SRC_URI[md5sum] = "d872365c046738628a7016343ffdb79a"
+SRC_URI[sha256sum] = "d53216d5f9e3f7803983ac1577d83985dfda33145e4711300f4ad5cbbe28e32d"
+
+PE = "1"
+PR = "r0"
+
+S = "${WORKDIR}/xserver-xorg-video-imx-viv-${PV}/DRI_1.10.4"
+
+inherit fsl-eula-unpack autotools pkgconfig
+
+EXTRA_OECONF_armv7a = " --enable-neon "
+CFLAGS += " -I${STAGING_INCDIR}/xorg -DXSERVER_LIBPCIACCESS"
+
+do_install_append () {
+    # Install header files
+    install -d ${D}${includedir}/xorg
+    cp -axr ${S}/src/*.h ${D}${includedir}/xorg
+    find ${D}${includedir} -type f -exec chmod 660 {} \;
+
+    # don't install libtool (*.la) archive not usefull, fix Makefile.am
+    find ${D}${libdir}/xorg/modules -regex ".*\.la$" | xargs rm -f --
+
+    # Remove files provided by xserver-xorg
+    rm ${D}${includedir}/xorg/dri.h
+    rm ${D}${includedir}/xorg/dristruct.h
+    rm ${D}${includedir}/xorg/sarea.h
+}
+
+FILES_${PN}-dev += "${includedir}/xorg/*.h"
+FILES_${PN} += " ${libdir}/xorg/modules/extensions/*.so"
+FILES_${PN}-dbg += " ${libdir}/xorg/modules/extensions/.debug"
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+COMPATIBLE_MACHINE = "(mx6)"
diff --git a/recipes-graphics/xorg-driver/xf86-dri-vivante_12.09.01.bb b/recipes-graphics/xorg-driver/xf86-dri-vivante_12.09.01.bb
deleted file mode 100644
index 1653029..0000000
--- a/recipes-graphics/xorg-driver/xf86-dri-vivante_12.09.01.bb
+++ /dev/null
@@ -1,36 +0,0 @@ 
-# Copyright (C) 2012 Freescale Semiconductor
-# Released under the MIT license (see COPYING.MIT for the terms)
-
-LICENSE = "MIT"
-SECTION = "x11/base"
-DEPENDS = "virtual/libx11 util-macros xf86-video-imxfb-vivante"
-LIC_FILES_CHKSUM = "file://src/dri.h;enline=27;md5=1d0d59e1dc96f5197ea3a8b101bf1fcc"
-
-SRC_URI = "${FSL_MIRROR}/dri-xorg-graphic-imx-viv-${PV}.bin;fsl-eula=true"
-SRC_URI[md5sum] = "8c90045cd5f4dba81095856634ba5136"
-SRC_URI[sha256sum] = "c844dc180e43901359bbdb4f797ab178b3821fbf63bdee9577e5a0afe5d7f6ad"
-
-S = "${WORKDIR}/dri-xorg-graphic-imx-viv-${PV}"
-
-PR = "r2"
-
-inherit fsl-eula-unpack autotools pkgconfig
-
-EXTRA_OECONF_armv7a = " --enable-neon "
-CFLAGS += " -I${STAGING_INCDIR}/xorg"
-
-do_install_append () {
-# Install header files
-    install -d ${D}${includedir}/xorg
-    cp -axr ${S}/src/*.h ${D}${includedir}/xorg
-    find ${D}${includedir} -type f -exec chmod 660 {} \;
-# don't install libtool (*.la) archive not usefull, fix Makefile.am
-    find ${D}${libdir}/xorg/modules -regex ".*\.la$" | xargs rm -f --
-}
-
-FILES_${PN}-dev += "${includedir}/xorg/*.h"
-FILES_${PN} += " ${libdir}/xorg/modules/extensions/*.so"
-FILES_${PN}-dbg += " ${libdir}/xorg/modules/extensions/.debug"
-
-PACKAGE_ARCH = "${MACHINE_ARCH}"
-COMPATIBLE_MACHINE = "(mx6)"