All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] drm: document that blobs are ref'counted
@ 2020-11-04 17:01 Simon Ser
  2020-11-05  8:56 ` Pekka Paalanen
  2020-11-05  9:43 ` Daniel Vetter
  0 siblings, 2 replies; 4+ messages in thread
From: Simon Ser @ 2020-11-04 17:01 UTC (permalink / raw)
  To: dri-devel

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@emersion.fr>
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
Cc: Pekka Paalanen <ppaalanen@gmail.com>
Cc: Daniel Vetter <daniel@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;
-- 
2.29.2


_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] drm: document that blobs are ref'counted
  2020-11-04 17:01 [PATCH v2] drm: document that blobs are ref'counted Simon Ser
@ 2020-11-05  8:56 ` Pekka Paalanen
  2020-11-05  9:00   ` Jonas Ådahl
  2020-11-05  9:43 ` Daniel Vetter
  1 sibling, 1 reply; 4+ messages in thread
From: Pekka Paalanen @ 2020-11-05  8:56 UTC (permalink / raw)
  To: Simon Ser; +Cc: dri-devel


[-- Attachment #1.1: Type: text/plain, Size: 1465 bytes --]

On Wed, 04 Nov 2020 17:01:40 +0000
Simon Ser <contact@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@emersion.fr>
> Signed-off-by: Daniel Stone <daniel@fooishbar.org>
> Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
> Cc: Pekka Paalanen <ppaalanen@gmail.com>
> Cc: Daniel Vetter <daniel@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@collabora.com>


Thanks,
pq

[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] drm: document that blobs are ref'counted
  2020-11-05  8:56 ` Pekka Paalanen
@ 2020-11-05  9:00   ` Jonas Ådahl
  0 siblings, 0 replies; 4+ messages in thread
From: Jonas Ådahl @ 2020-11-05  9:00 UTC (permalink / raw)
  To: Pekka Paalanen; +Cc: dri-devel

On Thu, Nov 05, 2020 at 10:56:53AM +0200, Pekka Paalanen wrote:
> On Wed, 04 Nov 2020 17:01:40 +0000
> Simon Ser <contact@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@emersion.fr>
> > Signed-off-by: Daniel Stone <daniel@fooishbar.org>
> > Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
> > Cc: Pekka Paalanen <ppaalanen@gmail.com>
> > Cc: Daniel Vetter <daniel@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@collabora.com>

This version is as clear to me as the previous one so both are

Reviewed-by: Jonas Ådahl <jadahl@gmail.com>


Jonas

> 
> 
> Thanks,
> pq


_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] drm: document that blobs are ref'counted
  2020-11-04 17:01 [PATCH v2] drm: document that blobs are ref'counted Simon Ser
  2020-11-05  8:56 ` Pekka Paalanen
@ 2020-11-05  9:43 ` Daniel Vetter
  1 sibling, 0 replies; 4+ messages in thread
From: Daniel Vetter @ 2020-11-05  9:43 UTC (permalink / raw)
  To: Simon Ser; +Cc: dri-devel

On Wed, Nov 04, 2020 at 05:01:40PM +0000, Simon Ser 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@emersion.fr>
> Signed-off-by: Daniel Stone <daniel@fooishbar.org>
> Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
> Cc: Pekka Paalanen <ppaalanen@gmail.com>
> Cc: Daniel Vetter <daniel@ffwll.ch>

Reviewed-by: Daniel Vetter <daniel.vetter@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;
> -- 
> 2.29.2
> 
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-11-05  9:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-04 17:01 [PATCH v2] drm: document that blobs are ref'counted Simon Ser
2020-11-05  8:56 ` Pekka Paalanen
2020-11-05  9:00   ` Jonas Ådahl
2020-11-05  9:43 ` Daniel Vetter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.