diff --git a/drivers/mxc/amd-gpu/gsl_cmdstream.c b/drivers/mxc/amd-gpu/gsl_cmdstream.c index 8ab90950c09..2774d10f218 100644 --- a/drivers/mxc/amd-gpu/gsl_cmdstream.c +++ b/drivers/mxc/amd-gpu/gsl_cmdstream.c @@ -98,25 +98,6 @@ kgsl_cmdstream_issueibcmds(gsl_deviceid_t device_id, int drawctxt_index, gpuaddr //---------------------------------------------------------------------------- -int -kgsl_add_timestamp(gsl_deviceid_t device_id, gsl_timestamp_t *timestamp) -{ - gsl_device_t* device = &gsl_driver.device[device_id-1]; - int status = GSL_FAILURE; - - mutex_lock(&gsl_driver.lock); - - if (device->ftbl.device_addtimestamp) - { - status = device->ftbl.device_addtimestamp(device, timestamp); - } - - mutex_unlock(&gsl_driver.lock); - return status; -} - -//---------------------------------------------------------------------------- - int kgsl_cmdstream_waittimestamp(gsl_deviceid_t device_id, gsl_timestamp_t timestamp, unsigned int timeout) { gsl_device_t* device = &gsl_driver.device[device_id-1]; diff --git a/drivers/mxc/amd-gpu/gsl_g12.c b/drivers/mxc/amd-gpu/gsl_g12.c index 630241faddb..b39b77bf121 100644 --- a/drivers/mxc/amd-gpu/gsl_g12.c +++ b/drivers/mxc/amd-gpu/gsl_g12.c @@ -103,7 +103,6 @@ extern int z160_version; // functions ////////////////////////////////////////////////////////////////////////////// -static int kgsl_g12_addtimestamp(gsl_device_t* device, gsl_timestamp_t *timestamp); static int kgsl_g12_issueibcmds(gsl_device_t* device, int drawctxt_index, gpuaddr_t ibaddr, int sizedwords, gsl_timestamp_t *timestamp, unsigned int flags); static int kgsl_g12_context_create(gsl_device_t* device, gsl_context_type_t type, unsigned int *drawctxt_id, gsl_flags_t flags); static int kgsl_g12_context_destroy(gsl_device_t* device, unsigned int drawctxt_id); @@ -595,7 +594,6 @@ kgsl_g12_getfunctable(gsl_functable_t *ftbl) ftbl->device_regwrite = kgsl_g12_regwrite; ftbl->device_waittimestamp = kgsl_g12_waittimestamp; ftbl->device_runpending = NULL; - ftbl->device_addtimestamp = kgsl_g12_addtimestamp; ftbl->intr_isr = kgsl_g12_isr; ftbl->mmu_tlbinvalidate = kgsl_g12_tlbinvalidate; ftbl->mmu_setpagetable = kgsl_g12_setpagetable; @@ -824,14 +822,4 @@ kgsl_g12_context_destroy(gsl_device_t* device, unsigned int drawctxt_id) return (GSL_SUCCESS); } -//---------------------------------------------------------------------------- - -static int -kgsl_g12_addtimestamp(gsl_device_t* device, gsl_timestamp_t *timestamp) -{ - device->current_timestamp++; - *timestamp = device->current_timestamp; - - return (GSL_SUCCESS); -} -#endif +#endif /* GSL_BLD_G12 */ diff --git a/drivers/mxc/amd-gpu/gsl_kmod.c b/drivers/mxc/amd-gpu/gsl_kmod.c index d517729f28c..86863bd9932 100644 --- a/drivers/mxc/amd-gpu/gsl_kmod.c +++ b/drivers/mxc/amd-gpu/gsl_kmod.c @@ -634,30 +634,6 @@ static int gsl_kmod_ioctl(struct inode *inode, struct file *fd, unsigned int cmd kgslStatus = kgsl_sharedmem_fromhostpointer(param.device_id, &memdesc, param.hostptr); break; } - case IOCTL_KGSL_ADD_TIMESTAMP: - { - kgsl_add_timestamp_t param; - gsl_timestamp_t tmp; -#if defined(GSL_IOCTL_DEBUG) - printk(KERN_INFO "--> %s: IOCTL_KGSL_ADD_TIMESTAMP\n", __func__); -#endif - if (copy_from_user(¶m, (void __user *)arg, sizeof(kgsl_add_timestamp_t))) - { - printk(KERN_ERR "%s: copy_from_user error\n", __func__); - kgslStatus = GSL_FAILURE; - break; - } - tmp = kgsl_add_timestamp(param.device_id, &tmp); - if (copy_to_user(param.timestamp, &tmp, sizeof(gsl_timestamp_t))) - { - printk(KERN_ERR "%s: copy_to_user error\n", __func__); - kgslStatus = GSL_FAILURE; - break; - } - kgslStatus = GSL_SUCCESS; - break; - } - case IOCTL_KGSL_DEVICE_CLOCK: { kgsl_device_clock_t param; diff --git a/drivers/mxc/amd-gpu/include/api/gsl_klibapi.h b/drivers/mxc/amd-gpu/include/api/gsl_klibapi.h index 606a43434c3..f1347050f6d 100644 --- a/drivers/mxc/amd-gpu/include/api/gsl_klibapi.h +++ b/drivers/mxc/amd-gpu/include/api/gsl_klibapi.h @@ -74,7 +74,6 @@ gsl_timestamp_t kgsl_cmdstream_readtimestamp(gsl_deviceid_t device_id, gsl_ti int kgsl_cmdstream_freememontimestamp(gsl_deviceid_t device_id, gsl_memdesc_t *memdesc, gsl_timestamp_t timestamp, gsl_timestamp_type_t type); int kgsl_cmdstream_waittimestamp(gsl_deviceid_t device_id, gsl_timestamp_t timestamp, unsigned int timeout); int kgsl_cmdwindow_write(gsl_deviceid_t device_id, gsl_cmdwindow_t target, unsigned int addr, unsigned int data); -int kgsl_add_timestamp(gsl_deviceid_t device_id, gsl_timestamp_t *timestamp); int kgsl_cmdstream_check_timestamp(gsl_deviceid_t device_id, gsl_timestamp_t timestamp); //////////////////////////////////////////////////////////////////////////// diff --git a/drivers/mxc/amd-gpu/include/api/gsl_libapi.h b/drivers/mxc/amd-gpu/include/api/gsl_libapi.h index 4d1f631f461..6eeba258bec 100644 --- a/drivers/mxc/amd-gpu/include/api/gsl_libapi.h +++ b/drivers/mxc/amd-gpu/include/api/gsl_libapi.h @@ -55,7 +55,6 @@ int gsl_device_getinfo(gsl_devhandle_t devhandle, gsl_devinf int gsl_device_setpowerstate(gsl_devhandle_t devhandle, gsl_flags_t flags); int gsl_device_setdmistate(gsl_devhandle_t devhandle, gsl_flags_t flags); int gsl_device_waittimestamp(gsl_devhandle_t devhandle, gsl_timestamp_t timestamp, unsigned int timeout); -int gsl_device_addtimestamp(gsl_devhandle_t devhandle, gsl_timestamp_t *timestamp); // direct register API int gsl_register_read(gsl_devhandle_t devhandle, unsigned int offsetwords, unsigned int *data); diff --git a/drivers/mxc/amd-gpu/include/gsl_device.h b/drivers/mxc/amd-gpu/include/gsl_device.h index 08b18161391..d58e2ac3863 100644 --- a/drivers/mxc/amd-gpu/include/gsl_device.h +++ b/drivers/mxc/amd-gpu/include/gsl_device.h @@ -52,7 +52,6 @@ typedef struct _gsl_functable_t { int (*device_regwrite) (gsl_device_t *device, unsigned int offsetwords, unsigned int value); int (*device_waittimestamp) (gsl_device_t *device, gsl_timestamp_t timestamp, unsigned int timeout); int (*device_runpending) (gsl_device_t *device); - int (*device_addtimestamp) (gsl_device_t *device_id, gsl_timestamp_t *timestamp); int (*intr_isr) (gsl_device_t *device); int (*mmu_tlbinvalidate) (gsl_device_t *device, unsigned int reg_invalidate, unsigned int pid); int (*mmu_setpagetable) (gsl_device_t *device, unsigned int reg_ptbase, gpuaddr_t ptbase, unsigned int pid); diff --git a/drivers/mxc/amd-gpu/include/gsl_ioctl.h b/drivers/mxc/amd-gpu/include/gsl_ioctl.h index 5f18528c66f..5ae059692f8 100644 --- a/drivers/mxc/amd-gpu/include/gsl_ioctl.h +++ b/drivers/mxc/amd-gpu/include/gsl_ioctl.h @@ -182,11 +182,6 @@ typedef struct _kgsl_sharedmem_fromhostpointer_t { void *hostptr; } kgsl_sharedmem_fromhostpointer_t; -typedef struct _kgsl_add_timestamp_t { - gsl_deviceid_t device_id; - gsl_timestamp_t *timestamp; -} kgsl_add_timestamp_t; - typedef struct _kgsl_device_clock_t { gsl_deviceid_t device; /* GSL_DEVICE_YAMATO = 1, GSL_DEVICE_G12 = 2 */ int enable; /* 0: disable, 1: enable */ @@ -220,7 +215,6 @@ typedef struct _kgsl_device_clock_t { #define IOCTL_KGSL_SHAREDMEM_LARGESTFREEBLOCK _IOWR(GSL_MAGIC, 0x36, struct _kgsl_sharedmem_largestfreeblock_t) #define IOCTL_KGSL_SHAREDMEM_CACHEOPERATION _IOW(GSL_MAGIC, 0x37, struct _kgsl_sharedmem_cacheoperation_t) #define IOCTL_KGSL_SHAREDMEM_FROMHOSTPOINTER _IOW(GSL_MAGIC, 0x38, struct _kgsl_sharedmem_fromhostpointer_t) -#define IOCTL_KGSL_ADD_TIMESTAMP _IOWR(GSL_MAGIC, 0x39, struct _kgsl_add_timestamp_t) #define IOCTL_KGSL_DRIVER_EXIT _IOWR(GSL_MAGIC, 0x3A, NULL) #define IOCTL_KGSL_DEVICE_CLOCK _IOWR(GSL_MAGIC, 0x60, struct _kgsl_device_clock_t)