Skip to contentSkip to conversation

drm/amdgpu: correct GART location info

PATCH In review Junwei Zhang 2 participants 3 messages Jun 19, 2018 2 messages not in the archive

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

PATCH 1/1 drm/amdgpu: correct GART location info

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +7 -7
index f77b07b..f9fe8d3 100644
@@ -676,17 +676,17 @@ void amdgpu_device_vram_location(struct amdgpu_device *adev,
 }
 
 /**
- * amdgpu_device_gart_location - try to find GTT location
+ * amdgpu_device_gart_location - try to find GART location
  *
  * @adev: amdgpu device structure holding all necessary informations
  * @mc: memory controller structure holding memory informations
  *
- * Function will place try to place GTT before or after VRAM.
+ * Function will place try to place GART before or after VRAM.
  *
- * If GTT size is bigger than space left then we ajust GTT size.
+ * If GART size is bigger than space left then we ajust GART size.
  * Thus function will never fails.
  *
- * FIXME: when reducing GTT size align new size on power of 2.
+ * FIXME: when reducing GART size align new size on power of 2.
  */
 void amdgpu_device_gart_location(struct amdgpu_device *adev,
 				 struct amdgpu_gmc *mc)
@@ -699,13 +699,13 @@ void amdgpu_device_gart_location(struct amdgpu_device *adev,
 	size_bf = mc->vram_start;
 	if (size_bf > size_af) {
 		if (mc->gart_size > size_bf) {
-			dev_warn(adev->dev, "limiting GTT\n");
+			dev_warn(adev->dev, "limiting GART\n");
 			mc->gart_size = size_bf;
 		}
 		mc->gart_start = 0;
 	} else {
 		if (mc->gart_size > size_af) {
-			dev_warn(adev->dev, "limiting GTT\n");
+			dev_warn(adev->dev, "limiting GART\n");
 			mc->gart_size = size_af;
 		}
 		/* VCE doesn't like it when BOs cross a 4GB segment, so align
@@ -714,7 +714,7 @@ void amdgpu_device_gart_location(struct amdgpu_device *adev,
 		mc->gart_start = ALIGN(mc->vram_end + 1, 0x100000000ULL);
 	}
 	mc->gart_end = mc->gart_start + mc->gart_size - 1;
-	dev_info(adev->dev, "GTT: %lluM 0x%016llX - 0x%016llX\n",
+	dev_info(adev->dev, "GART: %lluM 0x%016llX - 0x%016llX\n",
 			mc->gart_size >> 20, mc->gart_start, mc->gart_end);
 }
 
Signature · 6 lines
1.9.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): 1529383295-10431-1-git-send-email-Jerry.Zhang-5C7GfCeVMHo@public.gmane.org

#2 lore raw

We need a commit message, something like "Avoid confusing the GART with the GTT domain.".

Am 19.06.2018 um 06:41 schrieb Junwei Zhang:

Quoted 18 lines
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 14 +++++++-------
  1 file changed, 7 insertions(+), 7 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1 -1
index f77b07b..f9fe8d3 100644
@@ -676,17 +676,17 @@ void amdgpu_device_vram_location(struct amdgpu_device *adev,
  }
 
  /**
- * amdgpu_device_gart_location - try to find GTT location
+ * amdgpu_device_gart_location - try to find GART location
   *
   * @adev: amdgpu device structure holding all necessary informations
   * @mc: memory controller structure holding memory informations

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c void amdgpu_device_vram_location(struct amdgpu_device *adev, · line 689

Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +3 -3
   *
- * Function will place try to place GTT before or after VRAM.
+ * Function will place try to place GART before or after VRAM.
   *
- * If GTT size is bigger than space left then we ajust GTT size.
+ * If GART size is bigger than space left then we ajust GART size.
   * Thus function will never fails.
   *
- * FIXME: when reducing GTT size align new size on power of 2.
+ * FIXME: when reducing GART size align new size on power of 2.

Please just drop this line. IIRC we actually don't align the gartsize parameter to power of two any more either.

With that fixed the patch is Reviewed-by: Christian König <[email protected]>.

Thanks,
Christian.

Quoted 20 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +2 -2
   */
  void amdgpu_device_gart_location(struct amdgpu_device *adev,
  				 struct amdgpu_gmc *mc)
@@ -699,13 +699,13 @@ void amdgpu_device_gart_location(struct amdgpu_device *adev,
  	size_bf = mc->vram_start;
  	if (size_bf > size_af) {
  		if (mc->gart_size > size_bf) {
-			dev_warn(adev->dev, "limiting GTT\n");
+			dev_warn(adev->dev, "limiting GART\n");
  			mc->gart_size = size_bf;
  		}
  		mc->gart_start = 0;
  	} else {
  		if (mc->gart_size > size_af) {
-			dev_warn(adev->dev, "limiting GTT\n");
+			dev_warn(adev->dev, "limiting GART\n");
  			mc->gart_size = size_af;
  		}
  		/* VCE doesn't like it when BOs cross a 4GB segment, so align

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c void amdgpu_device_gart_location(struct amdgpu_device *adev, · line 720

Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1 -1
@@ -714,7 +714,7 @@ void amdgpu_device_gart_location(struct amdgpu_device *adev,
  		mc->gart_start = ALIGN(mc->vram_end + 1, 0x100000000ULL);
  	}
  	mc->gart_end = mc->gart_start + mc->gart_size - 1;
-	dev_info(adev->dev, "GTT: %lluM 0x%016llX - 0x%016llX\n",
+	dev_info(adev->dev, "GART: %lluM 0x%016llX - 0x%016llX\n",
  			mc->gart_size >> 20, mc->gart_start, mc->gart_end);
  }
 

_______________________________________________
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): 476e59ac-1cba-d3ca-2670-6be0d8af4b82-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org

#4 lore raw
Quoted 2 lines · Christian König

We need a commit message, something like "Avoid confusing the GART with the GTT domain.".

Yeah, will add such kind of info.

Quoted 26 lines

Am 19.06.2018 um 06:41 schrieb Junwei Zhang:

Quoted 24 lines
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 14 +++++++-------
  1 file changed, 7 insertions(+), 7 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +2 -3
index f77b07b..f9fe8d3 100644
@@ -676,17 +676,17 @@ void amdgpu_device_vram_location(struct amdgpu_device
 *adev,
  }
  /**
- * amdgpu_device_gart_location - try to find GTT location
+ * amdgpu_device_gart_location - try to find GART location
   *
   * @adev: amdgpu device structure holding all necessary informations
   * @mc: memory controller structure holding memory informations
   *
- * Function will place try to place GTT before or after VRAM.
+ * Function will place try to place GART before or after VRAM.
   *
- * If GTT size is bigger than space left then we ajust GTT size.
Quoted 8 lines

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c void amdgpu_device_vram_location(struct amdgpu_device *adev, · line 689

Quoted 5 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +2 -1
+ * If GART size is bigger than space left then we ajust GART size.
   * Thus function will never fails.
   *
- * FIXME: when reducing GTT size align new size on power of 2.
+ * FIXME: when reducing GART size align new size on power of 2.

Please just drop this line. IIRC we actually don't align the gartsize parameter to power of two any more either.

Got it.
Thanks.

Jerry

Quoted 27 lines

With that fixed the patch is Reviewed-by: Christian König <[email protected]>.

Thanks,
Christian.

Quoted 20 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +2 -2
   */
  void amdgpu_device_gart_location(struct amdgpu_device *adev,
                   struct amdgpu_gmc *mc)
@@ -699,13 +699,13 @@ void amdgpu_device_gart_location(struct amdgpu_device
 *adev,
      size_bf = mc->vram_start;
      if (size_bf > size_af) {
          if (mc->gart_size > size_bf) {
-            dev_warn(adev->dev, "limiting GTT\n");
+            dev_warn(adev->dev, "limiting GART\n");
              mc->gart_size = size_bf;
          }
          mc->gart_start = 0;
      } else {
          if (mc->gart_size > size_af) {
-            dev_warn(adev->dev, "limiting GTT\n");
+            dev_warn(adev->dev, "limiting GART\n");
              mc->gart_size = size_af;
          }
          /* VCE doesn't like it when BOs cross a 4GB segment, so align
Quoted 9 lines

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c void amdgpu_device_gart_location(struct amdgpu_device *adev, · line 719

Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1 -1
@@ -714,7 +714,7 @@ void amdgpu_device_gart_location(struct amdgpu_device *adev,
          mc->gart_start = ALIGN(mc->vram_end + 1, 0x100000000ULL);
      }
      mc->gart_end = mc->gart_start + mc->gart_size - 1;
-    dev_info(adev->dev, "GTT: %lluM 0x%016llX - 0x%016llX\n",
+    dev_info(adev->dev, "GART: %lluM 0x%016llX - 0x%016llX\n",
              mc->gart_size >> 20, mc->gart_start, mc->gart_end);
  }

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