#define PVRVERSION_BRANCH 19
#define PVRVERSION_FAMILY "sgxddk"
-#define PVRVERSION_BRANCHNAME "1.9.RC2"
-#define PVRVERSION_BUILD 2139099
+#define PVRVERSION_BRANCHNAME "1.9"
+#define PVRVERSION_BUILD 2188537
#define PVRVERSION_BSCONTROL "SGX_DDK_Linux_CustomerTI"
-#define PVRVERSION_STRING "SGX_DDK_Linux_CustomerTI sgxddk 19 1.9.RC2@" PVR_STR2(PVRVERSION_BUILD)
-#define PVRVERSION_STRING_SHORT "1.9.RC2@" PVR_STR2(PVRVERSION_BUILD)
+#define PVRVERSION_STRING "SGX_DDK_Linux_CustomerTI sgxddk 19 1.9@" PVR_STR2(PVRVERSION_BUILD)
+#define PVRVERSION_STRING_SHORT "1.9@" PVR_STR2(PVRVERSION_BUILD)
#define COPYRIGHT_TXT "Copyright (c) Imagination Technologies Ltd. All Rights Reserved."
-#define PVRVERSION_BUILD_HI 213
-#define PVRVERSION_BUILD_LO 9099
+#define PVRVERSION_BUILD_HI 218
+#define PVRVERSION_BUILD_LO 8537
#define PVRVERSION_STRING_NUMERIC PVR_STR2(PVRVERSION_MAJ) "." PVR_STR2(PVRVERSION_MIN) "." PVR_STR2(PVRVERSION_BUILD_HI) "." PVR_STR2(PVRVERSION_BUILD_LO)
#endif /* _PVRVERSION_H_ */
IMG_IMPORT IMG_PVOID IMG_CALLCONV PVRSRVReallocUserModeMemTracking(IMG_VOID *pvMem, IMG_SIZE_T ui32NewSize,
IMG_CHAR *pszFileName, IMG_UINT32 ui32LineNumber);
-#endif /* defined(DEBUG) && (defined(__linux__) || defined(_UITRON_)) */
+#endif
/******************************************************************************
* PVR Event Object API(s)
#define OPTIONS_BIT11 0x0
-
-#if defined(SGX_FEATURE_OVERLAPPED_SPM) || defined (INTERNAL_TEST)
-#define SGX_FEATURE_OVERLAPPED_SPM_SET_OFFSET OPTIONS_BIT12
-#define OPTIONS_BIT12 (0x1U << 12)
-#else
#define OPTIONS_BIT12 0x0
-#endif /* SGX_FEATURE_RENDER_TARGET_ARRAYS */
#if defined(SGX_FEATURE_SYSTEM_CACHE) || defined (INTERNAL_TEST)
__FUNCTION__, uiFBDevID, n);
/* INTEGRATION_POINT: limit to MAX 3 FBs to save TILER container space */
- if (n > 3)
+ if (n != 3)
n = 3;
sAllocData.w *= n;
* conditions, preventing the driver from holding on to
* resources longer than it needs to.
*/
- psSwapChain->psWorkQueue = alloc_ordered_workqueue(DEVNAME, WQ_FREEZEABLE | WQ_MEM_RECLAIM);
+#if (LINUX_VERSION_CODE == KERNEL_VERSION(2,6,37))
+ psSwapChain->psWorkQueue = alloc_ordered_workqueue(DEVNAME, WQ_FREEZEABLE | WQ_MEM_RECLAIM);
+#else
+ psSwapChain->psWorkQueue = alloc_ordered_workqueue(DEVNAME, WQ_FREEZABLE | WQ_MEM_RECLAIM);
+#endif
+
#else
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36))
psSwapChain->psWorkQueue = create_freezable_workqueue(DEVNAME);
OMAPLFB_CONSOLE_UNLOCK();
}
-
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,1,0)
#if !defined(PVR_OMAPLFB_DRM_FB) || defined(DEBUG)
static OMAPLFB_BOOL OMAPLFBValidateDSSUpdateMode(enum omap_dss_update_mode eMode)
{
return -1;
}
+#endif
#if defined(DEBUG)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,1,0)
static const char *OMAPLFBUpdateModeToString(OMAPLFB_UPDATE_MODE eMode)
{
switch(eMode)
return OMAPLFBUpdateModeToString(OMAPLFBFromDSSUpdateMode(eMode));
}
-
+#endif
void OMAPLFBPrintInfo(OMAPLFB_DEVINFO *psDevInfo)
{
#if defined(PVR_OMAPLFB_DRM_FB)
DEBUG_PRINTK((KERN_INFO DRIVER_PREFIX ": Device %u: non-DRM framebuffer\n", psDevInfo->uiFBDevID));
- DEBUG_PRINTK((KERN_INFO DRIVER_PREFIX ": Device %u: %s\n", psDevInfo->uiFBDevID, OMAPLFBUpdateModeToString(eMode)));
+// DEBUG_PRINTK((KERN_INFO DRIVER_PREFIX ": Device %u: %s\n", psDevInfo->uiFBDevID, OMAPLFBUpdateModeToString(eMode)));
#endif /* defined(PVR_OMAPLFB_DRM_FB) */
}
#endif /* defined(DEBUG) */
*/
OMAPLFB_BOOL OMAPLFBManualSync(OMAPLFB_DEVINFO *psDevInfo)
{
+#if 0
#if defined(PVR_OMAPLFB_DRM_FB)
struct drm_connector *psConnector;
return OMAPLFB_TRUE;
#endif /* defined(PVR_OMAPLFB_DRM_FB) */
+#endif
+ return OMAPLFB_TRUE;
}
/*
__FUNCTION__, uiFBDevID, n);
/* INTEGRATION_POINT: limit to MAX 3 FBs to save TILER container space */
- if (n > 3)
+ if (n != 3)
n = 3;
sAllocData.w *= n;
__FUNCTION__, uiFBDevID, n);
/* INTEGRATION_POINT: limit to MAX 3 FBs to save TILER container space */
- if (n > 3)
+ if (n != 3)
n = 3;
sAllocData.w *= n;
#include "services.h"
#include "sysinfo.h"
-#include "sysconfig.h"
#define HWREC_DEFAULT_TIMEOUT (500)
To activate the "share mem workaround", add PVRSRV_MEM_XPROC to
the flags for the allocation. This will cause the "map" API to
call use Alloc Device Mem but will share the underlying memory
- block and sync data. Note that this is a workaround for a bug
- exposed by a specific use-case on a particular platform. Do not
- use this functionality generally.
+ block and sync data.
*/
struct {
/* Record whether the workaround is active for this
PVRSRV_BRIDGE_SGX_DOKICK_RETURN_RESULT:
-//#if (!defined(_UITRON_) && !defined(UNDER_VISTA)) || defined (SUPPORT_SID_INTERFACE)
if(phKernelSyncInfoHandles)
{
OSFreeMem(PVRSRV_OS_PAGEABLE_HEAP,
PVR_UNREFERENCED_PARAMETER(psRetOUT);
PVR_UNREFERENCED_PARAMETER(psPerProc);
return 0;
-#endif /* defined(LINUX) || defined(UNDER_XP) */
+#endif
#else
PVR_UNREFERENCED_PARAMETER(ui32BridgeID);
PVR_UNREFERENCED_PARAMETER(psPDumpHWPerfCBIN);
ui32PrivDataLength,
IMG_NULL); /* We allocate VM space */
+ if (!bSuccess)
+ {
+ PVR_DPF((PVR_DBG_ERROR, "AllocMemory: BM_ImportMemory failed"));
+ return IMG_FALSE;
+ }
+
if (puiActualSize != ui32ChunkSize * ui32NumPhysChunks)
{
/*
psSwapChainRef = (PVRSRV_DC_SWAPCHAIN_REF*)hSwapChainRef;
psSwapChain = psSwapChainRef->psSwapChain;
+ /*
+ If more then 1 reference to the swapchain exist then
+ ignore any request to swap to the system buffer
+ */
+ if (psSwapChain->ui32RefCount > 1)
+ {
+ return PVRSRV_OK;
+ }
+
/* get the queue from the buffer structure */
psQueue = psSwapChain->psQueue;
}
#endif/* SUPPORT_SGX_GENERALISED_SYNCOBJECTS */
+ if (psCCBKick->hTA3DSyncInfo)
+ {
+ psSyncInfo = (PVRSRV_KERNEL_SYNC_INFO *)psCCBKick->hTA3DSyncInfo;
+ psSyncInfo->psSyncData->ui32ReadOpsPending--;
+ }
+
+ if (psCCBKick->hTASyncInfo)
+ {
+ psSyncInfo = (PVRSRV_KERNEL_SYNC_INFO *)psCCBKick->hTASyncInfo;
+ psSyncInfo->psSyncData->ui32ReadOpsPending--;
+ }
+
+ if (psCCBKick->h3DSyncInfo)
+ {
+ psSyncInfo = (PVRSRV_KERNEL_SYNC_INFO *)psCCBKick->h3DSyncInfo;
+ psSyncInfo->psSyncData->ui32ReadOpsPending--;
+ }
+
PVR_TTRACE(PVRSRV_TRACE_GROUP_KICK, PVRSRV_TRACE_CLASS_FUNCTION_EXIT,
KICK_TOKEN_DOKICK);
return eError;
IMG_VOID *pvBase = IMG_NULL;
int iRetVal = 0;
IMG_UINT32 ui32ByteOffset = 0; /* Keep compiler happy */
+ IMG_UINT32 ui32FlushSize = 0;
PVR_UNREFERENCED_PARAMETER(pFile);
/* Compute the flush region (if necessary) inside the mmap mutex */
if(psOffsetStruct->psLinuxMemArea->bNeedsCacheInvalidate)
{
- IMG_UINT32 ui32DummyByteSize;
+ psFlushMemArea = psOffsetStruct->psLinuxMemArea;
- DetermineUsersSizeAndByteOffset(psOffsetStruct->psLinuxMemArea,
- &ui32DummyByteSize,
- &ui32ByteOffset);
+ /* Sparse mappings have to ask the BM for the virtual size */
+ if (psFlushMemArea->hBMHandle)
+ {
+ pvBase = (IMG_VOID *)ps_vma->vm_start;
+ ui32ByteOffset = 0;
+ ui32FlushSize = BM_GetVirtualSize(psFlushMemArea->hBMHandle);
+ }
+ else
+ {
+ IMG_UINT32 ui32DummyByteSize;
- pvBase = (IMG_VOID *)ps_vma->vm_start + ui32ByteOffset;
- psFlushMemArea = psOffsetStruct->psLinuxMemArea;
+ DetermineUsersSizeAndByteOffset(psFlushMemArea,
+ &ui32DummyByteSize,
+ &ui32ByteOffset);
+
+ pvBase = (IMG_VOID *)ps_vma->vm_start + ui32ByteOffset;
+ ui32FlushSize = psFlushMemArea->ui32ByteSize;
+ }
- psOffsetStruct->psLinuxMemArea->bNeedsCacheInvalidate = IMG_FALSE;
+ psFlushMemArea->bNeedsCacheInvalidate = IMG_FALSE;
}
/* Call the open routine to increment the usage count */
if(psFlushMemArea)
{
OSInvalidateCPUCacheRangeKM(psFlushMemArea, ui32ByteOffset, pvBase,
- psFlushMemArea->ui32ByteSize);
+ ui32FlushSize);
}
return iRetVal;
#define ON_EACH_CPU(func, info, wait) on_each_cpu(func, info, 0, wait)
#endif
+#if 0
#if defined(PVR_LINUX_USING_WORKQUEUES) && !defined(CONFIG_PREEMPT)
/*
* Services spins at certain points waiting for events (e.g. swap
* Removing the need for CONFIG_PREEMPT will require adding preemption
* points at various points in Services.
*/
-//#error "A preemptible Linux kernel is required when using workqueues"
+#error "A preemptible Linux kernel is required when using workqueues"
+#endif
#endif
#if defined(EMULATOR)
psMMapOffsetStructList = &psLinuxMemArea->sMMapOffsetStructList;
ui32AreaLength = psLinuxMemArea->ui32ByteSize;
- PVR_ASSERT(ui32Length <= ui32AreaLength);
+ /*
+ Don't check the length in the case of sparse mappings as
+ we only know the physical length not the virtual
+ */
+ if (!psLinuxMemArea->hBMHandle)
+ {
+ PVR_ASSERT(ui32Length <= ui32AreaLength);
+ }
if(psLinuxMemArea->eAreaType == LINUX_MEM_AREA_SUB_ALLOC)
{
/* setup conditional pageable / non-pageable select */
- /* Non-Vista OSs only need pageable */
+ /* Other OSs only need pageable */
#define PVRSRV_PAGEABLE_SELECT PVRSRV_OS_PAGEABLE_HEAP
/******************************************************************************
IMG_VOID PDumpOSDebugPrintf(IMG_CHAR* pszFormat, ...) IMG_FORMAT_PRINTF(1, 2);
/*
- * FIXME: Is this function useful for Symbian?
* Write into a IMG_CHAR* on all OSes. Can be allocated on the stack or heap.
*/
/*!
/*************************************************************************/ /*!
-@Title Vista-specific Perf initialisation
+@Title Perf initialisation
@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved
@License Dual MIT/GPLv2
#include "img_types.h"
-/*
- * Note, WDDM needs to perform initialisation and deinitialisation
- * in order to support HW performance measurement. Other platforms
- * should not need to do anything in these functions.
- */
#define PERFINIT()
#define PERFDEINIT()
PVR_DPF((PVR_DBG_ERROR, "EnableSGXClocks: Couldn't enable SGX functional clock (%d)", res));
return PVRSRV_ERROR_UNABLE_TO_ENABLE_CLOCK;
}
+#if 0
if(cpu_is_ti816x())
lNewRate = clk_round_rate(psSysSpecData->psSGX_FCK, SYS_389x_SGX_CLOCK_SPEED + ONE_MHZ);
else
return PVRSRV_ERROR_UNABLE_TO_SET_CLOCK_RATE;
}
}
+#endif
+
+ if(cpu_is_ti816x())
+ res = clk_set_rate(psSysSpecData->psSGX_FCK,SYS_389x_SGX_CLOCK_SPEED);
+ else
+ res = clk_set_rate(psSysSpecData->psSGX_FCK,SYS_387x_SGX_CLOCK_SPEED);
+
+ if(res != 0)
+ {
+ PVR_DPF((PVR_DBG_ERROR, "EnableSsystemClocks: Couldn't set SGX Functional Clock rate"));
+ return PVRSRV_ERROR_UNABLE_TO_SET_CLOCK_RATE;
+ }
+ else
+ {
+ res = clk_get_rate(psSysSpecData->psSGX_FCK);
+ PVR_TRACE(("SGX clock rate is %dMHz", HZ_TO_MHZ(res)));
+ }
+
#if defined(DEBUG)
{