[PATCH v2] drm: document that blobs are ref'counted

Pekka Paalanen ppaalanen at gmail.com
Thu Nov 5 08:56:53 UTC 2020


On Wed, 04 Nov 2020 17:01:40 +0000
Simon Ser <contact at emersion.fr> wrote:

> User-space doesn't need to keep track of blobs that might be in use by
> the kernel. User-space can just destroy blobs as soon as they don't need
> them anymore.
> 
> Signed-off-by: Simon Ser <contact at emersion.fr>
> Signed-off-by: Daniel Stone <daniel at fooishbar.org>
> Reviewed-by: Jonas Ådahl <jadahl at gmail.com>
> Cc: Pekka Paalanen <ppaalanen at gmail.com>
> Cc: Daniel Vetter <daniel at ffwll.ch>
> ---
>  include/uapi/drm/drm_mode.h | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/include/uapi/drm/drm_mode.h b/include/uapi/drm/drm_mode.h
> index 863eda048265..5ad10ab2a577 100644
> --- a/include/uapi/drm/drm_mode.h
> +++ b/include/uapi/drm/drm_mode.h
> @@ -924,6 +924,12 @@ struct drm_mode_create_blob {
>   * struct drm_mode_destroy_blob - Destroy user blob
>   * @blob_id: blob_id to destroy
>   * Destroy a user-created blob property.
> + *
> + * User-space can release blobs as soon as they do not need to refer to them by
> + * their blob object ID.  For instance, if you are using a MODE_ID blob in an
> + * atomic commit and you will not make another commit re-using the same ID, you
> + * can destroy the blob as soon as the commit has been issued, without waiting
> + * for it to complete.
>   */
>  struct drm_mode_destroy_blob {
>  	__u32 blob_id;

Reviewed-by: Pekka Paalanen <pekka.paalanen at collabora.com>


Thanks,
pq
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20201105/6bcaab69/attachment.sig>


More information about the dri-devel mailing list