aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTony Lofthouse <tony.lofthouse@ti.com>2011-02-16 18:54:41 -0600
committerErik Gilling <konkers@android.com>2011-03-30 10:12:47 -0700
commit00d2b05dbc84f6ad4ca9e66052aa4d0f5db75139 (patch)
tree8fab054b2000da75b5c207f6e2184c3bcd9716c7
parentc0cc79fb89bdcb1cde9ed6fdab8713eb6b281e42 (diff)
downloadexperimental-00d2b05dbc84f6ad4ca9e66052aa4d0f5db75139.tar.gz
OMAP: SGX-KM: Port PVR services to .38
Requires the following config flags: CONFIG_PREEMPT=y CONFIG_SGX540=y CONFIG_SGX_REV120=y CONFIG_SGX_540_BUILD_RELEASE=y Signed-off-by: Tony Lofthouse <tony.lofthouse@ti.com> Change-Id: Ibfa3de0a0238c6b8f3d61c63f5be8c1d522cf7b4
-rw-r--r--drivers/gpu/pvr/event.c4
-rw-r--r--drivers/gpu/pvr/mm.c4
-rw-r--r--drivers/gpu/pvr/mm.h4
-rw-r--r--drivers/gpu/pvr/mmap.c4
-rw-r--r--drivers/gpu/pvr/module.c4
-rw-r--r--drivers/gpu/pvr/mutils.c3
-rw-r--r--drivers/gpu/pvr/mutils.h4
-rw-r--r--drivers/gpu/pvr/omap4/sysutils_linux.c2
-rw-r--r--drivers/gpu/pvr/omaplfb/omaplfb_displayclass.c8
-rw-r--r--drivers/gpu/pvr/omaplfb/omaplfb_linux.c22
-rw-r--r--drivers/gpu/pvr/osfunc.c4
-rw-r--r--drivers/gpu/pvr/proc.c4
-rw-r--r--drivers/gpu/pvr/pvr_debug.c4
-rw-r--r--drivers/gpu/pvr/pvr_uaccess.h4
-rw-r--r--drivers/gpu/pvr/resman.c6
15 files changed, 15 insertions, 66 deletions
diff --git a/drivers/gpu/pvr/event.c b/drivers/gpu/pvr/event.c
index c53e02d385f..628a7572024 100644
--- a/drivers/gpu/pvr/event.c
+++ b/drivers/gpu/pvr/event.c
@@ -24,10 +24,6 @@
*
******************************************************************************/
-#ifndef AUTOCONF_INCLUDED
- #include <linux/config.h>
-#endif
-
#include <linux/version.h>
#include <asm/io.h>
#include <asm/page.h>
diff --git a/drivers/gpu/pvr/mm.c b/drivers/gpu/pvr/mm.c
index 8ae9fb69684..700219c9955 100644
--- a/drivers/gpu/pvr/mm.c
+++ b/drivers/gpu/pvr/mm.c
@@ -24,10 +24,6 @@
*
******************************************************************************/
-#ifndef AUTOCONF_INCLUDED
- #include <linux/config.h>
-#endif
-
#include <linux/version.h>
#include <linux/mm.h>
#include <linux/vmalloc.h>
diff --git a/drivers/gpu/pvr/mm.h b/drivers/gpu/pvr/mm.h
index 9f911869ecf..0679edeb443 100644
--- a/drivers/gpu/pvr/mm.h
+++ b/drivers/gpu/pvr/mm.h
@@ -27,10 +27,6 @@
#ifndef __IMG_LINUX_MM_H__
#define __IMG_LINUX_MM_H__
-#ifndef AUTOCONF_INCLUDED
- #include <linux/config.h>
-#endif
-
#include <linux/version.h>
#include <linux/slab.h>
#include <linux/mm.h>
diff --git a/drivers/gpu/pvr/mmap.c b/drivers/gpu/pvr/mmap.c
index 6379eb0ff03..07cc950eeee 100644
--- a/drivers/gpu/pvr/mmap.c
+++ b/drivers/gpu/pvr/mmap.c
@@ -24,10 +24,6 @@
*
******************************************************************************/
-#ifndef AUTOCONF_INCLUDED
- #include <linux/config.h>
-#endif
-
#include <linux/version.h>
#include <linux/mm.h>
#include <linux/module.h>
diff --git a/drivers/gpu/pvr/module.c b/drivers/gpu/pvr/module.c
index 13570835d61..ee2e83863aa 100644
--- a/drivers/gpu/pvr/module.c
+++ b/drivers/gpu/pvr/module.c
@@ -24,10 +24,6 @@
*
******************************************************************************/
-#ifndef AUTOCONF_INCLUDED
- #include <linux/config.h>
-#endif
-
#if defined(SUPPORT_DRI_DRM)
#define PVR_MOD_STATIC
#else
diff --git a/drivers/gpu/pvr/mutils.c b/drivers/gpu/pvr/mutils.c
index 884635e2919..5451c8a5cfa 100644
--- a/drivers/gpu/pvr/mutils.c
+++ b/drivers/gpu/pvr/mutils.c
@@ -24,9 +24,6 @@
*
******************************************************************************/
-#ifndef AUTOCONF_INCLUDED
-#include <linux/config.h>
-#endif
#include <linux/version.h>
#include <linux/spinlock.h>
diff --git a/drivers/gpu/pvr/mutils.h b/drivers/gpu/pvr/mutils.h
index 92d8e7b215e..0cd141a2515 100644
--- a/drivers/gpu/pvr/mutils.h
+++ b/drivers/gpu/pvr/mutils.h
@@ -27,10 +27,6 @@
#ifndef __IMG_LINUX_MUTILS_H__
#define __IMG_LINUX_MUTILS_H__
-#ifndef AUTOCONF_INCLUDED
-#include <linux/config.h>
-#endif
-
#include <linux/version.h>
#if !(defined(__i386__) && (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)))
diff --git a/drivers/gpu/pvr/omap4/sysutils_linux.c b/drivers/gpu/pvr/omap4/sysutils_linux.c
index 6022ab77396..1eb122880e3 100644
--- a/drivers/gpu/pvr/omap4/sysutils_linux.c
+++ b/drivers/gpu/pvr/omap4/sysutils_linux.c
@@ -192,7 +192,7 @@ IMG_VOID DisableSGXClocks(SYS_DATA *psSysData)
#if defined(LDM_PLATFORM) && !defined(PVR_DRI_DRM_NOT_PCI)
{
- int res = pm_runtime_put_sync(&gpsPVRLDMDev->dev);
+ int res = 0; // XXX TL .38 pm_runtime_put_sync(&gpsPVRLDMDev->dev);
if (res < 0)
{
PVR_DPF((PVR_DBG_ERROR, "DisableSGXClocks: pm_runtime_put_sync failed (%d)", -res));
diff --git a/drivers/gpu/pvr/omaplfb/omaplfb_displayclass.c b/drivers/gpu/pvr/omaplfb/omaplfb_displayclass.c
index 2d96aa7c0dc..f2b5d9f1128 100644
--- a/drivers/gpu/pvr/omaplfb/omaplfb_displayclass.c
+++ b/drivers/gpu/pvr/omaplfb/omaplfb_displayclass.c
@@ -831,7 +831,7 @@ static OMAPLFB_ERROR OMAPLFBInitFBDev(OMAPLFB_DEVINFO *psDevInfo)
unsigned long ulLCM;
unsigned uiFBDevID = psDevInfo->uiFBDevID;
- acquire_console_sem();
+ console_lock();
psLINFBInfo = registered_fb[uiFBDevID];
if (psLINFBInfo == NULL)
@@ -973,7 +973,7 @@ static OMAPLFB_ERROR OMAPLFBInitFBDev(OMAPLFB_DEVINFO *psDevInfo)
ErrorModPut:
module_put(psLINFBOwner);
ErrorRelSem:
- release_console_sem();
+ console_unlock();
return eError;
}
@@ -983,7 +983,7 @@ static void OMAPLFBDeInitFBDev(OMAPLFB_DEVINFO *psDevInfo)
struct fb_info *psLINFBInfo = psDevInfo->psLINFBInfo;
struct module *psLINFBOwner;
- acquire_console_sem();
+ console_lock();
psLINFBOwner = psLINFBInfo->fbops->owner;
@@ -994,7 +994,7 @@ static void OMAPLFBDeInitFBDev(OMAPLFB_DEVINFO *psDevInfo)
module_put(psLINFBOwner);
- release_console_sem();
+ console_unlock();
}
static OMAPLFB_DEVINFO *OMAPLFBInitDev(unsigned uiFBDevID)
diff --git a/drivers/gpu/pvr/omaplfb/omaplfb_linux.c b/drivers/gpu/pvr/omaplfb/omaplfb_linux.c
index 13ebea826cd..0fc642a5327 100644
--- a/drivers/gpu/pvr/omaplfb/omaplfb_linux.c
+++ b/drivers/gpu/pvr/omaplfb/omaplfb_linux.c
@@ -24,10 +24,6 @@
*
******************************************************************************/
-#ifndef AUTOCONF_INCLUDED
-#include <linux/config.h>
-#endif
-
#include <linux/version.h>
#include <asm/atomic.h>
@@ -205,7 +201,7 @@ static void WorkQueueHandler(struct work_struct *psWork)
OMAPLFB_ERROR OMAPLFBCreateSwapQueue(OMAPLFB_SWAPCHAIN *psSwapChain)
{
- psSwapChain->psWorkQueue = __create_workqueue(DEVNAME, 1, 1, 1);
+ psSwapChain->psWorkQueue = alloc_ordered_workqueue(DEVNAME, WQ_NON_REENTRANT | WQ_FREEZABLE | WQ_HIGHPRI);
if (psSwapChain->psWorkQueue == NULL)
{
printk(KERN_WARNING DRIVER_PREFIX ": %s: Device %u: create_singlethreaded_workqueue failed\n", __FUNCTION__, psSwapChain->uiFBDevID);
@@ -232,7 +228,7 @@ void OMAPLFBFlip(OMAPLFB_DEVINFO *psDevInfo, OMAPLFB_BUFFER *psBuffer)
int res;
unsigned long ulYResVirtual;
- acquire_console_sem();
+ console_lock();
sFBVar = psDevInfo->psLINFBInfo->var;
@@ -264,7 +260,7 @@ void OMAPLFBFlip(OMAPLFB_DEVINFO *psDevInfo, OMAPLFB_BUFFER *psBuffer)
}
}
- release_console_sem();
+ console_unlock();
}
OMAPLFB_UPDATE_MODE OMAPLFBGetUpdateMode(OMAPLFB_DEVINFO *psDevInfo)
@@ -436,9 +432,9 @@ OMAPLFB_ERROR OMAPLFBUnblankDisplay(OMAPLFB_DEVINFO *psDevInfo)
{
int res;
- acquire_console_sem();
+ console_lock();
res = fb_blank(psDevInfo->psLINFBInfo, 0);
- release_console_sem();
+ console_unlock();
if (res != 0 && res != -EINVAL)
{
printk(KERN_WARNING DRIVER_PREFIX
@@ -453,9 +449,9 @@ OMAPLFB_ERROR OMAPLFBUnblankDisplay(OMAPLFB_DEVINFO *psDevInfo)
static void OMAPLFBBlankDisplay(OMAPLFB_DEVINFO *psDevInfo)
{
- acquire_console_sem();
+ console_lock();
fb_blank(psDevInfo->psLINFBInfo, 1);
- release_console_sem();
+ console_unlock();
}
static void OMAPLFBEarlySuspendHandler(struct early_suspend *h)
@@ -686,9 +682,9 @@ int PVR_DRM_MAKENAME(DISPLAY_CONTROLLER, _Ioctl)(struct drm_device unref__ *dev,
flush_workqueue(psDevInfo->psSwapChain->psWorkQueue);
}
- acquire_console_sem();
+ console_lock();
ret = fb_blank(psDevInfo->psLINFBInfo, iFBMode);
- release_console_sem();
+ console_unlock();
OMAPLFBCreateSwapChainUnLock(psDevInfo);
diff --git a/drivers/gpu/pvr/osfunc.c b/drivers/gpu/pvr/osfunc.c
index da6c3cd300f..5c6cf135db6 100644
--- a/drivers/gpu/pvr/osfunc.c
+++ b/drivers/gpu/pvr/osfunc.c
@@ -24,10 +24,6 @@
*
******************************************************************************/
-#ifndef AUTOCONF_INCLUDED
- #include <linux/config.h>
-#endif
-
#include <linux/version.h>
#include <asm/io.h>
#include <asm/page.h>
diff --git a/drivers/gpu/pvr/proc.c b/drivers/gpu/pvr/proc.c
index a080938b4ce..81ca7822a87 100644
--- a/drivers/gpu/pvr/proc.c
+++ b/drivers/gpu/pvr/proc.c
@@ -24,10 +24,6 @@
*
******************************************************************************/
-#ifndef AUTOCONF_INCLUDED
- #include <linux/config.h>
-#endif
-
#include <linux/init.h>
#include <linux/module.h>
#include <linux/version.h>
diff --git a/drivers/gpu/pvr/pvr_debug.c b/drivers/gpu/pvr/pvr_debug.c
index 2e64fe6ed36..734aebb2cc1 100644
--- a/drivers/gpu/pvr/pvr_debug.c
+++ b/drivers/gpu/pvr/pvr_debug.c
@@ -24,10 +24,6 @@
*
******************************************************************************/
-#ifndef AUTOCONF_INCLUDED
- #include <linux/config.h>
-#endif
-
#include <asm/io.h>
#include <asm/uaccess.h>
#include <linux/kernel.h>
diff --git a/drivers/gpu/pvr/pvr_uaccess.h b/drivers/gpu/pvr/pvr_uaccess.h
index 3db3caf65b1..58d4899bbd5 100644
--- a/drivers/gpu/pvr/pvr_uaccess.h
+++ b/drivers/gpu/pvr/pvr_uaccess.h
@@ -27,10 +27,6 @@
#ifndef __PVR_UACCESS_H__
#define __PVR_UACCESS_H__
-#ifndef AUTOCONF_INCLUDED
- #include <linux/config.h>
-#endif
-
#include <linux/version.h>
#include <asm/uaccess.h>
diff --git a/drivers/gpu/pvr/resman.c b/drivers/gpu/pvr/resman.c
index b3a4534c809..642adb5f329 100644
--- a/drivers/gpu/pvr/resman.c
+++ b/drivers/gpu/pvr/resman.c
@@ -28,10 +28,6 @@
#include "resman.h"
#ifdef __linux__
-#ifndef AUTOCONF_INCLUDED
- #include <linux/config.h>
-#endif
-
#include <linux/version.h>
#include <linux/sched.h>
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,9)
@@ -46,7 +42,7 @@
#include <asm/semaphore.h>
#endif
-static DECLARE_MUTEX(lock);
+static DEFINE_SEMAPHORE(lock);
#define ACQUIRE_SYNC_OBJ do { \
if (in_interrupt()) { \