[Nouveau] [PATCH 3/6] drm/nouveau: Remove bogus gk20a aperture callback
Ben Skeggs
skeggsb at gmail.com
Tue Sep 17 03:43:13 UTC 2019
On Tue, 17 Sep 2019 at 01:18, Thierry Reding <thierry.reding at gmail.com> wrote:
>
> From: Thierry Reding <treding at nvidia.com>
>
> The gk20a (as well as all subsequent Tegra instantiations of the GPU) do
> in fact use the same apertures as regular GPUs. Prior to gv11b there are
> no checks in hardware for the aperture, so we get away with setting VRAM
> as the aperture for buffers that are actually in system memory.
Can GK20A take comptags with aperture set to system memory? For some
reason I can recall, I was under the impression PTEs needed to be
pointed at "vidmem" (despite them actually accessing system memory
anyway) on Tegra parts for compression to work? I could be mistaken
though.
Ben.
>
> Signed-off-by: Thierry Reding <treding at nvidia.com>
> ---
> drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.h | 1 -
> drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmgk20a.c | 10 ----------
> drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmgm20b.c | 4 ++--
> drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmgp10b.c | 2 +-
> 4 files changed, 3 insertions(+), 14 deletions(-)
>
> diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.h b/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.h
> index fb3a9e8bb9cd..9862f44ac8b5 100644
> --- a/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.h
> +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.h
> @@ -212,7 +212,6 @@ void gf100_vmm_flush(struct nvkm_vmm *, int);
> void gf100_vmm_invalidate(struct nvkm_vmm *, u32 type);
> void gf100_vmm_invalidate_pdb(struct nvkm_vmm *, u64 addr);
>
> -int gk20a_vmm_aper(enum nvkm_memory_target);
> int gk20a_vmm_valid(struct nvkm_vmm *, void *, u32, struct nvkm_vmm_map *);
>
> int gm200_vmm_new_(const struct nvkm_vmm_func *, const struct nvkm_vmm_func *,
> diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmgk20a.c b/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmgk20a.c
> index 16d7bf727292..999b953505b3 100644
> --- a/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmgk20a.c
> +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmgk20a.c
> @@ -25,16 +25,6 @@
>
> #include <core/memory.h>
>
> -int
> -gk20a_vmm_aper(enum nvkm_memory_target target)
> -{
> - switch (target) {
> - case NVKM_MEM_TARGET_NCOH: return 0;
> - default:
> - return -EINVAL;
> - }
> -}
> -
> int
> gk20a_vmm_valid(struct nvkm_vmm *vmm, void *argv, u32 argc,
> struct nvkm_vmm_map *map)
> diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmgm20b.c b/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmgm20b.c
> index 7a6066d886cd..f5d7819c4a40 100644
> --- a/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmgm20b.c
> +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmgm20b.c
> @@ -25,7 +25,7 @@ static const struct nvkm_vmm_func
> gm20b_vmm_17 = {
> .join = gm200_vmm_join,
> .part = gf100_vmm_part,
> - .aper = gk20a_vmm_aper,
> + .aper = gf100_vmm_aper,
> .valid = gk20a_vmm_valid,
> .flush = gf100_vmm_flush,
> .invalidate_pdb = gf100_vmm_invalidate_pdb,
> @@ -41,7 +41,7 @@ static const struct nvkm_vmm_func
> gm20b_vmm_16 = {
> .join = gm200_vmm_join,
> .part = gf100_vmm_part,
> - .aper = gk20a_vmm_aper,
> + .aper = gf100_vmm_aper,
> .valid = gk20a_vmm_valid,
> .flush = gf100_vmm_flush,
> .invalidate_pdb = gf100_vmm_invalidate_pdb,
> diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmgp10b.c b/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmgp10b.c
> index 180c8f006e32..ffe84ea2f7d9 100644
> --- a/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmgp10b.c
> +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmgp10b.c
> @@ -43,7 +43,7 @@ static const struct nvkm_vmm_func
> gp10b_vmm = {
> .join = gp100_vmm_join,
> .part = gf100_vmm_part,
> - .aper = gk20a_vmm_aper,
> + .aper = gf100_vmm_aper,
> .valid = gp10b_vmm_valid,
> .flush = gp100_vmm_flush,
> .mthd = gp100_vmm_mthd,
> --
> 2.23.0
>
> _______________________________________________
> Nouveau mailing list
> Nouveau at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/nouveau
More information about the Nouveau
mailing list