Skip to contentSkip to conversation

drm/amdgpu: set adev->num_vmhubs for gmc6,7,8

PATCH In review Alex Deucher 3 participants 3 messages Aug 23, 2019 – Aug 24, 2019 2 messages not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdgpu: set adev->num_vmhubs for gmc6,7,8

So that we properly handle them on older asics.

Fixes 3ff985485b29 ("drm/amdgpu: Export function to flush TLB of specific vm hub")
---
 drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 2 ++
 drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c | 2 ++
 drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 2 ++
 3 files changed, 6 insertions(+)
drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c +2 -0
index 564fb1ce292f..3264548e375c 100644
@@ -839,6 +839,8 @@ static int gmc_v6_0_sw_init(void *handle)
 	int dma_bits;
 	struct amdgpu_device *adev = (struct amdgpu_device *)handle;
 
+	adev->num_vmhubs = 1;
+
 	if (adev->flags & AMD_IS_APU) {
 		adev->gmc.vram_type = AMDGPU_VRAM_TYPE_UNKNOWN;
 	} else {
drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c +2 -0
index 9e6a23304fd7..cc0aa178eb2d 100644
@@ -959,6 +959,8 @@ static int gmc_v7_0_sw_init(void *handle)
 	int dma_bits;
 	struct amdgpu_device *adev = (struct amdgpu_device *)handle;
 
+	adev->num_vmhubs = 1;
+
 	if (adev->flags & AMD_IS_APU) {
 		adev->gmc.vram_type = AMDGPU_VRAM_TYPE_UNKNOWN;
 	} else {
drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c +2 -0
index f7d6a07ba4e1..88f3a171452f 100644
@@ -1079,6 +1079,8 @@ static int gmc_v8_0_sw_init(void *handle)
 	int dma_bits;
 	struct amdgpu_device *adev = (struct amdgpu_device *)handle;
 
+	adev->num_vmhubs = 1;
+
 	if (adev->flags & AMD_IS_APU) {
 		adev->gmc.vram_type = AMDGPU_VRAM_TYPE_UNKNOWN;
 	} else {
Signature · 6 lines
2.20.1

_______________________________________________
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): 20190823144514.21354-1-alexander.deucher-5C7GfCeVMHo@public.gmane.org

Reviewed-by Xiaojie Yuan
#2 lore raw

BR,
Xiaojie

Quoted 58 lines · Alex Deucher

So that we properly handle them on older asics.

Fixes 3ff985485b29 ("drm/amdgpu: Export function to flush TLB of specific vm hub")

---

drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 2 ++
drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c | 2 ++
drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 2 ++
3 files changed, 6 insertions(+)
drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c +2 -0
index 564fb1ce292f..3264548e375c 100644
@@ -839,6 +839,8 @@ static int gmc_v6_0_sw_init(void *handle)
   int dma_bits;
   struct amdgpu_device *adev = (struct amdgpu_device *)handle;
 
+    adev->num_vmhubs = 1;
+
   if (adev->flags & AMD_IS_APU) {
       adev->gmc.vram_type = AMDGPU_VRAM_TYPE_UNKNOWN;
   } else {
drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c +2 -0
index 9e6a23304fd7..cc0aa178eb2d 100644
@@ -959,6 +959,8 @@ static int gmc_v7_0_sw_init(void *handle)
   int dma_bits;
   struct amdgpu_device *adev = (struct amdgpu_device *)handle;
 
+    adev->num_vmhubs = 1;
+
   if (adev->flags & AMD_IS_APU) {
       adev->gmc.vram_type = AMDGPU_VRAM_TYPE_UNKNOWN;
   } else {
drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c +2 -0
index f7d6a07ba4e1..88f3a171452f 100644
@@ -1079,6 +1079,8 @@ static int gmc_v8_0_sw_init(void *handle)
   int dma_bits;
   struct amdgpu_device *adev = (struct amdgpu_device *)handle;
 
+    adev->num_vmhubs = 1;
+
   if (adev->flags & AMD_IS_APU) {
       adev->gmc.vram_type = AMDGPU_VRAM_TYPE_UNKNOWN;
   } else {
Signature · 6 lines
2.20.1

_______________________________________________
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

A message that is not in the archive (sent off-list or not yet received): B8D97B9E-4D80-41C9-A10F-0F65F2DBE391-5C7GfCeVMHo@public.gmane.org

Reviewed-by
#4 lore raw

Am 23.08.19 um 17:21 schrieb Yuan, Xiaojie:

Quoted 59 lines

BR,
Xiaojie

Quoted 54 lines · Alex Deucher

So that we properly handle them on older asics.

Fixes 3ff985485b29 ("drm/amdgpu: Export function to flush TLB of specific vm hub")

---

drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 2 ++
drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c | 2 ++
drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 2 ++
3 files changed, 6 insertions(+)
drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c +2 -0
index 564fb1ce292f..3264548e375c 100644
@@ -839,6 +839,8 @@ static int gmc_v6_0_sw_init(void *handle)
    int dma_bits;
    struct amdgpu_device *adev = (struct amdgpu_device *)handle;
 
+    adev->num_vmhubs = 1;
+
    if (adev->flags & AMD_IS_APU) {
        adev->gmc.vram_type = AMDGPU_VRAM_TYPE_UNKNOWN;
    } else {
drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c +2 -0
index 9e6a23304fd7..cc0aa178eb2d 100644
@@ -959,6 +959,8 @@ static int gmc_v7_0_sw_init(void *handle)
    int dma_bits;
    struct amdgpu_device *adev = (struct amdgpu_device *)handle;
 
+    adev->num_vmhubs = 1;
+
    if (adev->flags & AMD_IS_APU) {
        adev->gmc.vram_type = AMDGPU_VRAM_TYPE_UNKNOWN;
    } else {
drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c +2 -0
index f7d6a07ba4e1..88f3a171452f 100644
@@ -1079,6 +1079,8 @@ static int gmc_v8_0_sw_init(void *handle)
    int dma_bits;
    struct amdgpu_device *adev = (struct amdgpu_device *)handle;
 
+    adev->num_vmhubs = 1;
+
    if (adev->flags & AMD_IS_APU) {
        adev->gmc.vram_type = AMDGPU_VRAM_TYPE_UNKNOWN;
    } else {
Signature · 1 line
2.20.1
Quoted 8 lines
Quoted 4 lines

_______________________________________________
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

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx