From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH 4/9] drm/i915: move all rps state into dev_priv->rps Date: Wed, 25 Jul 2012 23:26:03 +0200 Message-ID: <20120725212603.GG5396@phenom.ffwll.local> References: <1343165630-21604-1-git-send-email-daniel.vetter@ffwll.ch> <1343165630-21604-5-git-send-email-daniel.vetter@ffwll.ch> <20120725122500.6723f67f@bwidawsk.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-we0-f177.google.com (mail-we0-f177.google.com [74.125.82.177]) by gabe.freedesktop.org (Postfix) with ESMTP id 29D039F500 for ; Wed, 25 Jul 2012 14:25:54 -0700 (PDT) Received: by weyr3 with SMTP id r3so941510wey.36 for ; Wed, 25 Jul 2012 14:25:54 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20120725122500.6723f67f@bwidawsk.net> 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: Ben Widawsky Cc: Daniel Vetter , Intel Graphics Development List-Id: intel-gfx@lists.freedesktop.org On Wed, Jul 25, 2012 at 12:25:00PM -0700, Ben Widawsky wrote: > On Tue, 24 Jul 2012 23:33:45 +0200 > Daniel Vetter wrote: > > > This way it's easier so see what belongs together, and what is used > > by the ilk ips code. Also add some comments that explain the locking. > > > > v2: Missed one place that the dev_priv->ips change caught ... > > > > Signed-off-by: Daniel Vetter > Reviewed-by: Ben Widawsky > With a few comments below > > > + /* gen6+ rps state */ > > + struct { > > + struct work_struct work; > > + u32 pm_iir; > > + /* lock - irqsave spinlock that protectects the work_struct and > > + * pm_iir. */ > > + spinlock_t lock; > > + > > + /* The below variables an all the rps hw state are protected by > > + * dev->struct mutext. */ > > + u8 cur_delay; > > + u8 min_delay; > > + u8 max_delay; > > + } rps; > > + > > > > u8 cur_delay; > > u8 min_delay; > > Could you add the reason for adding new cur/min/max delays to the commit > message? From just this hunk it would seem we'd want to remove the old > cur/min/max. I'll add a comment that (cur|min|max)_delay need to be duplicated, because they're also used by the ips code when applying the patch. -Daniel -- Daniel Vetter Mail: daniel@ffwll.ch Mobile: +41 (0)79 365 57 48