diff options
| author | Wengang Wu <wgw@motorola.com> | 2014-07-14 22:15:17 -0500 |
|---|---|---|
| committer | Jee Su Chang <w20740@motorola.com> | 2014-07-16 19:12:10 +0000 |
| commit | 56071cb85478ccac30a0ef54d9db13e6bbed50b4 (patch) | |
| tree | 7f50ad569cc4bdf2b759dba14d78387ee9ddc89f /drivers/gpu/pvr/services4/srvkm/env/linux/ion.c | |
| parent | 74fb453848774aa38c1a32934c40b053aa99d09c (diff) | |
| download | olio-linux-3.10-56071cb85478ccac30a0ef54d9db13e6bbed50b4.tar.xz olio-linux-3.10-56071cb85478ccac30a0ef54d9db13e6bbed50b4.zip | |
IKXCLOCK-2893 Merge changes based on ImgTech SGX DDK 1.12@2917986
Change-Id: I5f884bc0d76942433d0a451384b1b4bbdc324208
Diffstat (limited to 'drivers/gpu/pvr/services4/srvkm/env/linux/ion.c')
| -rwxr-xr-x | drivers/gpu/pvr/services4/srvkm/env/linux/ion.c | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/drivers/gpu/pvr/services4/srvkm/env/linux/ion.c b/drivers/gpu/pvr/services4/srvkm/env/linux/ion.c index 036f1bd7cbe..3bd66594fe3 100755 --- a/drivers/gpu/pvr/services4/srvkm/env/linux/ion.c +++ b/drivers/gpu/pvr/services4/srvkm/env/linux/ion.c @@ -119,9 +119,31 @@ IMG_VOID IonDeinit(IMG_VOID) #else /* defined(CONFIG_ION_SUNXI) */ +#if defined(CONFIG_ION_INCDHAD1) + +/* Real ion with sharing (incdhad1) */ + +extern struct ion_device *incdhad1_ion_device; +struct ion_device *gpsIonDev; + +PVRSRV_ERROR IonInit(IMG_VOID) +{ + gpsIonDev = incdhad1_ion_device; + return PVRSRV_OK; +} + + +IMG_VOID IonDeinit(IMG_VOID) +{ + gpsIonDev = IMG_NULL; +} + +#else /* defined(CONFIG_ION_INCDHAD1) */ + /* "Reference" ion implementation */ -#include "../drivers/gpu/ion/ion_priv.h" +#include SUPPORT_ION_PRIV_HEADER +#include <linux/version.h> static struct ion_heap **gapsIonHeaps; struct ion_device *gpsIonDev; @@ -138,6 +160,9 @@ static struct ion_platform_data gsGenericConfig = { .nr = 3, .heaps = +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,39)) + (struct ion_platform_heap []) +#endif { { .type = ION_HEAP_TYPE_SYSTEM_CONTIG, @@ -216,6 +241,8 @@ IMG_VOID IonDeinit(IMG_VOID) ion_device_destroy(gpsIonDev); } +#endif /* defined(CONFIG_ION_INCDHAD1) */ + #endif /* defined(CONFIG_ION_SUNXI) */ #endif /* defined(CONFIG_ION_S5P) */ |