Skip to contentSkip to conversation

drm/vram-helper: fix function names in vram helper doc

PATCH Superseded Luc Ma 2 participants 3 messages Feb 28, 2023

Subsystems (2)
lore
Share & tools
lore

Luc Ma

author
#0 lore raw

PATCH v2 1/1 drm/vram-helper: fix function names in vram helper doc

Refer to drmm_vram_helper_init() instead of the non-existent drmm_vram_helper_alloc_mm().

Fixes a5f23a72355d ("drm/vram-helper: Managed vram helpers")

---
v1 -> v2: improved commit message and add changelog

 drivers/gpu/drm/drm_gem_vram_helper.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/drm_gem_vram_helper.c +3 -3
index d40b3edb52d0..f1539d4448c6 100644
@@ -45,7 +45,7 @@ static const struct drm_gem_object_funcs drm_gem_vram_object_funcs;
  * the frame's scanout buffer or the cursor image. If there's no more space
  * left in VRAM, inactive GEM objects can be moved to system memory.
  *
- * To initialize the VRAM helper library call drmm_vram_helper_alloc_mm().
+ * To initialize the VRAM helper library call drmm_vram_helper_init().
  * The function allocates and initializes an instance of &struct drm_vram_mm
  * in &struct drm_device.vram_mm . Use &DRM_GEM_VRAM_DRIVER to initialize
  * &struct drm_driver and  &DRM_VRAM_MM_FILE_OPERATIONS to initialize
@@ -73,7 +73,7 @@ static const struct drm_gem_object_funcs drm_gem_vram_object_funcs;
  *		// setup device, vram base and size
  *		// ...
  *
- *		ret = drmm_vram_helper_alloc_mm(dev, vram_base, vram_size);
+ *		ret = drmm_vram_helper_init(dev, vram_base, vram_size);
  *		if (ret)
  *			return ret;
  *		return 0;
@@ -86,7 +86,7 @@ static const struct drm_gem_object_funcs drm_gem_vram_object_funcs;
  * to userspace.
  *
  * You don't have to clean up the instance of VRAM MM.
- * drmm_vram_helper_alloc_mm() is a managed interface that installs a
+ * drmm_vram_helper_init() is a managed interface that installs a
  * clean-up handler to run during the DRM device's release.
  *
  * For drawing or scanout operations, rsp. buffer objects have to be pinned
Signature · 1 line
2.25.1
maintainer Reviewed-by on v2 1/1
#1 lore raw

Hi

Am 28.02.23 um 02:24 schrieb Luc Ma:

Quoted 5 lines

Refer to drmm_vram_helper_init() instead of the non-existent drmm_vram_helper_alloc_mm().

Fixes a5f23a72355d ("drm/vram-helper: Managed vram helpers")

I didn't notice before: your sender email address has to match the signed-off-by address. I can fix that when I commit the patch. Which email address shall I use?

Apart from that

Best regards
Thomas

Quoted 37 lines

---
v1 -> v2: improved commit message and add changelog

  drivers/gpu/drm/drm_gem_vram_helper.c | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/drm_gem_vram_helper.c +3 -3
index d40b3edb52d0..f1539d4448c6 100644
@@ -45,7 +45,7 @@ static const struct drm_gem_object_funcs drm_gem_vram_object_funcs;
   * the frame's scanout buffer or the cursor image. If there's no more space
   * left in VRAM, inactive GEM objects can be moved to system memory.
   *
- * To initialize the VRAM helper library call drmm_vram_helper_alloc_mm().
+ * To initialize the VRAM helper library call drmm_vram_helper_init().
   * The function allocates and initializes an instance of &struct drm_vram_mm
   * in &struct drm_device.vram_mm . Use &DRM_GEM_VRAM_DRIVER to initialize
   * &struct drm_driver and  &DRM_VRAM_MM_FILE_OPERATIONS to initialize
@@ -73,7 +73,7 @@ static const struct drm_gem_object_funcs drm_gem_vram_object_funcs;
   *		// setup device, vram base and size
   *		// ...
   *
- *		ret = drmm_vram_helper_alloc_mm(dev, vram_base, vram_size);
+ *		ret = drmm_vram_helper_init(dev, vram_base, vram_size);
   *		if (ret)
   *			return ret;
   *		return 0;
@@ -86,7 +86,7 @@ static const struct drm_gem_object_funcs drm_gem_vram_object_funcs;
   * to userspace.
   *
   * You don't have to clean up the instance of VRAM MM.
- * drmm_vram_helper_alloc_mm() is a managed interface that installs a
+ * drmm_vram_helper_init() is a managed interface that installs a
   * clean-up handler to run during the DRM device's release.
   *
   * For drawing or scanout operations, rsp. buffer objects have to be pinned
Signature · 6 lines
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Ivo Totev
author
#2 lore raw
Quoted 7 lines · Thomas Zimmermann

Hi

Am 28.02.23 um 02:24 schrieb Luc Ma:

Quoted 3 lines

Refer to drmm_vram_helper_init() instead of the non-existent drmm_vram_helper_alloc_mm().

Quoted 6 lines
Quoted 2 lines
Fixes a5f23a72355d ("drm/vram-helper: Managed vram helpers")

I didn't notice before: your sender email address has to match the signed-off-by address. I can fix that when I commit the patch. Which email address shall I use?

Hi, Thomas
please use Luc Ma <[email protected]>, thank you

Quoted 53 lines

Apart from that

Best regards
Thomas

Quoted 29 lines

---
v1 -> v2: improved commit message and add changelog

  drivers/gpu/drm/drm_gem_vram_helper.c | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/drm_gem_vram_helper.c +2 -2
index d40b3edb52d0..f1539d4448c6 100644
@@ -45,7 +45,7 @@ static const struct drm_gem_object_funcs drm_gem_vram_object_funcs;
   * the frame's scanout buffer or the cursor image. If there's no more space
   * left in VRAM, inactive GEM objects can be moved to system memory.
   *
- * To initialize the VRAM helper library call drmm_vram_helper_alloc_mm().
+ * To initialize the VRAM helper library call drmm_vram_helper_init().
   * The function allocates and initializes an instance of &struct drm_vram_mm
   * in &struct drm_device.vram_mm . Use &DRM_GEM_VRAM_DRIVER to initialize
   * &struct drm_driver and  &DRM_VRAM_MM_FILE_OPERATIONS to initialize
@@ -73,7 +73,7 @@ static const struct drm_gem_object_funcs drm_gem_vram_object_funcs;
   *          // setup device, vram base and size
   *          // ...
   *
- *           ret = drmm_vram_helper_alloc_mm(dev, vram_base, vram_size);
+ *           ret = drmm_vram_helper_init(dev, vram_base, vram_size);
   *          if (ret)
   *                  return ret;
   *          return 0;

drivers/gpu/drm/drm_gem_vram_helper.c static const struct drm_gem_object_funcs drm_gem_vram_object_funcs; · line 92

Quoted 8 lines
drivers/gpu/drm/drm_gem_vram_helper.c +1 -1
@@ -86,7 +86,7 @@ static const struct drm_gem_object_funcs drm_gem_vram_object_funcs;
   * to userspace.
   *
   * You don't have to clean up the instance of VRAM MM.
- * drmm_vram_helper_alloc_mm() is a managed interface that installs a
+ * drmm_vram_helper_init() is a managed interface that installs a
   * clean-up handler to run during the DRM device's release.
   *
   * For drawing or scanout operations, rsp. buffer objects have to be pinned

--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Ivo Totev