mirror of
https://github.com/genesi/linux-legacy.git
synced 2026-02-04 00:04:52 +00:00
amd-gpu: remove device_clock ioctl
No userspace users except a reference in libkgsl.so which is never called. kgsl_device_clock() is left in (but preprocessed out) since it has a fairly interesting behavior in turning the autogating on and off which is not the same as turning the actual clocks on and off and could be useful with modification for further refinement of power management at a later date.
This commit is contained in:
@@ -634,21 +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_DEVICE_CLOCK:
|
||||
{
|
||||
kgsl_device_clock_t param;
|
||||
#if defined(GSL_IOCTL_DEBUG)
|
||||
printk(KERN_INFO "--> %s: IOCTL_KGSL_DEVICE_CLOCK\n", __func__);
|
||||
#endif
|
||||
if (copy_from_user(¶m, (void __user *)arg, sizeof(kgsl_device_clock_t)))
|
||||
{
|
||||
printk(KERN_ERR "%s: copy_from_user error\n", __func__);
|
||||
kgslStatus = GSL_FAILURE;
|
||||
break;
|
||||
}
|
||||
kgslStatus = kgsl_device_clock(param.device, param.enable);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
kgslStatus = -ENOTTY;
|
||||
break;
|
||||
|
||||
@@ -119,7 +119,6 @@ int kgsl_g12_getfunctable(gsl_functable_t *ftbl);
|
||||
|
||||
int kgsl_clock(gsl_deviceid_t dev, int enable);
|
||||
int kgsl_device_active(gsl_device_t *dev);
|
||||
int kgsl_device_clock(gsl_deviceid_t id, int enable);
|
||||
int kgsl_device_autogate_init(gsl_device_t *dev);
|
||||
void kgsl_device_autogate_exit(gsl_device_t *dev);
|
||||
|
||||
|
||||
@@ -182,11 +182,6 @@ typedef struct _kgsl_sharedmem_fromhostpointer_t {
|
||||
void *hostptr;
|
||||
} kgsl_sharedmem_fromhostpointer_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 */
|
||||
} kgsl_device_clock_t;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// ioctl numbers
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
@@ -216,7 +211,6 @@ typedef struct _kgsl_device_clock_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_DRIVER_EXIT _IOWR(GSL_MAGIC, 0x3A, NULL)
|
||||
#define IOCTL_KGSL_DEVICE_CLOCK _IOWR(GSL_MAGIC, 0x60, struct _kgsl_device_clock_t)
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -108,6 +108,7 @@ static void kgsl_device_inactive(unsigned long data)
|
||||
spin_unlock_irqrestore(&autogate->lock, flags);
|
||||
}
|
||||
|
||||
#if 0
|
||||
int kgsl_device_clock(gsl_deviceid_t id, int enable)
|
||||
{
|
||||
int ret = GSL_SUCCESS;
|
||||
@@ -126,6 +127,7 @@ int kgsl_device_clock(gsl_deviceid_t id, int enable)
|
||||
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
int kgsl_device_autogate_init(gsl_device_t *dev)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user