Skip to content

Commit

Permalink
amdkfd: Implement the Get Version IOCTL
Browse files Browse the repository at this point in the history
Signed-off-by: Oded Gabbay <oded.gabbay@amd.com>
  • Loading branch information
Oded Gabbay committed Nov 2, 2014
1 parent 775921e commit ecd5c98
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,16 @@ static int kfd_open(struct inode *inode, struct file *filep)
static long kfd_ioctl_get_version(struct file *filep, struct kfd_process *p,
void __user *arg)
{
return -ENODEV;
struct kfd_ioctl_get_version_args args;
int err = 0;

args.major_version = KFD_IOCTL_MAJOR_VERSION;
args.minor_version = KFD_IOCTL_MINOR_VERSION;

if (copy_to_user(arg, &args, sizeof(args)))
err = -EFAULT;

return err;
}

static int set_queue_properties_from_user(struct queue_properties *q_properties,
Expand Down

0 comments on commit ecd5c98

Please sign in to comment.