@@ -278,7 +278,7 @@ void drm_gem_dmabuf_release(struct dma_buf *dma_buf)
278
278
}
279
279
EXPORT_SYMBOL (drm_gem_dmabuf_release );
280
280
281
- /*
281
+ /**
282
282
* drm_gem_prime_fd_to_handle - PRIME import function for GEM drivers
283
283
* @dev: drm_device to import into
284
284
* @file_priv: drm file-private structure
@@ -292,9 +292,9 @@ EXPORT_SYMBOL(drm_gem_dmabuf_release);
292
292
*
293
293
* Returns 0 on success or a negative error code on failure.
294
294
*/
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 )
298
298
{
299
299
struct dma_buf * dma_buf ;
300
300
struct drm_gem_object * obj ;
@@ -360,6 +360,7 @@ static int drm_gem_prime_fd_to_handle(struct drm_device *dev,
360
360
dma_buf_put (dma_buf );
361
361
return ret ;
362
362
}
363
+ EXPORT_SYMBOL (drm_gem_prime_fd_to_handle );
363
364
364
365
int drm_prime_fd_to_handle_ioctl (struct drm_device * dev , void * data ,
365
366
struct drm_file * file_priv )
@@ -408,7 +409,7 @@ static struct dma_buf *export_and_register_object(struct drm_device *dev,
408
409
return dmabuf ;
409
410
}
410
411
411
- /*
412
+ /**
412
413
* drm_gem_prime_handle_to_fd - PRIME export function for GEM drivers
413
414
* @dev: dev to export the buffer from
414
415
* @file_priv: drm file-private structure
@@ -421,10 +422,10 @@ static struct dma_buf *export_and_register_object(struct drm_device *dev,
421
422
* The actual exporting from GEM object to a dma-buf is done through the
422
423
* &drm_gem_object_funcs.export callback.
423
424
*/
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 )
428
429
{
429
430
struct drm_gem_object * obj ;
430
431
int ret = 0 ;
@@ -506,6 +507,7 @@ static int drm_gem_prime_handle_to_fd(struct drm_device *dev,
506
507
507
508
return ret ;
508
509
}
510
+ EXPORT_SYMBOL (drm_gem_prime_handle_to_fd );
509
511
510
512
int drm_prime_handle_to_fd_ioctl (struct drm_device * dev , void * data ,
511
513
struct drm_file * file_priv )
@@ -864,9 +866,9 @@ EXPORT_SYMBOL(drm_prime_get_contiguous_size);
864
866
* @obj: GEM object to export
865
867
* @flags: flags like DRM_CLOEXEC and DRM_RDWR
866
868
*
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() .
870
872
*/
871
873
struct dma_buf * drm_gem_prime_export (struct drm_gem_object * obj ,
872
874
int flags )
@@ -962,9 +964,10 @@ EXPORT_SYMBOL(drm_gem_prime_import_dev);
962
964
* @dev: drm_device to import into
963
965
* @dma_buf: dma-buf object to import
964
966
*
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().
968
971
*
969
972
* Drivers must arrange to call drm_prime_gem_destroy() from their
970
973
* &drm_gem_object_funcs.free hook when using this function.
0 commit comments