From 3c6409a51b439aac863338303dabd38add34118e Mon Sep 17 00:00:00 2001 From: sh Date: Tue, 7 Jan 2020 20:10:30 +0530 Subject: gpu: nvgpu: vgpu: add platform atomic support Set platform atomic attribute flag. bug 200580236 Change-Id: I06fd0cf363886922ad5145837004d04e35383470 Signed-off-by: Vaibhav Kachore Reviewed-on: https://git-master.nvidia.com/r/2016078 (cherry picked from commit ef5aac37d9a4531fecd1f1dae0581a2bd28f164d) Signed-off-by: Lakshmanan M Reviewed-on: https://git-master.nvidia.com/r/2274970 GVS: Gerrit_Virtual_Submit Tested-by: Sreeniketh H Reviewed-by: Deepak Nibade Reviewed-by: Bibek Basu Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/include/nvgpu/vgpu/tegra_vgpu.h | 3 ++- drivers/gpu/nvgpu/vgpu/gp10b/vgpu_mm_gp10b.c | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'drivers') diff --git a/drivers/gpu/nvgpu/include/nvgpu/vgpu/tegra_vgpu.h b/drivers/gpu/nvgpu/include/nvgpu/vgpu/tegra_vgpu.h index 5ee50b18..6abb5e33 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/vgpu/tegra_vgpu.h +++ b/drivers/gpu/nvgpu/include/nvgpu/vgpu/tegra_vgpu.h @@ -1,7 +1,7 @@ /* * Tegra GPU Virtualization Interfaces to Server * - * Copyright (c) 2014-2018, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2014-2020, NVIDIA CORPORATION. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -175,6 +175,7 @@ struct tegra_vgpu_as_map_params { #define TEGRA_VGPU_MAP_CACHEABLE (1 << 0) #define TEGRA_VGPU_MAP_IO_COHERENT (1 << 1) #define TEGRA_VGPU_MAP_L3_ALLOC (1 << 2) +#define TEGRA_VGPU_MAP_PLATFORM_ATOMIC (1 << 3) struct tegra_vgpu_as_map_ex_params { u64 handle; diff --git a/drivers/gpu/nvgpu/vgpu/gp10b/vgpu_mm_gp10b.c b/drivers/gpu/nvgpu/vgpu/gp10b/vgpu_mm_gp10b.c index 4b06aea8..1f537d48 100644 --- a/drivers/gpu/nvgpu/vgpu/gp10b/vgpu_mm_gp10b.c +++ b/drivers/gpu/nvgpu/vgpu/gp10b/vgpu_mm_gp10b.c @@ -1,7 +1,7 @@ /* * Virtualized GPU Memory Management * - * Copyright (c) 2015-2019, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2015-2020, NVIDIA CORPORATION. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -179,6 +179,10 @@ u64 vgpu_gp10b_locked_gmmu_map(struct vm_gk20a *vm, p->flags |= TEGRA_VGPU_MAP_IO_COHERENT; if (flags & NVGPU_VM_MAP_L3_ALLOC) p->flags |= TEGRA_VGPU_MAP_L3_ALLOC; + if (flags & NVGPU_VM_MAP_PLATFORM_ATOMIC) { + p->flags |= TEGRA_VGPU_MAP_PLATFORM_ATOMIC; + } + p->prot = prot; p->ctag_offset = ctag_offset; p->clear_ctags = clear_ctags; -- cgit v1.2.2