[PATCH 1/2] drm: add plane support
Chris Wilson
chris at chris-wilson.co.uk
Tue Nov 8 09:50:51 PST 2011
On Tue, 8 Nov 2011 09:38:52 -0800, Jesse Barnes <jbarnes at 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
More information about the dri-devel
mailing list