All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Allow userspace to set NULL blob on properties
@ 2015-12-18 15:17 Lionel Landwerlin
  2015-12-18 15:17 ` [PATCH] drm/atomic: allow setting a blob to NULL using id = 0 Lionel Landwerlin
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Lionel Landwerlin @ 2015-12-18 15:17 UTC (permalink / raw)
  To: intel-gfx; +Cc: daniel.vetter

Hi,

A couple of people told me I should be able to set a blob property to
NULL from user space using a blob id 0. I couldn't get that to work
(probably nobody's doing this at the moment). Here is a patch to make
that work.

Cheers,

-
Lionel

Lionel Landwerlin (1):
  drm/atomic: allow setting a blob to NULL using id = 0

 drivers/gpu/drm/drm_atomic.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

--
2.6.3
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* [PATCH] drm/atomic: allow setting a blob to NULL using id = 0
  2015-12-18 15:17 [PATCH] Allow userspace to set NULL blob on properties Lionel Landwerlin
@ 2015-12-18 15:17 ` Lionel Landwerlin
  2015-12-18 16:55   ` Daniel Stone
  2015-12-18 15:30 ` ✗ failure: Fi.CI.BAT Patchwork
  2015-12-18 16:57 ` [PATCH] Allow userspace to set NULL blob on properties Daniel Stone
  2 siblings, 1 reply; 5+ messages in thread
From: Lionel Landwerlin @ 2015-12-18 15:17 UTC (permalink / raw)
  To: intel-gfx; +Cc: daniel.vetter

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
---
 drivers/gpu/drm/drm_atomic.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c
index 65f007a..b8c90a4 100644
--- a/drivers/gpu/drm/drm_atomic.c
+++ b/drivers/gpu/drm/drm_atomic.c
@@ -403,12 +403,14 @@ EXPORT_SYMBOL(drm_atomic_set_mode_prop_for_crtc);
 static int drm_atomic_crtc_set_blob(struct drm_device *dev,
 	struct drm_property_blob **state_blob, uint32_t blob_id)
 {
-	struct drm_property_blob *blob;
+	struct drm_property_blob *blob = NULL;
 
-	blob = drm_property_lookup_blob(dev, blob_id);
-	if (!blob) {
-		DRM_DEBUG_KMS("Invalid Blob ID\n");
-		return -EINVAL;
+	if (blob_id != 0) {
+		blob = drm_property_lookup_blob(dev, blob_id);
+		if (!blob) {
+			DRM_DEBUG_KMS("Invalid Blob ID\n");
+			return -EINVAL;
+		}
 	}
 
 	if (*state_blob)
-- 
2.6.3

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* ✗ failure: Fi.CI.BAT
  2015-12-18 15:17 [PATCH] Allow userspace to set NULL blob on properties Lionel Landwerlin
  2015-12-18 15:17 ` [PATCH] drm/atomic: allow setting a blob to NULL using id = 0 Lionel Landwerlin
@ 2015-12-18 15:30 ` Patchwork
  2015-12-18 16:57 ` [PATCH] Allow userspace to set NULL blob on properties Daniel Stone
  2 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2015-12-18 15:30 UTC (permalink / raw)
  To: Lionel Landwerlin; +Cc: intel-gfx

== Summary ==

HEAD is now at da33ddb drm-intel-nightly: 2015y-12m-18d-13h-53m-06s UTC integration manifest
Applying: drm/atomic: allow setting a blob to NULL using id = 0
Repository lacks necessary blobs to fall back on 3-way merge.
Cannot fall back to three-way merge.
Patch failed at 0001 drm/atomic: allow setting a blob to NULL using id = 0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH] drm/atomic: allow setting a blob to NULL using id = 0
  2015-12-18 15:17 ` [PATCH] drm/atomic: allow setting a blob to NULL using id = 0 Lionel Landwerlin
@ 2015-12-18 16:55   ` Daniel Stone
  0 siblings, 0 replies; 5+ messages in thread
From: Daniel Stone @ 2015-12-18 16:55 UTC (permalink / raw)
  To: Lionel Landwerlin; +Cc: Daniel Vetter, intel-gfx

On 18 December 2015 at 15:17, Lionel Landwerlin
<lionel.g.landwerlin@intel.com> wrote:
> Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
> ---
>  drivers/gpu/drm/drm_atomic.c | 12 +++++++-----
>  1 file changed, 7 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c
> index 65f007a..b8c90a4 100644
> --- a/drivers/gpu/drm/drm_atomic.c
> +++ b/drivers/gpu/drm/drm_atomic.c
> @@ -403,12 +403,14 @@ EXPORT_SYMBOL(drm_atomic_set_mode_prop_for_crtc);
>  static int drm_atomic_crtc_set_blob(struct drm_device *dev,
>         struct drm_property_blob **state_blob, uint32_t blob_id)
>  {
> -       struct drm_property_blob *blob;
> +       struct drm_property_blob *blob = NULL;
>
> -       blob = drm_property_lookup_blob(dev, blob_id);
> -       if (!blob) {
> -               DRM_DEBUG_KMS("Invalid Blob ID\n");
> -               return -EINVAL;
> +       if (blob_id != 0) {
> +               blob = drm_property_lookup_blob(dev, blob_id);
> +               if (!blob) {
> +                       DRM_DEBUG_KMS("Invalid Blob ID\n");
> +                       return -EINVAL;
> +               }
>         }

Heh, almost exactly what I suggested! :)

Given that this was only introduced by 1/6 of the CM patchset though,
just integrate this into the next round of CM rather than posting it
separately I think.

Cheers,
Daniel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH] Allow userspace to set NULL blob on properties
  2015-12-18 15:17 [PATCH] Allow userspace to set NULL blob on properties Lionel Landwerlin
  2015-12-18 15:17 ` [PATCH] drm/atomic: allow setting a blob to NULL using id = 0 Lionel Landwerlin
  2015-12-18 15:30 ` ✗ failure: Fi.CI.BAT Patchwork
@ 2015-12-18 16:57 ` Daniel Stone
  2 siblings, 0 replies; 5+ messages in thread
From: Daniel Stone @ 2015-12-18 16:57 UTC (permalink / raw)
  To: Lionel Landwerlin; +Cc: Daniel Vetter, intel-gfx

Hi,

On 18 December 2015 at 15:17, Lionel Landwerlin
<lionel.g.landwerlin@intel.com> wrote:
> A couple of people told me I should be able to set a blob property to
> NULL from user space using a blob id 0. I couldn't get that to work
> (probably nobody's doing this at the moment). Here is a patch to make
> that work.

You can't do it with CM because it goes out of its way to make sure it
doesn't happen. With the CRTC MODE_ID, you should be able to do it by
setting ACTIVE to 0 first, then setting MODE_ID to 0, or just doing
both at once with the atomic ioctl.

Cheers,
Daniel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

end of thread, other threads:[~2015-12-18 16:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-18 15:17 [PATCH] Allow userspace to set NULL blob on properties Lionel Landwerlin
2015-12-18 15:17 ` [PATCH] drm/atomic: allow setting a blob to NULL using id = 0 Lionel Landwerlin
2015-12-18 16:55   ` Daniel Stone
2015-12-18 15:30 ` ✗ failure: Fi.CI.BAT Patchwork
2015-12-18 16:57 ` [PATCH] Allow userspace to set NULL blob on properties Daniel Stone

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.