drm/amdgpu: Set the default value about gds vmid0 size
Subsystems (2)
PATCH v3 1/1 drm/amdgpu: Set the default value about gds vmid0 size
For sriov, when first run windows guest, then run linux guest, the gds vmid0 size will be reset to 0 by windows guest. So if the value has been reset to 0, then set the value to the default value in linux guest.
v2:
Fixed value instead of reading mmGDS_VMID0_SIZE.
--- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +14 -1
@@ -4875,7 +4875,20 @@ static void gfx_v9_0_set_rlc_funcs(struct amdgpu_device *adev)static void gfx_v9_0_set_gds_init (struct amdgpu_device *adev) {/* init asci gds info */ - adev->gds.mem.total_size =RREG32_SOC15 (GC ,0 , mmGDS_VMID0_SIZE); +switch (adev->asic_type) { +case CHIP_VEGA10 : +case CHIP_VEGA12 : +case CHIP_VEGA20 : + adev->gds.mem.total_size =0x10000 ; +break ; +case CHIP_RAVEN : + adev->gds.mem.total_size =0x1000 ; +break ; +default : + adev->gds.mem.total_size =0x10000 ; +break ; + } + adev->gds.gws.total_size =64 ; adev->gds.oa.total_size =16 ;
Signature · 6 lines
2.7.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 1539338914-24905-1-git-send-email-Emily.Deng-5C7GfCeVMHo@public.gmane.org
Zhang, Jerry(Junwei)
Reviewed-by Junwei ZhangQuoted 8 lines · Emily Deng
For sriov, when first run windows guest, then run linux guest, the gds vmid0 size will be reset to 0 by windows guest. So if the value has been reset to 0, then set the value to the default value in linux guest.
v2:
Fixed value instead of readingmmGDS_VMID0_SIZE.Signed-off-by Emily Deng <[email protected]>
Quoted 20 lines
--- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +7
-1@@ -4875,7 +4875,20 @@ static void gfx_v9_0_set_rlc_funcs(struct amdgpu_device *adev)static void gfx_v9_0_set_gds_init (struct amdgpu_device *adev) {/* init asci gds info */ - adev->gds.mem.total_size =RREG32_SOC15 (GC ,0 , mmGDS_VMID0_SIZE); +switch (adev->asic_type) { +case CHIP_VEGA10 : +case CHIP_VEGA12 : +case CHIP_VEGA20 : + adev->gds.mem.total_size =0x10000 ; +break ; +case CHIP_RAVEN :
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c static void gfx_v9_0_set_rlc_funcs(struct amdgpu_device *adev) · line 4894
Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +7
-0+ adev->gds.mem.total_size =0x1000 ; +break ; +default : + adev->gds.mem.total_size =0x10000 ; +break ; + } + adev->gds.gws.total_size =64 ; adev->gds.oa.total_size =16 ;
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 5b121093-f729-bff1-aef3-ce4e924a0b59-5C7GfCeVMHo@public.gmane.org
Christian König
Reviewed-byAm 12.10.2018 um 12:11 schrieb Zhang, Jerry(Junwei):
Quoted 10 lines · Emily Deng
Quoted 8 lines
For sriov, when first run windows guest, then run linux guest, the gds vmid0 size will be reset to 0 by windows guest. So if the value has been reset to 0, then set the value to the default value in linux guest.
v2:
Fixed value instead of readingmmGDS_VMID0_SIZE.Signed-off-by Emily Deng <[email protected]>Reviewed-by Junwei Zhang <[email protected]>
Quoted 27 lines
Quoted 27 lines
---
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c| 15 ++++++++++++++-1 file changed, 14 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +13
-1@@ -4875,7 +4875,20 @@ static void gfx_v9_0_set_rlc_funcs(struct amdgpu_device *adev) static void gfx_v9_0_set_gds_init(struct amdgpu_device *adev) { /* init asci gds info */ - adev->gds.mem.total_size = RREG32_SOC15(GC, 0, mmGDS_VMID0_SIZE); + switch (adev->asic_type) { + case CHIP_VEGA10: + case CHIP_VEGA12: + case CHIP_VEGA20: + adev->gds.mem.total_size = 0x10000; + break; + case CHIP_RAVEN: + adev->gds.mem.total_size = 0x1000; + break; + default: + adev->gds.mem.total_size = 0x10000; + break; + }
Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c static void gfx_v9_0_set_rlc_funcs(struct amdgpu_device *adev) · line 4893
Quoted 3 lines
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +1
-0+ adev->gds.gws.total_size = 64; adev->gds.oa.total_size = 16;_______________________________________________
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