All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 2/3] drm: Sync errno values for property lookup errors
Date: Fri, 25 Jan 2019 23:01:48 +0200	[thread overview]
Message-ID: <20190125210148.GP20097@intel.com> (raw)
In-Reply-To: <20190122093938.GX3271@phenom.ffwll.local>

On Tue, Jan 22, 2019 at 10:39:38AM +0100, Daniel Vetter wrote:
> On Mon, Jan 21, 2019 at 10:24:29PM +0200, Ville Syrjala wrote:
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > 
> > Use ENOENT consistently for the case where the requested property
> > isn't found, and EINVAL for the case where the object has no
> > properties whatsoever. Currenrly these are handled differently
> > in the atomic and legacy codepaths.
> > 
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Matches https://dri.freedesktop.org/docs/drm/gpu/drm-uapi.html#recommended-ioctl-return-values
> 
> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> 
> Any igts that blow up with this? We should have at least some trying to do
> invalid stuff ...

Looks like there was something caught by ci. I'll have to look those
over.

Also the logs seem to full of my
<7> [625.952666] [drm:drm_modeset_backoff] Retrying to avoid deadlock

Not sure if that debug print is a good idea after all :/

> -Daniel
> 
> > ---
> >  drivers/gpu/drm/drm_atomic_uapi.c | 2 +-
> >  drivers/gpu/drm/drm_mode_object.c | 1 +
> >  2 files changed, 2 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/gpu/drm/drm_atomic_uapi.c b/drivers/gpu/drm/drm_atomic_uapi.c
> > index 06390307e5a3..2a54f826cf65 100644
> > --- a/drivers/gpu/drm/drm_atomic_uapi.c
> > +++ b/drivers/gpu/drm/drm_atomic_uapi.c
> > @@ -1330,7 +1330,7 @@ int drm_mode_atomic_ioctl(struct drm_device *dev,
> >  			DRM_DEBUG_ATOMIC("Object ID %d has no properties\n",
> >  					 obj_id);
> >  			drm_mode_object_put(obj);
> > -			ret = -ENOENT;
> > +			ret = -EINVAL;
> >  			goto out;
> >  		}
> >  
> > diff --git a/drivers/gpu/drm/drm_mode_object.c b/drivers/gpu/drm/drm_mode_object.c
> > index e8dac94d576d..31730d935842 100644
> > --- a/drivers/gpu/drm/drm_mode_object.c
> > +++ b/drivers/gpu/drm/drm_mode_object.c
> > @@ -527,6 +527,7 @@ int drm_mode_obj_set_property_ioctl(struct drm_device *dev, void *data,
> >  	property = drm_mode_obj_find_prop_id(arg_obj, arg->prop_id);
> >  	if (!property) {
> >  		DRM_DEBUG_KMS("Unknown property ID %d\n", arg->prop_id);
> > +		ret = -ENOENT;
> >  		goto out_unref;
> >  	}
> >  
> > -- 
> > 2.19.2
> > 
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
> 
> -- 
> Daniel Vetter
> Software Engineer, Intel Corporation
> http://blog.ffwll.ch

-- 
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2019-01-25 21:01 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-21 20:24 [PATCH 1/3] drm: Add debug prints for the various object lookup errors Ville Syrjala
2019-01-21 20:24 ` [PATCH 2/3] drm: Sync errno values for property " Ville Syrjala
2019-01-22  9:39   ` Daniel Vetter
2019-01-25 21:01     ` Ville Syrjälä [this message]
2019-01-29  8:49       ` Daniel Vetter
2019-02-15  8:21   ` [drm] ef3de4356d: piglit.igt.kms_atomic.atomic_invalid_params.fail kernel test robot
2019-02-15  8:21     ` [LKP] " kernel test robot
2019-01-21 20:24 ` [PATCH 3/3] drm: Add a debug print for drm_modeset_backoff() Ville Syrjala
2019-01-22  9:41   ` Daniel Vetter
2019-01-21 21:07 ` ✓ Fi.CI.BAT: success for series starting with [1/3] drm: Add debug prints for the various object lookup errors Patchwork
2019-01-21 23:04 ` ✗ Fi.CI.IGT: failure " Patchwork
2019-01-22  9:38 ` [Intel-gfx] [PATCH 1/3] " Daniel Vetter
2019-01-25 20:58   ` Ville Syrjälä

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=20190125210148.GP20097@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    /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.