From: Grazvydas Ignotas Date: Sat, 22 Jan 2011 17:34:56 +0000 (+0200) Subject: omap3-sgx-modules: add 4.00.00.01 release from openembedded.org X-Git-Tag: sz_beta3~92 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dda0f79f689aa055d05a58cdb26bff759470c15b;p=openembedded.git omap3-sgx-modules: add 4.00.00.01 release from openembedded.org history of this recipe was long so had to strip it, see openembedded.org for details. --- diff --git a/recipes/powervr-drivers/omap3-sgx-modules/0001-OMAP3-SGX-TI-4.00.00.01-2.6.37-rc1-use-semaphore-ove.patch b/recipes/powervr-drivers/omap3-sgx-modules/0001-OMAP3-SGX-TI-4.00.00.01-2.6.37-rc1-use-semaphore-ove.patch new file mode 100644 index 0000000000..ccaaef30d9 --- /dev/null +++ b/recipes/powervr-drivers/omap3-sgx-modules/0001-OMAP3-SGX-TI-4.00.00.01-2.6.37-rc1-use-semaphore-ove.patch @@ -0,0 +1,31 @@ +From f0fce3b189055bcf210c2811594ee9ab1b4e7e3c Mon Sep 17 00:00:00 2001 +From: Robert Nelson +Date: Mon, 1 Nov 2010 10:23:52 -0500 +Subject: [PATCH] OMAP3 SGX TI 4.00.00.01 2.6.37-rc1 use semaphore over mutex + +Signed-off-by: Robert Nelson + +Changes by Koen: + +Protect it with #if LINUX_VERSION_CODE => KERNEL_VERSION(2,6,36) + +--- + .../omap3-sgx/services4/srvkm/common/resman.c | 2 +++- + 1 files changed, 4 insertions(+), 1 deletions(-) + +--- /tmp/resman.c 2010-12-04 16:15:37.000000000 +0100 ++++ GFX_Linux_KM/services4/srvkm/common/resman.c 2010-12-04 16:16:29.000000000 +0100 +@@ -46,7 +46,11 @@ + #include + #endif + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36) ++static DEFINE_SEMAPHORE(lock); ++#else + static DECLARE_MUTEX(lock); ++#endif + + #define ACQUIRE_SYNC_OBJ do { \ + if (in_interrupt()) { \ +-- +1.7.1 diff --git a/recipes/powervr-drivers/omap3-sgx-modules/0002-Compile-fixes-for-recent-kernels.patch b/recipes/powervr-drivers/omap3-sgx-modules/0002-Compile-fixes-for-recent-kernels.patch new file mode 100644 index 0000000000..fd75fe42c2 --- /dev/null +++ b/recipes/powervr-drivers/omap3-sgx-modules/0002-Compile-fixes-for-recent-kernels.patch @@ -0,0 +1,23 @@ +--- /tmp/sysutils_linux.c 2010-10-14 09:46:08.000000000 +0200 ++++ GFX_Linux_KM/services4/system/omap3630/sysutils_linux.c 2010-10-14 09:47:20.000000000 +0200 +@@ -32,6 +32,12 @@ + #include + #include + ++#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,33)) ++#include ++#include ++#include ++#else ++ + #if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,31)) + #include + #include +@@ -49,6 +55,7 @@ + #endif + #endif + #endif ++#endif + + #if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,27)) && \ + (LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,29)) diff --git a/recipes/powervr-drivers/omap3-sgx-modules/update.patch b/recipes/powervr-drivers/omap3-sgx-modules/update.patch new file mode 100644 index 0000000000..dfe5cf4a75 --- /dev/null +++ b/recipes/powervr-drivers/omap3-sgx-modules/update.patch @@ -0,0 +1,65 @@ +From: Koen Kooi +Subject: omap3-sgx-modules: make it build with recent kernels + +This patch fixes 2 problems: + +1) use of omap_rev_*_*() to get ES revision, the patch adding that to the kernel was rejected +2) removal of .ioctl from struct file_operations for BKL restructuring + +Signed-off-by: Koen Kooi + +--- /tmp/bc_cat.c 2010-12-04 16:18:19.000000000 +0100 ++++ GFX_Linux_KM/services4/3rdparty/bufferclass_ti/bc_cat.c 2010-12-04 16:21:34.000000000 +0100 +@@ -28,6 +28,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -79,7 +80,7 @@ + + static int bc_open(struct inode *i, struct file *f); + static int bc_release(struct inode *i, struct file *f); +-static int bc_ioctl(struct inode *inode, struct file *file, ++static int bc_ioctl(struct file *file, + unsigned int cmd, unsigned long arg); + static int bc_mmap(struct file *filp, struct vm_area_struct *vma); + +@@ -121,8 +122,15 @@ + static struct file_operations bc_cat_fops = { + .open = bc_open, + .release = bc_release, +- .ioctl = bc_ioctl, +- .mmap = bc_mmap, ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36) ++ .ioctl = bc_ioctl, ++#else ++ .unlocked_ioctl = bc_ioctl, ++#ifdef CONFIG_COMPAT ++ .compat_ioctl = bc_ioctl, ++#endif ++#endif ++ .mmap = bc_mmap, + }; + + +@@ -492,7 +500,7 @@ + #ifdef PLAT_TI8168 + width_align = 8; + #else +- width_align = cpu_is_omap3530() && omap_rev_lt_3_0() ? 32 : 8; ++ width_align = cpu_is_omap3530() && ( omap_rev() < OMAP3430_REV_ES3_0 ) ? 32 : 8; + #endif + major = register_chrdev(0, DEVNAME, &bc_cat_fops); + +@@ -690,7 +698,7 @@ + return 0; + } + +-static int bc_ioctl(struct inode *inode, struct file *file, ++static int bc_ioctl(struct file *file, + unsigned int cmd, unsigned long arg) + { + BC_CAT_DEVINFO *devinfo; diff --git a/recipes/powervr-drivers/omap3-sgx-modules_1.4.14.2616.bb b/recipes/powervr-drivers/omap3-sgx-modules_1.4.14.2616.bb new file mode 100644 index 0000000000..d35da4537b --- /dev/null +++ b/recipes/powervr-drivers/omap3-sgx-modules_1.4.14.2616.bb @@ -0,0 +1,48 @@ +DESCRIPTION = "Kernel drivers for the PowerVR SGX chipset found in the omap3 SoCs" +LICENSE = "GPLv2" + +# download required binary distribution from: +# http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/gfxsdk/latest/index_FDS.html +# see libgles-omap3.inc for detailed installation instructions + +TI_BIN_UNPK_CMDS="Y: qY:workdir:Y" +require ../ti/ti-eula-unpack.inc + +SGXPV = "4_00_00_01" +IMGPV = "1.4.14.2616" +BINFILE := "Graphics_SDK_setuplinux_${SGXPV}.bin" + +inherit module + +MACHINE_KERNEL_PR_append = "h" + +SRC_URI = "http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/gfxsdk/${SGXPV}/exports/Graphics_SDK_setuplinux_${SGXPV}.bin \ + file://0002-Compile-fixes-for-recent-kernels.patch \ + file://update.patch \ + file://0001-OMAP3-SGX-TI-4.00.00.01-2.6.37-rc1-use-semaphore-ove.patch \ +" + +SRC_URI[md5sum] = "a027002dcd7164df467b1a315788d5fd" +SRC_URI[sha256sum] = "62383d15e33adf9349afba063b0f2405a15aa6c4b0b5579b0abdf81db7580df7" + +S = "${WORKDIR}/Graphics_SDK_${SGXPV}/GFX_Linux_KM" + +PVRBUILD = "release" + +PACKAGE_STRIP = "no" + +TI_PLATFORM_omap3 = "omap3630" +TI_PLATFORM_ti816x = "ti8168" + +MODULESLOCATION_omap3 = "dc_omap3430_linux" +MODULESLOCATION_ti816x = "dc_ti8168_linux" + +MAKE_TARGETS = " BUILD=${PVRBUILD} TI_PLATFORM=${TI_PLATFORM}" + +do_install() { + mkdir -p ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/gpu/pvr + cp ${S}/pvrsrvkm.ko \ + ${S}/services4/3rdparty/${MODULESLOCATION}/omaplfb.ko \ + ${S}/services4/3rdparty/bufferclass_ti/bufferclass_ti.ko \ + ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/gpu/pvr +}