@@ -278,7 +278,7 @@ void drm_gem_dmabuf_release(struct dma_buf *dma_buf)
278278}
279279EXPORT_SYMBOL (drm_gem_dmabuf_release );
280280
281- /*
281+ /**
282282 * drm_gem_prime_fd_to_handle - PRIME import function for GEM drivers
283283 * @dev: drm_device to import into
284284 * @file_priv: drm file-private structure
@@ -292,9 +292,9 @@ EXPORT_SYMBOL(drm_gem_dmabuf_release);
292292 *
293293 * Returns 0 on success or a negative error code on failure.
294294 */
295- static int drm_gem_prime_fd_to_handle (struct drm_device * dev ,
296- struct drm_file * file_priv , int prime_fd ,
297- uint32_t * handle )
295+ int drm_gem_prime_fd_to_handle (struct drm_device * dev ,
296+ struct drm_file * file_priv , int prime_fd ,
297+ uint32_t * handle )
298298{
299299 struct dma_buf * dma_buf ;
300300 struct drm_gem_object * obj ;
@@ -360,6 +360,7 @@ static int drm_gem_prime_fd_to_handle(struct drm_device *dev,
360360 dma_buf_put (dma_buf );
361361 return ret ;
362362}
363+ EXPORT_SYMBOL (drm_gem_prime_fd_to_handle );
363364
364365int drm_prime_fd_to_handle_ioctl (struct drm_device * dev , void * data ,
365366 struct drm_file * file_priv )
@@ -408,7 +409,7 @@ static struct dma_buf *export_and_register_object(struct drm_device *dev,
408409 return dmabuf ;
409410}
410411
411- /*
412+ /**
412413 * drm_gem_prime_handle_to_fd - PRIME export function for GEM drivers
413414 * @dev: dev to export the buffer from
414415 * @file_priv: drm file-private structure
@@ -421,10 +422,10 @@ static struct dma_buf *export_and_register_object(struct drm_device *dev,
421422 * The actual exporting from GEM object to a dma-buf is done through the
422423 * &drm_gem_object_funcs.export callback.
423424 */
424- static int drm_gem_prime_handle_to_fd (struct drm_device * dev ,
425- struct drm_file * file_priv , uint32_t handle ,
426- uint32_t flags ,
427- int * prime_fd )
425+ int drm_gem_prime_handle_to_fd (struct drm_device * dev ,
426+ struct drm_file * file_priv , uint32_t handle ,
427+ uint32_t flags ,
428+ int * prime_fd )
428429{
429430 struct drm_gem_object * obj ;
430431 int ret = 0 ;
@@ -506,6 +507,7 @@ static int drm_gem_prime_handle_to_fd(struct drm_device *dev,
506507
507508 return ret ;
508509}
510+ EXPORT_SYMBOL (drm_gem_prime_handle_to_fd );
509511
510512int drm_prime_handle_to_fd_ioctl (struct drm_device * dev , void * data ,
511513 struct drm_file * file_priv )
@@ -864,9 +866,9 @@ EXPORT_SYMBOL(drm_prime_get_contiguous_size);
864866 * @obj: GEM object to export
865867 * @flags: flags like DRM_CLOEXEC and DRM_RDWR
866868 *
867- * This is the implementation of the &drm_gem_object_funcs.export functions
868- * for GEM drivers using the PRIME helpers. It is used as the default for
869- * drivers that do not set their own .
869+ * This is the implementation of the &drm_gem_object_funcs.export functions for GEM drivers
870+ * using the PRIME helpers. It is used as the default in
871+ * drm_gem_prime_handle_to_fd() .
870872 */
871873struct dma_buf * drm_gem_prime_export (struct drm_gem_object * obj ,
872874 int flags )
@@ -962,9 +964,10 @@ EXPORT_SYMBOL(drm_gem_prime_import_dev);
962964 * @dev: drm_device to import into
963965 * @dma_buf: dma-buf object to import
964966 *
965- * This is the implementation of the gem_prime_import functions for GEM
966- * drivers using the PRIME helpers. It is the default for drivers that do
967- * not set their own &drm_driver.gem_prime_import.
967+ * This is the implementation of the gem_prime_import functions for GEM drivers
968+ * using the PRIME helpers. Drivers can use this as their
969+ * &drm_driver.gem_prime_import implementation. It is used as the default
970+ * implementation in drm_gem_prime_fd_to_handle().
968971 *
969972 * Drivers must arrange to call drm_prime_gem_destroy() from their
970973 * &drm_gem_object_funcs.free hook when using this function.
0 commit comments