mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-13 14:14:37 +00:00
drm/amdkfd: reformat IOCTL definitions to drm-style
This patch reformats the ioctl definitions in kfd_ioctl.h to be similar to the drm ioctls definition style. v2: Renamed KFD_COMMAND_(START|END) to AMDKFD_... Signed-off-by: Oded Gabbay <oded.gabbay@amd.com> Acked-by: Christian König <christian.koenig@amd.com>
This commit is contained in:
parent
524a640444
commit
b81c55db10
2 changed files with 30 additions and 22 deletions
|
@ -523,35 +523,36 @@ static long kfd_ioctl(struct file *filep, unsigned int cmd, unsigned long arg)
|
||||||
|
|
||||||
|
|
||||||
switch (cmd) {
|
switch (cmd) {
|
||||||
case KFD_IOC_GET_VERSION:
|
case AMDKFD_IOC_GET_VERSION:
|
||||||
retcode = kfd_ioctl_get_version(filep, process, kdata);
|
retcode = kfd_ioctl_get_version(filep, process, kdata);
|
||||||
break;
|
break;
|
||||||
case KFD_IOC_CREATE_QUEUE:
|
|
||||||
|
case AMDKFD_IOC_CREATE_QUEUE:
|
||||||
retcode = kfd_ioctl_create_queue(filep, process,
|
retcode = kfd_ioctl_create_queue(filep, process,
|
||||||
kdata);
|
kdata);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case KFD_IOC_DESTROY_QUEUE:
|
case AMDKFD_IOC_DESTROY_QUEUE:
|
||||||
retcode = kfd_ioctl_destroy_queue(filep, process,
|
retcode = kfd_ioctl_destroy_queue(filep, process,
|
||||||
kdata);
|
kdata);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case KFD_IOC_SET_MEMORY_POLICY:
|
case AMDKFD_IOC_SET_MEMORY_POLICY:
|
||||||
retcode = kfd_ioctl_set_memory_policy(filep, process,
|
retcode = kfd_ioctl_set_memory_policy(filep, process,
|
||||||
kdata);
|
kdata);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case KFD_IOC_GET_CLOCK_COUNTERS:
|
case AMDKFD_IOC_GET_CLOCK_COUNTERS:
|
||||||
retcode = kfd_ioctl_get_clock_counters(filep, process,
|
retcode = kfd_ioctl_get_clock_counters(filep, process,
|
||||||
kdata);
|
kdata);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case KFD_IOC_GET_PROCESS_APERTURES:
|
case AMDKFD_IOC_GET_PROCESS_APERTURES:
|
||||||
retcode = kfd_ioctl_get_process_apertures(filep, process,
|
retcode = kfd_ioctl_get_process_apertures(filep, process,
|
||||||
kdata);
|
kdata);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case KFD_IOC_UPDATE_QUEUE:
|
case AMDKFD_IOC_UPDATE_QUEUE:
|
||||||
retcode = kfd_ioctl_update_queue(filep, process,
|
retcode = kfd_ioctl_update_queue(filep, process,
|
||||||
kdata);
|
kdata);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -128,27 +128,34 @@ struct kfd_ioctl_get_process_apertures_args {
|
||||||
uint32_t pad;
|
uint32_t pad;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define KFD_IOC_MAGIC 'K'
|
#define AMDKFD_IOCTL_BASE 'K'
|
||||||
|
#define AMDKFD_IO(nr) _IO(AMDKFD_IOCTL_BASE, nr)
|
||||||
|
#define AMDKFD_IOR(nr, type) _IOR(AMDKFD_IOCTL_BASE, nr, type)
|
||||||
|
#define AMDKFD_IOW(nr, type) _IOW(AMDKFD_IOCTL_BASE, nr, type)
|
||||||
|
#define AMDKFD_IOWR(nr, type) _IOWR(AMDKFD_IOCTL_BASE, nr, type)
|
||||||
|
|
||||||
#define KFD_IOC_GET_VERSION \
|
#define AMDKFD_IOC_GET_VERSION \
|
||||||
_IOR(KFD_IOC_MAGIC, 1, struct kfd_ioctl_get_version_args)
|
AMDKFD_IOR(0x01, struct kfd_ioctl_get_version_args)
|
||||||
|
|
||||||
#define KFD_IOC_CREATE_QUEUE \
|
#define AMDKFD_IOC_CREATE_QUEUE \
|
||||||
_IOWR(KFD_IOC_MAGIC, 2, struct kfd_ioctl_create_queue_args)
|
AMDKFD_IOWR(0x02, struct kfd_ioctl_create_queue_args)
|
||||||
|
|
||||||
#define KFD_IOC_DESTROY_QUEUE \
|
#define AMDKFD_IOC_DESTROY_QUEUE \
|
||||||
_IOWR(KFD_IOC_MAGIC, 3, struct kfd_ioctl_destroy_queue_args)
|
AMDKFD_IOWR(0x03, struct kfd_ioctl_destroy_queue_args)
|
||||||
|
|
||||||
#define KFD_IOC_SET_MEMORY_POLICY \
|
#define AMDKFD_IOC_SET_MEMORY_POLICY \
|
||||||
_IOW(KFD_IOC_MAGIC, 4, struct kfd_ioctl_set_memory_policy_args)
|
AMDKFD_IOW(0x04, struct kfd_ioctl_set_memory_policy_args)
|
||||||
|
|
||||||
#define KFD_IOC_GET_CLOCK_COUNTERS \
|
#define AMDKFD_IOC_GET_CLOCK_COUNTERS \
|
||||||
_IOWR(KFD_IOC_MAGIC, 5, struct kfd_ioctl_get_clock_counters_args)
|
AMDKFD_IOWR(0x05, struct kfd_ioctl_get_clock_counters_args)
|
||||||
|
|
||||||
#define KFD_IOC_GET_PROCESS_APERTURES \
|
#define AMDKFD_IOC_GET_PROCESS_APERTURES \
|
||||||
_IOR(KFD_IOC_MAGIC, 6, struct kfd_ioctl_get_process_apertures_args)
|
AMDKFD_IOR(0x06, struct kfd_ioctl_get_process_apertures_args)
|
||||||
|
|
||||||
#define KFD_IOC_UPDATE_QUEUE \
|
#define AMDKFD_IOC_UPDATE_QUEUE \
|
||||||
_IOW(KFD_IOC_MAGIC, 7, struct kfd_ioctl_update_queue_args)
|
AMDKFD_IOW(0x07, struct kfd_ioctl_update_queue_args)
|
||||||
|
|
||||||
|
#define AMDKFD_COMMAND_START 0x01
|
||||||
|
#define AMDKFD_COMMAND_END 0x08
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue