mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-23 18:16:01 +03:00
gpu: nvgpu: Remove PTE kind logic
Since NVGPU_AS_MAP_BUFFER_FLAGS_DIRECT_KIND_CTRL was made mandatory, kernel does not need to know the details about the PTE kinds anymore. Thus, we can remove the kind_gk20a.h header and the code related to kind table setup, as well as simplify buffer mapping code a bit. Bug 1902982 Change-Id: Iaf798023c219a64fb0a84da09431c5ce4bc046eb Signed-off-by: Sami Kiminki <skiminki@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1560933 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
b584bf8aa8
commit
cefabe7eb1
@@ -79,22 +79,19 @@ static int gk20a_as_ioctl_map_buffer_ex(
|
||||
struct gk20a_as_share *as_share,
|
||||
struct nvgpu_as_map_buffer_ex_args *args)
|
||||
{
|
||||
s16 compressible_kind;
|
||||
s16 incompressible_kind;
|
||||
|
||||
gk20a_dbg_fn("");
|
||||
|
||||
if (args->flags & NVGPU_AS_MAP_BUFFER_FLAGS_DIRECT_KIND_CTRL) {
|
||||
compressible_kind = args->compr_kind;
|
||||
incompressible_kind = args->incompr_kind;
|
||||
} else {
|
||||
/* unsupported, direct kind control must be used */
|
||||
/* unsupported, direct kind control must be used */
|
||||
if (!(args->flags & NVGPU_AS_MAP_BUFFER_FLAGS_DIRECT_KIND_CTRL)) {
|
||||
struct gk20a *g = as_share->vm->mm->g;
|
||||
nvgpu_log_info(g, "Direct kind control must be requested");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
return nvgpu_vm_map_buffer(as_share->vm, args->dmabuf_fd,
|
||||
&args->offset, args->flags,
|
||||
compressible_kind, incompressible_kind,
|
||||
args->compr_kind,
|
||||
args->incompr_kind,
|
||||
args->buffer_offset,
|
||||
args->mapping_size,
|
||||
NULL);
|
||||
|
||||
Reference in New Issue
Block a user