From: Daniel Stone <daniel@fooishbar.org>
To: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>,
intel-gfx <intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH] drm/atomic: allow setting a blob to NULL using id = 0
Date: Fri, 18 Dec 2015 16:55:46 +0000 [thread overview]
Message-ID: <CAPj87rOm7tX7n5o+VZyQSQTirfnH37gVL5guP7ma8utW1jbtoA@mail.gmail.com> (raw)
In-Reply-To: <1450451839-26341-2-git-send-email-lionel.g.landwerlin@intel.com>
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
next prev parent reply other threads:[~2015-12-18 16:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAPj87rOm7tX7n5o+VZyQSQTirfnH37gVL5guP7ma8utW1jbtoA@mail.gmail.com \
--to=daniel@fooishbar.org \
--cc=daniel.vetter@ffwll.ch \
--cc=intel-gfx@lists.freedesktop.org \
--cc=lionel.g.landwerlin@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.