From e3b1e3fb898b429e8a8afd49b82459b0329c4cbe Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Sat, 4 Dec 2010 16:47:31 +0100 Subject: omap3-sgx-modules: some more for fixes for 2.6.37rc Signed-off-by: Koen Kooi --- ...I-4.00.00.01-2.6.37-rc1-use-semaphore-ove.patch | 31 ++++++++++++++++++++++ .../powervr-drivers/omap3-sgx-modules/update.patch | 24 ++++++++++++++--- .../omap3-sgx-modules_1.4.14.2616.bb | 9 ++++--- 3 files changed, 57 insertions(+), 7 deletions(-) create mode 100644 recipes/powervr-drivers/omap3-sgx-modules/0001-OMAP3-SGX-TI-4.00.00.01-2.6.37-rc1-use-semaphore-ove.patch 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/update.patch b/recipes/powervr-drivers/omap3-sgx-modules/update.patch index 08ede82e51..dfe5cf4a75 100644 --- a/recipes/powervr-drivers/omap3-sgx-modules/update.patch +++ b/recipes/powervr-drivers/omap3-sgx-modules/update.patch @@ -8,8 +8,8 @@ This patch fixes 2 problems: Signed-off-by: Koen Kooi ---- /tmp/bc_cat.c 2010-11-23 14:38:14.000000000 +0100 -+++ GFX_Linux_KM/services4/3rdparty/bufferclass_ti/bc_cat.c 2010-11-23 14:47:12.000000000 +0100 +--- /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 @@ -18,6 +18,15 @@ Signed-off-by: Koen Kooi #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, @@ -41,7 +50,16 @@ Signed-off-by: Koen Kooi 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; ++ 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 index dd563578d3..d35da4537b 100644 --- a/recipes/powervr-drivers/omap3-sgx-modules_1.4.14.2616.bb +++ b/recipes/powervr-drivers/omap3-sgx-modules_1.4.14.2616.bb @@ -12,9 +12,14 @@ 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" @@ -22,10 +27,6 @@ SRC_URI[sha256sum] = "62383d15e33adf9349afba063b0f2405a15aa6c4b0b5579b0abdf81db7 S = "${WORKDIR}/Graphics_SDK_${SGXPV}/GFX_Linux_KM" -inherit module - -MACHINE_KERNEL_PR_append = "g" - PVRBUILD = "release" PACKAGE_STRIP = "no" -- cgit 1.2.3-korg