[PATCH 1/2] drm: add plane support

Jesse Barnes jbarnes at virtuousgeek.org
Tue Nov 8 13:17:34 PST 2011


On Tue, 08 Nov 2011 17:50:51 +0000
Chris Wilson <chris at chris-wilson.co.uk> wrote:

> 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 :)

Ok both good comments; fixed in the latest update.

-- 
Jesse Barnes, Intel Open Source Technology Center
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/dri-devel/attachments/20111108/a0e3de45/attachment.pgp>


More information about the dri-devel mailing list