Skip to contentSkip to conversation

drm/amdgpu: Fix comments in source code

PATCH In review Alex Xie 3 participants 3 messages May 9, 2017 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

Alex Xie

author
#0 lore raw

PATCH 1/1 drm/amdgpu: Fix comments in source code

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +4 -4
index 2704f88..480f3cd 100644
@@ -479,7 +479,7 @@ void amdgpu_doorbell_get_kfd_info(struct amdgpu_device *adev,
 
 /*
  * amdgpu_wb_*()
- * Writeback is the method by which GPU updates special pages in memory
+ * Writeback is the method by which the GPU updates special pages in memory
  * with the status of certain GPU events (fences, ring pointers,etc.).
  */
 
@@ -506,7 +506,7 @@ static void amdgpu_wb_fini(struct amdgpu_device *adev)
  *
  * @adev: amdgpu_device pointer
  *
- * Initialize writeback and allocates writeback memory (all asics).
+ * Initializes writeback and allocates writeback memory (all asics).
  * Used at driver startup.
  * Returns 0 on success or an -error on failure.
  */
@@ -614,7 +614,7 @@ void amdgpu_wb_free_64bit(struct amdgpu_device *adev, u32 wb)
  * @mc: memory controller structure holding memory informations
  * @base: base address at which to put VRAM
  *
- * Function will place try to place VRAM at base address provided
+ * Function will try to place VRAM at base address provided
  * as parameter (which is so far either PCI aperture address or
  * for IGP TOM base address).
  *
@@ -636,7 +636,7 @@ void amdgpu_wb_free_64bit(struct amdgpu_device *adev, u32 wb)
  * ones)
  *
  * Note: IGP TOM addr should be the same as the aperture addr, we don't
- * explicitly check for that thought.
+ * explicitly check for that though.
  *
  * FIXME: when reducing VRAM size align new size on power of 2.
  */
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): 1494293189-5912-1-git-send-email-AlexBin.Xie-5C7GfCeVMHo@public.gmane.org

Reviewed-by
#2 lore raw
Quoted 38 lines · Alex Xie
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +3 -3
index 2704f88..480f3cd 100644
@@ -479,7 +479,7 @@ void amdgpu_doorbell_get_kfd_info(struct amdgpu_device *adev,
 
 /*
  * amdgpu_wb_*()
- * Writeback is the method by which GPU updates special pages in memory
+ * Writeback is the method by which the GPU updates special pages in memory
  * with the status of certain GPU events (fences, ring pointers,etc.).
  */
 
@@ -506,7 +506,7 @@ static void amdgpu_wb_fini(struct amdgpu_device *adev)
  *
  * @adev: amdgpu_device pointer
  *
- * Initialize writeback and allocates writeback memory (all asics).
+ * Initializes writeback and allocates writeback memory (all asics).
  * Used at driver startup.
  * Returns 0 on success or an -error on failure.
  */
@@ -614,7 +614,7 @@ void amdgpu_wb_free_64bit(struct amdgpu_device *adev, u32 wb)
  * @mc: memory controller structure holding memory informations
  * @base: base address at which to put VRAM
  *
- * Function will place try to place VRAM at base address provided
+ * Function will try to place VRAM at base address provided
  * as parameter (which is so far either PCI aperture address or
  * for IGP TOM base address).
  *

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c void amdgpu_wb_free_64bit(struct amdgpu_device *adev, u32 wb) · line 642

Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1 -1
@@ -636,7 +636,7 @@ void amdgpu_wb_free_64bit(struct amdgpu_device *adev, u32 wb)
  * ones)
  *
  * Note: IGP TOM addr should be the same as the aperture addr, we don't
- * explicitly check for that thought.
+ * explicitly check for that though.
  *
  * FIXME: when reducing VRAM size align new size on power of 2.
  */
Signature · 6 lines
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
#3 lore raw
In reply to a message not in the archive

Am 09.05.2017 um 03:26 schrieb Alex Xie:

Quoted 10 lines
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 8 ++++----
  1 file changed, 4 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0 -0
index 2704f88..480f3cd 100644

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

Quoted 7 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1 -1
@@ -479,7 +479,7 @@ void amdgpu_doorbell_get_kfd_info(struct amdgpu_device *adev,
 
  /*
   * amdgpu_wb_*()
- * Writeback is the method by which GPU updates special pages in memory
+ * Writeback is the method by which the GPU updates special pages in memory
   * with the status of certain GPU events (fences, ring pointers,etc.).
   */

Actually that comment as well as the name "writeback" is a bit outdated.

IIRC we also use the 32bit and 64bit addresses allocated with amdgpu_wb_get for the wptr polling addresses.

In other words the GPU polls from the address and the CPU writes to them.

I wouldn't change the name, but noting that in the comment might be a good idea.

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

Regards,
Christian.

Quoted 20 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +2 -2
@@ -506,7 +506,7 @@ static void amdgpu_wb_fini(struct amdgpu_device *adev)
   *
   * @adev: amdgpu_device pointer
   *
- * Initialize writeback and allocates writeback memory (all asics).
+ * Initializes writeback and allocates writeback memory (all asics).
   * Used at driver startup.
   * Returns 0 on success or an -error on failure.
   */
@@ -614,7 +614,7 @@ void amdgpu_wb_free_64bit(struct amdgpu_device *adev, u32 wb)
   * @mc: memory controller structure holding memory informations
   * @base: base address at which to put VRAM
   *
- * Function will place try to place VRAM at base address provided
+ * Function will try to place VRAM at base address provided
   * as parameter (which is so far either PCI aperture address or
   * for IGP TOM base address).
   *

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c void amdgpu_wb_free_64bit(struct amdgpu_device *adev, u32 wb) · line 642

Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1 -1
@@ -636,7 +636,7 @@ void amdgpu_wb_free_64bit(struct amdgpu_device *adev, u32 wb)
   * ones)
   *
   * Note: IGP TOM addr should be the same as the aperture addr, we don't
- * explicitly check for that thought.
+ * explicitly check for that though.
   *
   * FIXME: when reducing VRAM size align new size on power of 2.
   */

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