summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Green <andy.green@linaro.org>2011-08-25 08:05:01 +0100
committerAndy Green <andy.green@linaro.org>2011-08-25 08:05:01 +0100
commitc0c8003cbd68e5bc6bf7f1bab99be5e90ee6e117 (patch)
tree6ad9b9dc1a6c0d5e2f7bfb0f165bbe988a1b5c33
parent9dfba632d385e7e139105aa809e5747b823ba7db (diff)
sgx meddle into life
Signed-off-by: Andy Green <andy.green@linaro.org>
-rw-r--r--drivers/gpu/pvr/module.c48
-rw-r--r--drivers/gpu/pvr/omap4/sysconfig.c5
-rw-r--r--drivers/gpu/pvr/omaplfb/omaplfb_displayclass.c3
-rw-r--r--drivers/gpu/pvr/pvr_debug.h8
-rw-r--r--drivers/gpu/pvr/pvrsrv.c6
5 files changed, 58 insertions, 12 deletions
diff --git a/drivers/gpu/pvr/module.c b/drivers/gpu/pvr/module.c
index 8f0056ac2ba..2cfc77d1d86 100644
--- a/drivers/gpu/pvr/module.c
+++ b/drivers/gpu/pvr/module.c
@@ -42,6 +42,7 @@
#if defined(PVR_LDM_PLATFORM_PRE_REGISTERED)
#if !defined(NO_HARDWARE)
+
#define PVR_USE_PRE_REGISTERED_PLATFORM_DEV
#endif
#endif
@@ -214,7 +215,8 @@ static LDM_DRV powervr_driver = {
LDM_DEV *gpsPVRLDMDev;
-#if defined(MODULE) && defined(PVR_LDM_PLATFORM_MODULE) && \
+// #if defined(MODULE) &&
+#if defined(PVR_LDM_PLATFORM_MODULE) && \
!defined(PVR_USE_PRE_REGISTERED_PLATFORM_DEV)
static void PVRSRVDeviceRelease(struct device unref__ *pDevice)
{
@@ -238,6 +240,8 @@ static int __devinit PVRSRVDriverProbe(LDM_DEV *pDevice, const struct pci_device
{
SYS_DATA *psSysData;
+ pr_err("*********** PVRSRVDriverProbe\n");
+
PVR_TRACE(("PVRSRVDriverProbe(pDevice=%p)", pDevice));
#if 0
@@ -253,6 +257,9 @@ static int __devinit PVRSRVDriverProbe(LDM_DEV *pDevice, const struct pci_device
{
gpsPVRLDMDev = pDevice;
+ pr_err("********** calling SysInitialise\n");
+
+
if (SysInitialise() != PVRSRV_OK)
{
return -ENODEV;
@@ -505,11 +512,11 @@ static int PVRSRVRelease(struct inode unref__ * pInode, struct file *pFile)
}
-#if defined(SUPPORT_DRI_DRM)
+//#if defined(SUPPORT_DRI_DRM)
int PVRCore_Init(void)
-#else
-static int __init PVRCore_Init(void)
-#endif
+//#else
+//static int __init PVRCore_Init(void)
+//#endif
{
int error;
#if !defined(PVR_LDM_MODULE)
@@ -522,7 +529,7 @@ static int __init PVRCore_Init(void)
PVRDPFInit();
#endif
- PVR_TRACE(("PVRCore_Init"));
+ pr_err("************************ PVRCore_Init\n");
LinuxInitMutex(&gPVRSRVLock);
@@ -532,22 +539,36 @@ static int __init PVRCore_Init(void)
return error;
}
+ pr_err("************************ PVRCore_Init 2\n");
+
if (PVROSFuncInit() != PVRSRV_OK)
{
error = -ENOMEM;
goto init_failed;
}
+ pr_err("************************ PVRCore_Init 3\n");
+
+
PVRLinuxMUtilsInit();
+ pr_err("************************ PVRCore_Init 4\n");
+
+
if(LinuxMMInit() != PVRSRV_OK)
{
error = -ENOMEM;
goto init_failed;
}
+ pr_err("************************ PVRCore_Init 5\n");
+
+
LinuxBridgeInit();
+ pr_err("************************ PVRCore_Init 6\n");
+
+
PVRMMapInit();
#if defined(PVR_LDM_MODULE)
@@ -560,7 +581,11 @@ static int __init PVRCore_Init(void)
goto init_failed;
}
-#if defined(MODULE) && !defined(PVR_USE_PRE_REGISTERED_PLATFORM_DEV)
+//#if defined(MODULE) && !defined(PVR_USE_PRE_REGISTERED_PLATFORM_DEV)
+#if !defined(PVR_USE_PRE_REGISTERED_PLATFORM_DEV)
+
+ pr_err("****************** Registering device\n");
+
if ((error = platform_device_register(&powervr_device)) != 0)
{
platform_driver_unregister(&powervr_driver);
@@ -572,6 +597,9 @@ static int __init PVRCore_Init(void)
#endif
#endif
+ pr_err("************************ PVRCore_Init 7\n");
+
+
#if defined(PVR_LDM_PCI_MODULE)
if ((error = pci_register_driver(&powervr_driver)) != 0)
{
@@ -582,6 +610,9 @@ static int __init PVRCore_Init(void)
#endif
#else
+
+ pr_err("************************ PVRCore_Init 8\n");
+
if ((eError = SysInitialise()) != PVRSRV_OK)
{
@@ -671,6 +702,9 @@ sys_deinit:
}
#endif
init_failed:
+
+ pr_err("************************ PVRCore_Init FAILED\n");
+
PVRMMapCleanup();
LinuxMMCleanup();
LinuxBridgeDeInit();
diff --git a/drivers/gpu/pvr/omap4/sysconfig.c b/drivers/gpu/pvr/omap4/sysconfig.c
index 0851c48736d..c0b6e79405c 100644
--- a/drivers/gpu/pvr/omap4/sysconfig.c
+++ b/drivers/gpu/pvr/omap4/sysconfig.c
@@ -154,7 +154,7 @@ static PVRSRV_ERROR SysLocateDevices(SYS_DATA *psSysData)
gsSGXDeviceMap.ui32IRQ = 0;
#else
-#if defined(PVR_LINUX_DYNAMIC_SGX_RESOURCE_INFO)
+#if defined(IT_AINT_DEFINED) && defined(PVR_LINUX_DYNAMIC_SGX_RESOURCE_INFO)
dev_res = platform_get_resource(gpsPVRLDMDev, IORESOURCE_MEM, 0);
if (dev_res == NULL)
@@ -284,6 +284,9 @@ PVRSRV_ERROR SysInitialise(IMG_VOID)
#if !defined(SGX_DYNAMIC_TIMING_INFO)
SGX_TIMING_INFORMATION* psTimingInfo;
#endif
+
+ pr_err("++++++++++ SysInitialise\n");
+
gpsSysData = &gsSysData;
OSMemSet(gpsSysData, 0, sizeof(SYS_DATA));
diff --git a/drivers/gpu/pvr/omaplfb/omaplfb_displayclass.c b/drivers/gpu/pvr/omaplfb/omaplfb_displayclass.c
index b23b5653064..1e88a392833 100644
--- a/drivers/gpu/pvr/omaplfb/omaplfb_displayclass.c
+++ b/drivers/gpu/pvr/omaplfb/omaplfb_displayclass.c
@@ -24,6 +24,9 @@
*
******************************************************************************/
+extern int num_registered_fb;
+
+
#include <linux/version.h>
#include <linux/kernel.h>
#include <linux/console.h>
diff --git a/drivers/gpu/pvr/pvr_debug.h b/drivers/gpu/pvr/pvr_debug.h
index e07103f56f5..1b588fbbf0e 100644
--- a/drivers/gpu/pvr/pvr_debug.h
+++ b/drivers/gpu/pvr/pvr_debug.h
@@ -61,13 +61,13 @@ extern "C" {
#define PVR_DBGDRIV_MESSAGE DBGPRIV_DBGDRV_MESSAGE, "", 0
-#if !defined(PVRSRV_NEED_PVR_ASSERT) && defined(DEBUG)
+//#if !defined(PVRSRV_NEED_PVR_ASSERT) && defined(DEBUG)
#define PVRSRV_NEED_PVR_ASSERT
-#endif
+//#endif
-#if defined(PVRSRV_NEED_PVR_ASSERT) && !defined(PVRSRV_NEED_PVR_DPF)
+//#if defined(PVRSRV_NEED_PVR_ASSERT) && !defined(PVRSRV_NEED_PVR_DPF)
#define PVRSRV_NEED_PVR_DPF
-#endif
+//#endif
#if !defined(PVRSRV_NEED_PVR_TRACE) && (defined(DEBUG) || defined(TIMING))
#define PVRSRV_NEED_PVR_TRACE
diff --git a/drivers/gpu/pvr/pvrsrv.c b/drivers/gpu/pvr/pvrsrv.c
index 0528d72d780..2dcf454fcf3 100644
--- a/drivers/gpu/pvr/pvrsrv.c
+++ b/drivers/gpu/pvr/pvrsrv.c
@@ -51,6 +51,12 @@ PVRSRV_ERROR AllocateDeviceID(SYS_DATA *psSysData, IMG_UINT32 *pui32DevID)
SYS_DEVICE_ID* psDeviceWalker;
SYS_DEVICE_ID* psDeviceEnd;
+ if (!psSysData) {
+ pr_err("NULL psSysData\n");
+ WARN_ON(1);
+ return -1;
+ }
+
psDeviceWalker = &psSysData->sDeviceID[0];
psDeviceEnd = psDeviceWalker + psSysData->ui32NumDevices;