diff options
author | Debarshi Dutta <ddutta@nvidia.com> | 2020-07-28 07:23:08 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2020-08-07 12:11:01 -0400 |
commit | c46d6fbc5b8d87118ed608e462c62a7976d19246 (patch) | |
tree | 6db15eef28a83fc9feeeea27679b858e6628ef4f /drivers/gpu/nvgpu/common | |
parent | 570f03764fa9f3e014b9c90a48aa7635edf4c0ac (diff) |
gpu: nvgpu: Discard coherency check on gmmu
With MSS Nvlink set for force snoop, check for the coherency flag in
gmmu attribute and setting pte aperture to coherent type based on that
checking is not relevant.
coherent variable removed from nvgpu_gmmu_attrs struct.
Bug 200473147
Bug 3057980
Change-Id: Idf76cac901ef7c70faa2c4f7f11a046d94b9466a
Signed-off-by: Vinod G <vinodg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2013212
Signed-off-by: Debarshi Dutta <ddutta@nvidia.com>
(cherry-picked from 4e1769097526e5203f7c18a663ab3c29f5568ae5
in rel-32)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2387272
Reviewed-by: automaticguardword <automaticguardword@nvidia.com>
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: Aayush Rajoria <arajoria@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/common')
-rw-r--r-- | drivers/gpu/nvgpu/common/mm/gmmu.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/gpu/nvgpu/common/mm/gmmu.c b/drivers/gpu/nvgpu/common/mm/gmmu.c index ee160ae2..748e9f45 100644 --- a/drivers/gpu/nvgpu/common/mm/gmmu.c +++ b/drivers/gpu/nvgpu/common/mm/gmmu.c | |||
@@ -620,7 +620,7 @@ static int __nvgpu_gmmu_update_page_table(struct vm_gk20a *vm, | |||
620 | "vm=%s " | 620 | "vm=%s " |
621 | "%-5s GPU virt %#-12llx +%#-9llx phys %#-12llx " | 621 | "%-5s GPU virt %#-12llx +%#-9llx phys %#-12llx " |
622 | "phys offset: %#-4llx; pgsz: %3dkb perm=%-2s | " | 622 | "phys offset: %#-4llx; pgsz: %3dkb perm=%-2s | " |
623 | "kind=%#02x APT=%-6s %c%c%c%c%c%c", | 623 | "kind=%#02x APT=%-6s %c%c%c%c%c", |
624 | vm->name, | 624 | vm->name, |
625 | (sgt != NULL) ? "MAP" : "UNMAP", | 625 | (sgt != NULL) ? "MAP" : "UNMAP", |
626 | virt_addr, | 626 | virt_addr, |
@@ -634,7 +634,6 @@ static int __nvgpu_gmmu_update_page_table(struct vm_gk20a *vm, | |||
634 | attrs->cacheable ? 'C' : '-', | 634 | attrs->cacheable ? 'C' : '-', |
635 | attrs->sparse ? 'S' : '-', | 635 | attrs->sparse ? 'S' : '-', |
636 | attrs->priv ? 'P' : '-', | 636 | attrs->priv ? 'P' : '-', |
637 | attrs->coherent ? 'I' : '-', | ||
638 | attrs->valid ? 'V' : '-', | 637 | attrs->valid ? 'V' : '-', |
639 | attrs->platform_atomic ? 'A' : '-'); | 638 | attrs->platform_atomic ? 'A' : '-'); |
640 | 639 | ||
@@ -693,7 +692,6 @@ u64 gk20a_locked_gmmu_map(struct vm_gk20a *vm, | |||
693 | .rw_flag = rw_flag, | 692 | .rw_flag = rw_flag, |
694 | .sparse = sparse, | 693 | .sparse = sparse, |
695 | .priv = priv, | 694 | .priv = priv, |
696 | .coherent = flags & NVGPU_VM_MAP_IO_COHERENT, | ||
697 | .valid = (flags & NVGPU_VM_MAP_UNMAPPED_PTE) == 0U, | 695 | .valid = (flags & NVGPU_VM_MAP_UNMAPPED_PTE) == 0U, |
698 | .aperture = aperture, | 696 | .aperture = aperture, |
699 | .platform_atomic = (flags & NVGPU_VM_MAP_PLATFORM_ATOMIC) != 0U | 697 | .platform_atomic = (flags & NVGPU_VM_MAP_PLATFORM_ATOMIC) != 0U |
@@ -711,14 +709,6 @@ u64 gk20a_locked_gmmu_map(struct vm_gk20a *vm, | |||
711 | attrs.l3_alloc = (bool)(flags & NVGPU_VM_MAP_L3_ALLOC); | 709 | attrs.l3_alloc = (bool)(flags & NVGPU_VM_MAP_L3_ALLOC); |
712 | 710 | ||
713 | /* | 711 | /* |
714 | * Handle the IO coherency aperture: make sure the .aperture field is | ||
715 | * correct based on the IO coherency flag. | ||
716 | */ | ||
717 | if (attrs.coherent && attrs.aperture == APERTURE_SYSMEM) { | ||
718 | attrs.aperture = APERTURE_SYSMEM_COH; | ||
719 | } | ||
720 | |||
721 | /* | ||
722 | * Only allocate a new GPU VA range if we haven't already been passed a | 712 | * Only allocate a new GPU VA range if we haven't already been passed a |
723 | * GPU VA range. This facilitates fixed mappings. | 713 | * GPU VA range. This facilitates fixed mappings. |
724 | */ | 714 | */ |
@@ -775,7 +765,6 @@ void gk20a_locked_gmmu_unmap(struct vm_gk20a *vm, | |||
775 | .rw_flag = rw_flag, | 765 | .rw_flag = rw_flag, |
776 | .sparse = sparse, | 766 | .sparse = sparse, |
777 | .priv = 0, | 767 | .priv = 0, |
778 | .coherent = 0, | ||
779 | .valid = 0, | 768 | .valid = 0, |
780 | .aperture = APERTURE_INVALID, | 769 | .aperture = APERTURE_INVALID, |
781 | }; | 770 | }; |