diff options
author | Oded Gabbay <oded.gabbay@amd.com> | 2014-11-02 12:18:29 +0200 |
---|---|---|
committer | Oded Gabbay <oded.gabbay@amd.com> | 2014-11-02 12:18:29 +0200 |
commit | ecd5c9821c39626fa7c03e9c397586b24cb11b79 (patch) | |
tree | d1e853f48b9811d9af1d19af1e0afe83d0443b4c /drivers/gpu/drm/amd | |
parent | 775921edc1c10f6022ee6614ff2914704fc605bf (diff) | |
download | blackbird-obmc-linux-ecd5c9821c39626fa7c03e9c397586b24cb11b79.tar.gz blackbird-obmc-linux-ecd5c9821c39626fa7c03e9c397586b24cb11b79.zip |
amdkfd: Implement the Get Version IOCTL
Signed-off-by: Oded Gabbay <oded.gabbay@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd')
-rw-r--r-- | drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c b/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c index 3130265e6827..64c73bae960d 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c @@ -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, |