From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jesse Barnes Subject: Re: [PATCH 1/2] drm: add plane support Date: Tue, 8 Nov 2011 13:17:34 -0800 Message-ID: <20111108131734.45616cc3@jbarnes-desktop> References: <1320773933-23158-1-git-send-email-jbarnes@virtuousgeek.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1105094449==" Return-path: Received: from oproxy9.bluehost.com (oproxy9.bluehost.com [69.89.24.6]) by gabe.freedesktop.org (Postfix) with SMTP id 952CE9E75F for ; Tue, 8 Nov 2011 13:17:34 -0800 (PST) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: Chris Wilson Cc: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============1105094449== Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/V.c4/ASw2Yh0jiob.=vGmkl"; protocol="application/pgp-signature" --Sig_/V.c4/ASw2Yh0jiob.=vGmkl Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Tue, 08 Nov 2011 17:50:51 +0000 Chris Wilson wrote: > On Tue, 8 Nov 2011 09:38:52 -0800, Jesse Barnes wrote: > > +int drm_mode_getplane(struct drm_device *dev, void *data, > > + struct drm_file *file_priv) > > +{ > > + struct drm_mode_get_plane *plane_resp =3D data; > > + struct drm_mode_object *obj; > > + struct drm_plane *plane; > > + uint32_t __user *format_ptr; > > + int ret =3D 0; > > + > > + if (!drm_core_check_feature(dev, DRIVER_MODESET)) > > + return -EINVAL; > > + > > + mutex_lock(&dev->mode_config.mutex); > > + obj =3D drm_mode_object_find(dev, plane_resp->plane_id, > > + DRM_MODE_OBJECT_PLANE); > > + if (!obj) { > > + ret =3D -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. --=20 Jesse Barnes, Intel Open Source Technology Center --Sig_/V.c4/ASw2Yh0jiob.=vGmkl Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iQIcBAEBAgAGBQJOuZxuAAoJEIEoDkX4Qk9hyAQP/23V3mP0kujyALH3R3ANBWgu xeKANsaQvwnMjxy2HP5KMadNLPkz3EvTVId3Dy7sYi2qthOklT5FcYS/9VacIsxf 1qYbvMcY7sRqCoM0l2W8qa9evEEqNNzS3ux0qOP04mpRQ4INHP70XFePbWsgAn9i e9xNYjagLuegriawdgkh1Gek+rkctVfgXwfSRprOWuWik/RN635CS4Pmjga0eiDE 98JktIZVFU/q9YpEzroPwCCEhxhrq/aKGDXjQBAnF25l9oaJ2VRWnZqECSybRRTa JlFg5RzU+HJ3q6uLqEqBapZbZzuzcOdjVdO03T2x4M2fjzDAQ1PRbSyv2WxX8RMm KCVSt/cnFOB4ca1a2Le2sj95govnOCjpmZdXDIWbgOZ8MGIND93DXrcOlfZg75Ty Rf/SwSS8+dZ+QrlSe5KGZhXfR4cUYerhdbkOZtOQDeel83Qt9nOQfq3ONhs+egV5 SXmOuoZsxM5LNOpLVJJGMeQDppuowC0mISuyFY0jKCnMSuipwbFzfoJ+l81bDruS APMj2DVn+VLV9LyrwP1WumhJ5p3yxWnp98J1ttaMlGSdThxxKcbQ6qtVZu9NsCv/ dYuCFUDzE2bg/47PPvuBV7Q7+zYkFXO2qXAqERmk2TRGHQCqG0aPW774HH0Ymdv0 D1Z/qExs62HQ6tPqJ5Qh =2psJ -----END PGP SIGNATURE----- --Sig_/V.c4/ASw2Yh0jiob.=vGmkl-- --===============1105094449== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel --===============1105094449==--