aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4381-drm-amdgpu-Add-comments-to-gmc-structure.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4381-drm-amdgpu-Add-comments-to-gmc-structure.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4381-drm-amdgpu-Add-comments-to-gmc-structure.patch72
1 files changed, 72 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4381-drm-amdgpu-Add-comments-to-gmc-structure.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4381-drm-amdgpu-Add-comments-to-gmc-structure.patch
new file mode 100644
index 00000000..ac2d0272
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4381-drm-amdgpu-Add-comments-to-gmc-structure.patch
@@ -0,0 +1,72 @@
+From e8aa9bdf6b3194b24b75fda36504eb93c82f0f0c Mon Sep 17 00:00:00 2001
+From: Oak Zeng <Oak.Zeng@amd.com>
+Date: Wed, 6 Nov 2019 11:18:54 -0600
+Subject: [PATCH 4381/4736] drm/amdgpu: Add comments to gmc structure
+
+Explain fields like aper_base, agp_start etc. The definition
+of those fields are confusing as they are from different view
+(CPU or GPU). Add comments for easier understand.
+
+Change-Id: I02c2a27cd0dbc205498eb86aafa722f2e0c25fe6
+Signed-off-by: Oak Zeng <Oak.Zeng@amd.com>
+Reviewed-by: Alex Deucher <Alex.Deucher@amd.com>
+---
+ drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h | 30 +++++++++++++++++++++++++
+ 1 file changed, 30 insertions(+)
+
+diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h
+index f9d62e80a64e..02bbb571756a 100644
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h
+@@ -127,18 +127,48 @@ struct amdgpu_xgmi {
+ };
+
+ struct amdgpu_gmc {
++ /* FB's physical address in MMIO space (for CPU to
++ * map FB). This is different compared to the agp/
++ * gart/vram_start/end field as the later is from
++ * GPU's view and aper_base is from CPU's view.
++ */
+ resource_size_t aper_size;
+ resource_size_t aper_base;
+ /* for some chips with <= 32MB we need to lie
+ * about vram size near mc fb location */
+ u64 mc_vram_size;
+ u64 visible_vram_size;
++ /* AGP aperture start and end in MC address space
++ * Driver find a hole in the MC address space
++ * to place AGP by setting MC_VM_AGP_BOT/TOP registers
++ * Under VMID0, logical address == MC address. AGP
++ * aperture maps to physical bus or IOVA addressed.
++ * AGP aperture is used to simulate FB in ZFB case.
++ * AGP aperture is also used for page table in system
++ * memory (mainly for APU).
++ *
++ */
+ u64 agp_size;
+ u64 agp_start;
+ u64 agp_end;
++ /* GART aperture start and end in MC address space
++ * Driver find a hole in the MC address space
++ * to place GART by setting VM_CONTEXT0_PAGE_TABLE_START/END_ADDR
++ * registers
++ * Under VMID0, logical address inside GART aperture will
++ * be translated through gpuvm gart page table to access
++ * paged system memory
++ */
+ u64 gart_size;
+ u64 gart_start;
+ u64 gart_end;
++ /* Frame buffer aperture of this GPU device. Different from
++ * fb_start (see below), this only covers the local GPU device.
++ * Driver get fb_start from MC_VM_FB_LOCATION_BASE (set by vbios)
++ * and calculate vram_start of this local device by adding an
++ * offset inside the XGMI hive.
++ * Under VMID0, logical address == MC address
++ */
+ u64 vram_start;
+ u64 vram_end;
+ /* FB region , it's same as local vram region in single GPU, in XGMI
+--
+2.17.1
+