diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/ctrl_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/ctrl_gk20a.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/ctrl_gk20a.c b/drivers/gpu/nvgpu/gk20a/ctrl_gk20a.c index 3b5ca298..0b6b5913 100644 --- a/drivers/gpu/nvgpu/gk20a/ctrl_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/ctrl_gk20a.c | |||
@@ -514,6 +514,13 @@ static int gk20a_ctrl_vsm_mapping(struct gk20a *g, | |||
514 | return err; | 514 | return err; |
515 | } | 515 | } |
516 | 516 | ||
517 | static int gk20a_ctrl_get_buffer_info( | ||
518 | struct gk20a *g, struct nvgpu_gpu_get_buffer_info_args *args) | ||
519 | { | ||
520 | return gk20a_mm_get_buffer_info(dev_from_gk20a(g), args->in.dmabuf_fd, | ||
521 | &args->out.id, &args->out.length); | ||
522 | } | ||
523 | |||
517 | long gk20a_ctrl_dev_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) | 524 | long gk20a_ctrl_dev_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) |
518 | { | 525 | { |
519 | struct platform_device *dev = filp->private_data; | 526 | struct platform_device *dev = filp->private_data; |
@@ -729,6 +736,10 @@ long gk20a_ctrl_dev_ioctl(struct file *filp, unsigned int cmd, unsigned long arg | |||
729 | (struct nvgpu_gpu_vsms_mapping *)buf); | 736 | (struct nvgpu_gpu_vsms_mapping *)buf); |
730 | break; | 737 | break; |
731 | 738 | ||
739 | case NVGPU_GPU_IOCTL_GET_BUFFER_INFO: | ||
740 | err = gk20a_ctrl_get_buffer_info(g, | ||
741 | (struct nvgpu_gpu_get_buffer_info_args *)buf); | ||
742 | break; | ||
732 | 743 | ||
733 | default: | 744 | default: |
734 | dev_dbg(dev_from_gk20a(g), "unrecognized gpu ioctl cmd: 0x%x", cmd); | 745 | dev_dbg(dev_from_gk20a(g), "unrecognized gpu ioctl cmd: 0x%x", cmd); |