All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: Jesse Barnes <jbarnes@virtuousgeek.org>, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 1/2] drm: add plane support
Date: Tue, 08 Nov 2011 17:50:51 +0000	[thread overview]
Message-ID: <e0d58a$250l41@orsmga002.jf.intel.com> (raw)
In-Reply-To: <1320773933-23158-1-git-send-email-jbarnes@virtuousgeek.org>

On Tue,  8 Nov 2011 09:38:52 -0800, Jesse Barnes <jbarnes@virtuousgeek.org> wrote:
> +int drm_mode_getplane(struct drm_device *dev, void *data,
> +			struct drm_file *file_priv)
> +{
> +	struct drm_mode_get_plane *plane_resp = data;
> +	struct drm_mode_object *obj;
> +	struct drm_plane *plane;
> +	uint32_t __user *format_ptr;
> +	int ret = 0;
> +
> +	if (!drm_core_check_feature(dev, DRIVER_MODESET))
> +		return -EINVAL;
> +
> +	mutex_lock(&dev->mode_config.mutex);
> +	obj = drm_mode_object_find(dev, plane_resp->plane_id,
> +				   DRM_MODE_OBJECT_PLANE);
> +	if (!obj) {
> +		ret = -EINVAL;
> +		goto out;
> +	}
We had begun to use ENOENT for failure to find the specified object to
give a little variation to our error codes. Still not very widespread,
but I think a good practice to encourage :)
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre

  parent reply	other threads:[~2011-11-08 17:51 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-08 17:38 [PATCH 1/2] drm: add plane support Jesse Barnes
2011-11-08 17:38 ` [PATCH 2/2] drm: add an fb creation ioctl that takes a pixel format Jesse Barnes
2011-11-08 17:46 ` [PATCH 1/2] drm: add plane support Chris Wilson
2011-11-08 17:50 ` Chris Wilson [this message]
2011-11-08 21:17   ` Jesse Barnes
  -- strict thread matches above, loose matches on Subject: below --
2011-11-08 21:18 Jesse Barnes
2011-11-08 21:26 ` Chris Wilson

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='e0d58a$250l41@orsmga002.jf.intel.com' \
    --to=chris@chris-wilson.co.uk \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jbarnes@virtuousgeek.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.