From: Daniel Vetter Subject: Re: [PATCH 2/2] Use drm_gem_object_[handle_]unreference_unlocked where possible Date: Tue, 9 Feb 2010 13:09:23 +0100 Message-ID: <20100209120923.GB3562@viiv.ffwll.ch> References: <1265694552-10822-1-git-send-email-luca@luca-barbieri.com> <1265694552-10822-2-git-send-email-luca@luca-barbieri.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1265694552-10822-2-git-send-email-luca@luca-barbieri.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.sourceforge.net To: Luca Barbieri Cc: airlied@linux.ie, dri-devel@lists.sourceforge.net List-Id: dri-devel@lists.freedesktop.org On Tue, Feb 09, 2010 at 06:49:12AM +0100, Luca Barbieri wrote: > Mostly obvious simplifications. > > The i915 pread/pwrite ioctls, intel_overlay_put_image and > nouveau_gem_new were incorrectly using the locked versions > without locking: this is also fixed in this patch. Just one nitpick on the intel_overlay.c part .. > diff --git a/drivers/gpu/drm/i915/intel_overlay.c b/drivers/gpu/drm/i915/intel_overlay.c > index 2639591..1b50d61 100644 > --- a/drivers/gpu/drm/i915/intel_overlay.c > +++ b/drivers/gpu/drm/i915/intel_overlay.c > @@ -1179,7 +1179,7 @@ int intel_overlay_put_image(struct drm_device *dev, void *data, > out_unlock: > mutex_unlock(&dev->struct_mutex); > mutex_unlock(&dev->mode_config.mutex); > - drm_gem_object_unreference(new_bo); > + drm_gem_object_unreference_unlocked(new_bo); > kfree(params); Just move the drm_gem_object_unreference before the mutex_unlock calls, make more sense that way, IMHO. -Daniel -- Daniel Vetter Mail: daniel@ffwll.ch Mobile: +41 (0)79 365 57 48 ------------------------------------------------------------------------------ The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com --