summaryrefslogtreecommitdiff
path: root/drivers/gpu/rogue
diff options
context:
space:
mode:
authorzxl <zhuangxl@rock-chips.com>2015-04-08 11:20:30 +0800
committerzxl <zhuangxl@rock-chips.com>2015-04-08 11:20:30 +0800
commit93691f714020fa6ce7f57bff970e0468e2c9bd73 (patch)
tree87def19458b7cd8f2002841e9db6ab7abd7e972b /drivers/gpu/rogue
parent721f684bc0bbbf649b04df6456c8bf0e50160072 (diff)
RK3368 GPU version: L0.12
1. Instead kmalloc to kzalloc. 2. Clear cleanup_sync in pvr_sync_clean_freelist.
Diffstat (limited to 'drivers/gpu/rogue')
-rwxr-xr-xdrivers/gpu/rogue/dc_fbdev/dc_fbdev.c4
-rwxr-xr-xdrivers/gpu/rogue/include/pvrversion.h2
-rw-r--r--drivers/gpu/rogue/kernel/drivers/staging/imgtec/adf_pdp.c2
-rw-r--r--drivers/gpu/rogue/kernel/drivers/staging/imgtec/pvr_sync.c11
-rw-r--r--drivers/gpu/rogue/services/include/shared/lock.h2
-rw-r--r--drivers/gpu/rogue/services/server/env/linux/allocmem.c4
-rw-r--r--drivers/gpu/rogue/services/server/env/linux/osfunc.c12
-rw-r--r--drivers/gpu/rogue/services/server/env/linux/pvr_debugfs.c2
-rw-r--r--drivers/gpu/rogue/system/common/pci_support.c2
-rwxr-xr-xdrivers/gpu/rogue/system/rk3368/rk_init.c2
-rw-r--r--drivers/gpu/rogue/tools/services/debug/dbgdriv/linux/hostfunc.c2
11 files changed, 23 insertions, 22 deletions
diff --git a/drivers/gpu/rogue/dc_fbdev/dc_fbdev.c b/drivers/gpu/rogue/dc_fbdev/dc_fbdev.c
index c8f5e3de0a0d..3addd28d8c2a 100755
--- a/drivers/gpu/rogue/dc_fbdev/dc_fbdev.c
+++ b/drivers/gpu/rogue/dc_fbdev/dc_fbdev.c
@@ -508,7 +508,7 @@ PVRSRV_ERROR DC_FBDEV_BufferAlloc(IMG_HANDLE hDisplayContext,
goto err_out;
}
- psBuffer = kmalloc(sizeof(DC_FBDEV_BUFFER), GFP_KERNEL);
+ psBuffer = kzalloc(sizeof(DC_FBDEV_BUFFER), GFP_KERNEL);
if (!psBuffer)
{
eError = PVRSRV_ERROR_OUT_OF_MEMORY;
@@ -827,7 +827,7 @@ static int __init DC_FBDEV_init(void)
goto err_module_put;
}
- gpsDeviceData = kmalloc(sizeof(DC_FBDEV_DEVICE), GFP_KERNEL);
+ gpsDeviceData = kzalloc(sizeof(DC_FBDEV_DEVICE), GFP_KERNEL);
if(!gpsDeviceData)
goto err_module_put;
diff --git a/drivers/gpu/rogue/include/pvrversion.h b/drivers/gpu/rogue/include/pvrversion.h
index 2690ecd70537..ddb532b491cd 100755
--- a/drivers/gpu/rogue/include/pvrversion.h
+++ b/drivers/gpu/rogue/include/pvrversion.h
@@ -70,5 +70,5 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define PVRVERSION_UNPACK_MIN(VERSION) (((VERSION) >> 0) & 0xFFFF)
//chenli:define rockchip version
-#define RKVERSION "L 0.11"
+#define RKVERSION "L 0.12"
#endif /* _PVRVERSION_H_ */
diff --git a/drivers/gpu/rogue/kernel/drivers/staging/imgtec/adf_pdp.c b/drivers/gpu/rogue/kernel/drivers/staging/imgtec/adf_pdp.c
index 8a325e14557b..ce0aa1b5af38 100644
--- a/drivers/gpu/rogue/kernel/drivers/staging/imgtec/adf_pdp.c
+++ b/drivers/gpu/rogue/kernel/drivers/staging/imgtec/adf_pdp.c
@@ -861,7 +861,7 @@ static int pdp_validate(struct adf_device *dev, struct adf_post *cfg,
* handle cases e.g. during fence timeouts where validates
* are called without corresponding posts.
*/
- int *validates = kmalloc(sizeof(int), GFP_KERNEL);
+ int *validates = kzalloc(sizeof(int), GFP_KERNEL);
*validates = atomic_inc_return(&pdp->num_validates);
*driver_state = validates;
} else {
diff --git a/drivers/gpu/rogue/kernel/drivers/staging/imgtec/pvr_sync.c b/drivers/gpu/rogue/kernel/drivers/staging/imgtec/pvr_sync.c
index 31cab2e359b0..68c14e601f07 100644
--- a/drivers/gpu/rogue/kernel/drivers/staging/imgtec/pvr_sync.c
+++ b/drivers/gpu/rogue/kernel/drivers/staging/imgtec/pvr_sync.c
@@ -394,7 +394,7 @@ sync_pool_get(struct pvr_sync_native_sync_prim **_sync,
if (list_empty(&sync_pool_free_list)) {
/* If there is nothing in the pool, create a new sync prim. */
- sync = kmalloc(sizeof(struct pvr_sync_native_sync_prim),
+ sync = kzalloc(sizeof(struct pvr_sync_native_sync_prim),
GFP_KERNEL);
if (!sync) {
pr_err("pvr_sync: %s: Failed to allocate sync data",
@@ -859,14 +859,14 @@ pvr_sync_create_waiter_for_foreign_sync(int fd)
goto err_out;
}
- kernel = kmalloc(sizeof(struct pvr_sync_kernel_pair), GFP_KERNEL);
+ kernel = kzalloc(sizeof(struct pvr_sync_kernel_pair), GFP_KERNEL);
if (!kernel) {
pr_err("pvr_sync: %s: Failed to allocate sync kernel",
__func__);
goto err_put_fence;
}
- sync_fence = kmalloc(sizeof(struct pvr_sync_fence), GFP_KERNEL);
+ sync_fence = kzalloc(sizeof(struct pvr_sync_fence), GFP_KERNEL);
if (!sync_fence) {
pr_err("pvr_sync: %s: Failed to allocate pvr sync fence",
__func__);
@@ -896,7 +896,7 @@ pvr_sync_create_waiter_for_foreign_sync(int fd)
kernel->cleanup_sync->next_value++;
/* The custom waiter structure is freed in the waiter callback */
- waiter = kmalloc(sizeof(struct pvr_sync_fence_waiter), GFP_KERNEL);
+ waiter = kzalloc(sizeof(struct pvr_sync_fence_waiter), GFP_KERNEL);
if (!waiter) {
pr_err("pvr_sync: %s: Failed to allocate waiter", __func__);
goto err_free_cleanup_sync;
@@ -1804,6 +1804,7 @@ pvr_sync_clean_freelist(void)
continue;
}
+ kernel->cleanup_sync=NULL;
/* Remove the entry from the free list. */
list_move_tail(&kernel->list, &unlocked_free_list);
}
@@ -1947,7 +1948,7 @@ void pvr_sync_update_all_timelines(void *command_complete_handle)
if (signal) {
timeline_to_signal =
- kmalloc(sizeof(struct pvr_sync_tl_to_signal),
+ kzalloc(sizeof(struct pvr_sync_tl_to_signal),
GFP_KERNEL);
if (!timeline_to_signal)
break;
diff --git a/drivers/gpu/rogue/services/include/shared/lock.h b/drivers/gpu/rogue/services/include/shared/lock.h
index d581614b72f6..b74aab372f9b 100644
--- a/drivers/gpu/rogue/services/include/shared/lock.h
+++ b/drivers/gpu/rogue/services/include/shared/lock.h
@@ -56,7 +56,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define OSLockCreate(phLock, eLockType) ({ \
PVRSRV_ERROR e = PVRSRV_ERROR_OUT_OF_MEMORY; \
- *(phLock) = kmalloc(sizeof(struct mutex), GFP_KERNEL); \
+ *(phLock) = kzalloc(sizeof(struct mutex), GFP_KERNEL); \
if (*(phLock)) { mutex_init(*(phLock)); e = PVRSRV_OK; }; \
e;})
#define OSLockDestroy(hLock) ({mutex_destroy((hLock)); kfree((hLock)); PVRSRV_OK;})
diff --git a/drivers/gpu/rogue/services/server/env/linux/allocmem.c b/drivers/gpu/rogue/services/server/env/linux/allocmem.c
index 214b15ad694a..b3be78bdc8f5 100644
--- a/drivers/gpu/rogue/services/server/env/linux/allocmem.c
+++ b/drivers/gpu/rogue/services/server/env/linux/allocmem.c
@@ -61,7 +61,7 @@ IMG_INTERNAL IMG_PVOID OSAllocMem(IMG_UINT32 ui32Size)
}
else
{
- pvRet = kmalloc(ui32Size, GFP_KERNEL);
+ pvRet = kzalloc(ui32Size, GFP_KERNEL);
}
#if defined(PVRSRV_ENABLE_PROCESS_STATS)
@@ -110,7 +110,7 @@ IMG_INTERNAL IMG_PVOID OSAllocMem(IMG_UINT32 ui32Size)
}
IMG_INTERNAL IMG_PVOID OSAllocMemstatMem(IMG_UINT32 ui32Size)
{
- IMG_PVOID pvRet = kmalloc(ui32Size, GFP_KERNEL);
+ IMG_PVOID pvRet = kzalloc(ui32Size, GFP_KERNEL);
return pvRet;
}
diff --git a/drivers/gpu/rogue/services/server/env/linux/osfunc.c b/drivers/gpu/rogue/services/server/env/linux/osfunc.c
index 66455008cd9e..711a1afec11d 100644
--- a/drivers/gpu/rogue/services/server/env/linux/osfunc.c
+++ b/drivers/gpu/rogue/services/server/env/linux/osfunc.c
@@ -766,7 +766,7 @@ PVRSRV_ERROR OSInstallDeviceLISR(PVRSRV_DEVICE_CONFIG *psDevConfig,
LISR_DATA *psLISRData;
unsigned long flags = 0;
- psLISRData = kmalloc(sizeof(LISR_DATA), GFP_KERNEL);
+ psLISRData = kzalloc(sizeof(LISR_DATA), GFP_KERNEL);
psLISRData->pfnLISR = pfnLISR;
psLISRData->pvData = pvData;
@@ -847,7 +847,7 @@ PVRSRV_ERROR OSInstallMISR(IMG_HANDLE *hMISRData, PFN_MISR pfnMISR,
{
MISR_DATA *psMISRData;
- psMISRData = kmalloc(sizeof(MISR_DATA), GFP_KERNEL);
+ psMISRData = kzalloc(sizeof(MISR_DATA), GFP_KERNEL);
if (psMISRData == NULL)
{
return PVRSRV_ERROR_OUT_OF_MEMORY;
@@ -935,7 +935,7 @@ PVRSRV_ERROR OSInstallMISR(IMG_HANDLE *hMISRData, PFN_MISR pfnMISR, void *hData)
{
MISR_DATA *psMISRData;
- psMISRData = kmalloc(sizeof(MISR_DATA), GFP_KERNEL);
+ psMISRData = kzalloc(sizeof(MISR_DATA), GFP_KERNEL);
if (psMISRData == NULL)
{
return PVRSRV_ERROR_OUT_OF_MEMORY;
@@ -1006,7 +1006,7 @@ PVRSRV_ERROR OSInstallMISR(IMG_HANDLE *hMISRData, PFN_MISR pfnMISR, void *hData)
{
MISR_DATA *psMISRData;
- psMISRData = kmalloc(sizeof(MISR_DATA), GFP_KERNEL);
+ psMISRData = kzalloc(sizeof(MISR_DATA), GFP_KERNEL);
if (psMISRData == NULL)
{
return PVRSRV_ERROR_OUT_OF_MEMORY;
@@ -1110,7 +1110,7 @@ PVRSRV_ERROR OSThreadCreatePriority(IMG_HANDLE *phThread,
OSThreadData *psOSThreadData;
PVRSRV_ERROR eError;
- psOSThreadData = kmalloc(sizeof(OSThreadData), GFP_KERNEL);
+ psOSThreadData = kzalloc(sizeof(OSThreadData), GFP_KERNEL);
if (psOSThreadData == IMG_NULL)
{
eError = PVRSRV_ERROR_OUT_OF_MEMORY;
@@ -1878,7 +1878,7 @@ PVRSRV_ERROR OSWRLockCreate(POSWR_LOCK *ppsLock)
{
POSWR_LOCK psLock;
- psLock = kmalloc(sizeof(*psLock), GFP_KERNEL);
+ psLock = kzalloc(sizeof(*psLock), GFP_KERNEL);
if (psLock == NULL)
{
return PVRSRV_ERROR_OUT_OF_MEMORY;
diff --git a/drivers/gpu/rogue/services/server/env/linux/pvr_debugfs.c b/drivers/gpu/rogue/services/server/env/linux/pvr_debugfs.c
index 044622cda23d..ffe114ef7984 100644
--- a/drivers/gpu/rogue/services/server/env/linux/pvr_debugfs.c
+++ b/drivers/gpu/rogue/services/server/env/linux/pvr_debugfs.c
@@ -313,7 +313,7 @@ int PVRDebugFSCreateEntry(const char *pszName,
PVR_ASSERT(gpsPVRDebugFSEntryDir != NULL);
- psPrivData = kmalloc(sizeof(*psPrivData), GFP_KERNEL);
+ psPrivData = kzalloc(sizeof(*psPrivData), GFP_KERNEL);
if (psPrivData == NULL)
{
return -ENOMEM;
diff --git a/drivers/gpu/rogue/system/common/pci_support.c b/drivers/gpu/rogue/system/common/pci_support.c
index 6374ff576317..027a3c51359e 100644
--- a/drivers/gpu/rogue/system/common/pci_support.c
+++ b/drivers/gpu/rogue/system/common/pci_support.c
@@ -65,7 +65,7 @@ PVRSRV_PCI_DEV_HANDLE OSPCISetDev(IMG_VOID *pvPCICookie, HOST_PCI_INIT_FLAGS eFl
IMG_UINT32 i;
PVR_PCI_DEV *psPVRPCI;
- psPVRPCI = kmalloc(sizeof(*psPVRPCI), GFP_KERNEL);
+ psPVRPCI = kzalloc(sizeof(*psPVRPCI), GFP_KERNEL);
if (psPVRPCI == IMG_NULL)
{
printk(KERN_ERR "OSPCISetDev: Couldn't allocate PVR PCI structure\n");
diff --git a/drivers/gpu/rogue/system/rk3368/rk_init.c b/drivers/gpu/rogue/system/rk3368/rk_init.c
index 64d88710b03d..1c0ff3b517ad 100755
--- a/drivers/gpu/rogue/system/rk3368/rk_init.c
+++ b/drivers/gpu/rogue/system/rk3368/rk_init.c
@@ -1754,7 +1754,7 @@ IMG_VOID RgxRkInit(IMG_VOID)
if (NULL == platform)
{
- PVR_DPF((PVR_DBG_ERROR, "RgxRkInit: Failed to kmalloc rk_context"));
+ PVR_DPF((PVR_DBG_ERROR, "RgxRkInit: Failed to kzalloc rk_context"));
return;
}
diff --git a/drivers/gpu/rogue/tools/services/debug/dbgdriv/linux/hostfunc.c b/drivers/gpu/rogue/tools/services/debug/dbgdriv/linux/hostfunc.c
index 578d77b4f258..012b20ac5d12 100644
--- a/drivers/gpu/rogue/tools/services/debug/dbgdriv/linux/hostfunc.c
+++ b/drivers/gpu/rogue/tools/services/debug/dbgdriv/linux/hostfunc.c
@@ -289,7 +289,7 @@ IMG_VOID *HostCreateMutex(IMG_VOID)
{
MUTEX *psMutex;
- psMutex = kmalloc(sizeof(*psMutex), GFP_KERNEL);
+ psMutex = kzalloc(sizeof(*psMutex), GFP_KERNEL);
if (psMutex)
{
INIT_MUTEX(psMutex);