diff options
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) */ |