drm/amdgpu: setup the shared and private apertures on gfx9
Subsystems (2)
PATCH 1/1 drm/amdgpu: setup the shared and private apertures on gfx9
Same as previous asics. This was not yet set for gfx9.
--- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 17 ++++++++++++----- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 8 ++++++++ 2 files changed, 20 insertions(+), 5 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +12 -5
@@ -1529,11 +1529,18 @@ static void gfx_v9_0_gpu_init(struct amdgpu_device *adev)for (i =0 ; i <16 ; i++) {soc15_grbm_select (adev,0 ,0 ,0 , i);/* CP and shaders */ - tmp =0 ; - tmp =REG_SET_FIELD (tmp,SH_MEM_CONFIG ,ALIGNMENT_MODE , -SH_MEM_ALIGNMENT_MODE_UNALIGNED ); -WREG32_SOC15 (GC ,0 , mmSH_MEM_CONFIG, tmp); -WREG32_SOC15 (GC ,0 , mmSH_MEM_BASES,0 ); +if (i ==0 ) { + tmp =REG_SET_FIELD (0 ,SH_MEM_CONFIG ,ALIGNMENT_MODE , +SH_MEM_ALIGNMENT_MODE_UNALIGNED ); +WREG32_SOC15 (GC ,0 , mmSH_MEM_CONFIG, tmp); +WREG32_SOC15 (GC ,0 , mmSH_MEM_BASES,0 ); + }else { + tmp =REG_SET_FIELD (0 ,SH_MEM_CONFIG ,ALIGNMENT_MODE , +SH_MEM_ALIGNMENT_MODE_UNALIGNED ); +WREG32_SOC15 (GC ,0 , mmSH_MEM_CONFIG, tmp); + tmp = adev->mc.shared_aperture_start >>48 ; +WREG32_SOC15 (GC ,0 , mmSH_MEM_BASES, tmp); + } }soc15_grbm_select (adev,0 ,0 ,0 ,0 );
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +8 -0
@@ -497,6 +497,14 @@ static int gmc_v9_0_early_init(void *handle)gmc_v9_0_set_gart_funcs (adev);gmc_v9_0_set_irq_funcs (adev); + adev->mc.shared_aperture_start =0x2000000000000000ULL ; + adev->mc.shared_aperture_end = + adev->mc.shared_aperture_start + (4ULL <<30 ) -1 ; + adev->mc.private_aperture_start = + adev->mc.shared_aperture_end +1 ; + adev->mc.private_aperture_end = + adev->mc.private_aperture_start + (4ULL <<30 ) -1 ; +return 0 ; }
Signature · 6 lines
2.13.6 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Quoted 1 line · Alex Deucher
Same as previous asics. This was not yet set for gfx9.
Ping?
Quoted 55 lines
Signed-off-by Alex Deucher <[email protected]>--- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 17 ++++++++++++----- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 8 ++++++++ 2 files changed, 20 insertions(+), 5 deletions(-)drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +12
-5@@ -1529,11 +1529,18 @@ static void gfx_v9_0_gpu_init(struct amdgpu_device *adev)for (i =0 ; i <16 ; i++) {soc15_grbm_select (adev,0 ,0 ,0 , i);/* CP and shaders */ - tmp =0 ; - tmp =REG_SET_FIELD (tmp,SH_MEM_CONFIG ,ALIGNMENT_MODE , -SH_MEM_ALIGNMENT_MODE_UNALIGNED ); -WREG32_SOC15 (GC ,0 , mmSH_MEM_CONFIG, tmp); -WREG32_SOC15 (GC ,0 , mmSH_MEM_BASES,0 ); +if (i ==0 ) { + tmp =REG_SET_FIELD (0 ,SH_MEM_CONFIG ,ALIGNMENT_MODE , +SH_MEM_ALIGNMENT_MODE_UNALIGNED ); +WREG32_SOC15 (GC ,0 , mmSH_MEM_CONFIG, tmp); +WREG32_SOC15 (GC ,0 , mmSH_MEM_BASES,0 ); + }else { + tmp =REG_SET_FIELD (0 ,SH_MEM_CONFIG ,ALIGNMENT_MODE , +SH_MEM_ALIGNMENT_MODE_UNALIGNED ); +WREG32_SOC15 (GC ,0 , mmSH_MEM_CONFIG, tmp); + tmp = adev->mc.shared_aperture_start >>48 ; +WREG32_SOC15 (GC ,0 , mmSH_MEM_BASES, tmp); + } }soc15_grbm_select (adev,0 ,0 ,0 ,0 );drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +8
-1@@ -497,6 +497,14 @@ static int gmc_v9_0_early_init(void *handle)gmc_v9_0_set_gart_funcs (adev);gmc_v9_0_set_irq_funcs (adev); + adev->mc.shared_aperture_start =0x2000000000000000ULL ; + adev->mc.shared_aperture_end = + adev->mc.shared_aperture_start + (4ULL <<30 ) -1 ; + adev->mc.private_aperture_start = + adev->mc.shared_aperture_end +1 ; + adev->mc.private_aperture_end = + adev->mc.private_aperture_start + (4ULL <<30 ) -1 ; +return 0 ; } --
Quoted 2 lines
2.13.6
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Christian König
Acked-byAm 14.12.2017 um 16:25 schrieb Alex Deucher:
Quoted 3 lines · Alex Deucher
Quoted 1 line
Same as previous asics. This was not yet set for gfx9.
Ping?
Quoted 54 lines
Quoted 54 lines
Signed-off-by Alex Deucher <[email protected]>--- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 17 ++++++++++++----- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 8 ++++++++ 2 files changed, 20 insertions(+), 5 deletions(-)drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +12
-5@@ -1529,11 +1529,18 @@ static void gfx_v9_0_gpu_init(struct amdgpu_device *adev)for (i =0 ; i <16 ; i++) {soc15_grbm_select (adev,0 ,0 ,0 , i);/* CP and shaders */ - tmp =0 ; - tmp =REG_SET_FIELD (tmp,SH_MEM_CONFIG ,ALIGNMENT_MODE , -SH_MEM_ALIGNMENT_MODE_UNALIGNED ); -WREG32_SOC15 (GC ,0 , mmSH_MEM_CONFIG, tmp); -WREG32_SOC15 (GC ,0 , mmSH_MEM_BASES,0 ); +if (i ==0 ) { + tmp =REG_SET_FIELD (0 ,SH_MEM_CONFIG ,ALIGNMENT_MODE , +SH_MEM_ALIGNMENT_MODE_UNALIGNED ); +WREG32_SOC15 (GC ,0 , mmSH_MEM_CONFIG, tmp); +WREG32_SOC15 (GC ,0 , mmSH_MEM_BASES,0 ); + }else { + tmp =REG_SET_FIELD (0 ,SH_MEM_CONFIG ,ALIGNMENT_MODE , +SH_MEM_ALIGNMENT_MODE_UNALIGNED ); +WREG32_SOC15 (GC ,0 , mmSH_MEM_CONFIG, tmp); + tmp = adev->mc.shared_aperture_start >>48 ; +WREG32_SOC15 (GC ,0 , mmSH_MEM_BASES, tmp); + } }soc15_grbm_select (adev,0 ,0 ,0 ,0 );drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +8
-0@@ -497,6 +497,14 @@ static int gmc_v9_0_early_init(void *handle)gmc_v9_0_set_gart_funcs (adev);gmc_v9_0_set_irq_funcs (adev); + adev->mc.shared_aperture_start =0x2000000000000000ULL ; + adev->mc.shared_aperture_end = + adev->mc.shared_aperture_start + (4ULL <<30 ) -1 ; + adev->mc.private_aperture_start = + adev->mc.shared_aperture_end +1 ; + adev->mc.private_aperture_end = + adev->mc.private_aperture_start + (4ULL <<30 ) -1 ; +return 0 ; }
Quoted 7 lines
Quoted 3 lines
--
2.13.6_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Quoted 13 lines · Alex Deucher
Same as previous asics. This was not yet set for gfx9.
Signed-off-by Alex Deucher <[email protected]>--- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 17 ++++++++++++----- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 8 ++++++++ 2 files changed, 20 insertions(+), 5 deletions(-)drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +0
-0
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c static void gfx_v9_0_gpu_init(struct amdgpu_device *adev) · line 1529
Quoted 1 line
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +0
-0@@ -1529,11 +1529,18 @@ static void gfx_v9_0_gpu_init(struct amdgpu_device *adev)for (i =0 ; i <16 ; i++) {
On GFXv8 this loop uses adev->vm_manager.id_mgr[0].num_ids instead of hard-coded 16. No need for you to initialize the VMIDs used by KFD.
Regards,
Felix
Quoted 31 lines
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +12
-5soc15_grbm_select (adev,0 ,0 ,0 , i);/* CP and shaders */ - tmp =0 ; - tmp =REG_SET_FIELD (tmp,SH_MEM_CONFIG ,ALIGNMENT_MODE , -SH_MEM_ALIGNMENT_MODE_UNALIGNED ); -WREG32_SOC15 (GC ,0 , mmSH_MEM_CONFIG, tmp); -WREG32_SOC15 (GC ,0 , mmSH_MEM_BASES,0 ); +if (i ==0 ) { + tmp =REG_SET_FIELD (0 ,SH_MEM_CONFIG ,ALIGNMENT_MODE , +SH_MEM_ALIGNMENT_MODE_UNALIGNED ); +WREG32_SOC15 (GC ,0 , mmSH_MEM_CONFIG, tmp); +WREG32_SOC15 (GC ,0 , mmSH_MEM_BASES,0 ); + }else { + tmp =REG_SET_FIELD (0 ,SH_MEM_CONFIG ,ALIGNMENT_MODE , +SH_MEM_ALIGNMENT_MODE_UNALIGNED ); +WREG32_SOC15 (GC ,0 , mmSH_MEM_CONFIG, tmp); + tmp = adev->mc.shared_aperture_start >>48 ; +WREG32_SOC15 (GC ,0 , mmSH_MEM_BASES, tmp); + } }soc15_grbm_select (adev,0 ,0 ,0 ,0 );drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +1
-0@@ -497,6 +497,14 @@ static int gmc_v9_0_early_init(void *handle)gmc_v9_0_set_gart_funcs (adev);gmc_v9_0_set_irq_funcs (adev); + adev->mc.shared_aperture_start =0x2000000000000000ULL ;
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c static int gmc_v9_0_early_init(void *handle) · line 510
Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +7
-0+ adev->mc.shared_aperture_end = + adev->mc.shared_aperture_start + (4ULL <<30 ) -1 ; + adev->mc.private_aperture_start = + adev->mc.shared_aperture_end +1 ; + adev->mc.private_aperture_end = + adev->mc.private_aperture_start + (4ULL <<30 ) -1 ; +return 0 ; }
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx