From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH 5/7] drm/i915: Error checks in gen6_set_rps Date: Wed, 12 Sep 2012 23:37:44 +0200 Message-ID: <20120912213744.GT5533@phenom.ffwll.local> References: <1347072225-10654-1-git-send-email-ben@bwidawsk.net> <1347072225-10654-6-git-send-email-ben@bwidawsk.net> <275ffc$6hj53c@fmsmga002.fm.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-wi0-f171.google.com (mail-wi0-f171.google.com [209.85.212.171]) by gabe.freedesktop.org (Postfix) with ESMTP id 454CE9E8E2 for ; Wed, 12 Sep 2012 14:37:11 -0700 (PDT) Received: by wibhq4 with SMTP id hq4so4815915wib.12 for ; Wed, 12 Sep 2012 14:37:10 -0700 (PDT) Content-Disposition: inline In-Reply-To: <275ffc$6hj53c@fmsmga002.fm.intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: Chris Wilson Cc: Ben Widawsky , intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Sun, Sep 09, 2012 at 07:25:40PM +0100, Chris Wilson wrote: > On Fri, 7 Sep 2012 19:43:42 -0700, Ben Widawsky wrote: > > With the new "standardized" sysfs interfaces we need to be a bit more > > careful about setting the RPS values. > > > > Because the sysfs code and the rps workqueue can run at the same time, > > if the sysfs setter wins the race to the mutex, the workqueue can come > > in and set a value which is out of range (ie. we're no longer protecting > > by RPINTLIM). > > > > I was not able to actually make this error occur in testing. > > > > Signed-off-by: Ben Widawsky > > Good catch, care to squeeze the comment into a single line ;-) > Reviewed-by: Chris Wilson Applied all patches to dinq up to this one here, thanks. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch