drm/prime: Fix documentation of drm_gem_prime_fd_to_handle()

Message ID 20230224120931.1024-1-petrtesarik@huaweicloud.com
State New
Headers
Series drm/prime: Fix documentation of drm_gem_prime_fd_to_handle() |

Commit Message

Petr Tesarik Feb. 24, 2023, 12:09 p.m. UTC
  From: Petr Tesarik <petr.tesarik.ext@huawei.com>

The DRM device passed to drm_gem_prime_fd_to_handle() is where the
dma-buf is being imported, not the device where it was exported.

Also fix a trivial typo in drm_gem_prime_import_dev().

Signed-off-by: Petr Tesarik <petr.tesarik.ext@huawei.com>
---
 drivers/gpu/drm/drm_prime.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
  

Comments

Simon Ser Feb. 25, 2023, 11:08 a.m. UTC | #1
Reviewed-by: Simon Ser <contact@emersion.fr>
  
Petr Tesarik March 20, 2023, 10:59 a.m. UTC | #2
On 2/25/2023 12:08 PM, Simon Ser wrote:
> Reviewed-by: Simon Ser <contact@emersion.fr>

Hi Simon,

so how about taking this one? I can't see it in git yet (but maybe I'm looking at the wrong branch).

Petr T
  
Simon Ser March 20, 2023, 11:10 a.m. UTC | #3
Pushed to drm-misc-next, thanks!
  

Patch

diff --git a/drivers/gpu/drm/drm_prime.c b/drivers/gpu/drm/drm_prime.c
index f924b8b4ab6b..149cd4ff6a3b 100644
--- a/drivers/gpu/drm/drm_prime.c
+++ b/drivers/gpu/drm/drm_prime.c
@@ -285,7 +285,7 @@  EXPORT_SYMBOL(drm_gem_dmabuf_release);
 
 /**
  * drm_gem_prime_fd_to_handle - PRIME import function for GEM drivers
- * @dev: dev to export the buffer from
+ * @dev: drm_device to import into
  * @file_priv: drm file-private structure
  * @prime_fd: fd id of the dma-buf which should be imported
  * @handle: pointer to storage for the handle of the imported buffer object
@@ -925,7 +925,7 @@  struct drm_gem_object *drm_gem_prime_import_dev(struct drm_device *dev,
 		obj = dma_buf->priv;
 		if (obj->dev == dev) {
 			/*
-			 * Importing dmabuf exported from out own gem increases
+			 * Importing dmabuf exported from our own gem increases
 			 * refcount on gem itself instead of f_count of dmabuf.
 			 */
 			drm_gem_object_get(obj);