[PATCH 1/3] drm: Enable PRIME import/export for all drivers

Simon Ser contact at emersion.fr
Thu Jun 15 14:47:33 UTC 2023


On Thursday, June 15th, 2023 at 11:31, Thomas Zimmermann <tzimmermann at suse.de> wrote:

> diff --git a/include/drm/drm_drv.h b/include/drm/drm_drv.h
> index 89e2706cac561..10af1899236a0 100644
> --- a/include/drm/drm_drv.h
> +++ b/include/drm/drm_drv.h
> @@ -309,6 +309,9 @@ struct drm_driver {
>  	 *
>  	 * For an in-depth discussion see :ref:`PRIME buffer sharing
>  	 * documentation <prime_buffer_sharing>`.
> +	 *
> +	 * TODO: Convert remaining drivers to drm_gem_prime_handle_to_fd()
> +	 *       and remove this callback.
>  	 */

The docs right above still state: "Should be implemented with
drm_gem_prime_handle_to_fd() for GEM based drivers". Maybe we can replace that
and state that leaving this NULL will use a default implementation?

>  	int (*prime_handle_to_fd)(struct drm_device *dev, struct drm_file *file_priv,
>  				uint32_t handle, uint32_t flags, int *prime_fd);
> @@ -320,6 +323,9 @@ struct drm_driver {
>  	 *
>  	 * For an in-depth discussion see :ref:`PRIME buffer sharing
>  	 * documentation <prime_buffer_sharing>`.
> +	 *
> +	 * TODO: Convert remaining drivers to drm_gem_prime_fd_to_handle()
> +	 *       and remove this callback.
>  	 */

Ditto.

>  	int (*prime_fd_to_handle)(struct drm_device *dev, struct drm_file *file_priv,
>  				int prime_fd, uint32_t *handle);
> --
> 2.41.0


More information about the dri-devel mailing list