mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-23 01:50:07 +03:00
gpu: nvgpu: Remove support for legacy mapping
Make NVGPU_AS_MAP_BUFFER_FLAGS_DIRECT_KIND_CTRL mandatory for all map IOCTLs. We'll clean up the legacy kernel code in subsequent patches. Remove support for NVGPU_AS_IOCTL_MAP_BUFFER. It has been superseded by NVGPU_AS_IOCTL_MAP_BUFFER_EX. Remove legacy definitions to nvgpu_map_buffer_args and the related flags, and update the in-kernel map calls accordingly by switching to the newer definitions. Bug 1902982 Change-Id: Ie9a7f02b8d5d0ec7c3722c4481afab6d39b4fbd0 Signed-off-by: Sami Kiminki <skiminki@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1560932 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
02d281d077
commit
c22a5af913
@@ -88,8 +88,8 @@ static int gk20a_as_ioctl_map_buffer_ex(
|
||||
compressible_kind = args->compr_kind;
|
||||
incompressible_kind = args->incompr_kind;
|
||||
} else {
|
||||
compressible_kind = args->kind;
|
||||
incompressible_kind = NV_KIND_INVALID;
|
||||
/* unsupported, direct kind control must be used */
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
return nvgpu_vm_map_buffer(as_share->vm, args->dmabuf_fd,
|
||||
@@ -100,19 +100,6 @@ static int gk20a_as_ioctl_map_buffer_ex(
|
||||
NULL);
|
||||
}
|
||||
|
||||
static int gk20a_as_ioctl_map_buffer(
|
||||
struct gk20a_as_share *as_share,
|
||||
struct nvgpu_as_map_buffer_args *args)
|
||||
{
|
||||
gk20a_dbg_fn("");
|
||||
return nvgpu_vm_map_buffer(as_share->vm, args->dmabuf_fd,
|
||||
&args->o_a.offset,
|
||||
args->flags, NV_KIND_DEFAULT,
|
||||
NV_KIND_DEFAULT,
|
||||
0, 0, NULL);
|
||||
/* args->o_a.offset will be set if !err */
|
||||
}
|
||||
|
||||
static int gk20a_as_ioctl_unmap_buffer(
|
||||
struct gk20a_as_share *as_share,
|
||||
struct nvgpu_as_unmap_buffer_args *args)
|
||||
@@ -187,8 +174,9 @@ static int gk20a_as_ioctl_map_buffer_batch(
|
||||
compressible_kind = map_args.compr_kind;
|
||||
incompressible_kind = map_args.incompr_kind;
|
||||
} else {
|
||||
compressible_kind = map_args.kind;
|
||||
incompressible_kind = NV_KIND_INVALID;
|
||||
/* direct kind control must be used */
|
||||
err = -EINVAL;
|
||||
break;
|
||||
}
|
||||
|
||||
err = nvgpu_vm_map_buffer(
|
||||
@@ -348,11 +336,6 @@ long gk20a_as_dev_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
|
||||
err = gk20a_as_ioctl_free_space(as_share,
|
||||
(struct nvgpu_as_free_space_args *)buf);
|
||||
break;
|
||||
case NVGPU_AS_IOCTL_MAP_BUFFER:
|
||||
trace_gk20a_as_ioctl_map_buffer(g->name);
|
||||
err = gk20a_as_ioctl_map_buffer(as_share,
|
||||
(struct nvgpu_as_map_buffer_args *)buf);
|
||||
break;
|
||||
case NVGPU_AS_IOCTL_MAP_BUFFER_EX:
|
||||
trace_gk20a_as_ioctl_map_buffer(g->name);
|
||||
err = gk20a_as_ioctl_map_buffer_ex(as_share,
|
||||
|
||||
Reference in New Issue
Block a user