From: Ben Widawsky Subject: Re: [PATCH 2/2] drm/i915: drpc debugfs update for gen6 Date: Wed, 23 Nov 2011 10:46:23 -0800 Message-ID: <20111123184622.GA13784@bolo_yeung.jf.intel.com> References: <1322002703-32241-1-git-send-email-ben@bwidawsk.net> <1322002703-32241-2-git-send-email-ben@bwidawsk.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from cloud01.chad-versace.us (184-106-247-128.static.cloud-ips.com [184.106.247.128]) by gabe.freedesktop.org (Postfix) with ESMTP id DFF9C9EAF7 for ; Wed, 23 Nov 2011 10:46:32 -0800 (PST) Content-Disposition: inline In-Reply-To: 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: Eugeni Dodonov Cc: intel-gfx@lists.freedesktop.org, Eugeni Dodonov List-Id: intel-gfx@lists.freedesktop.org On Wed, Nov 23, 2011 at 11:32:31AM -0200, Eugeni Dodonov wrote: > On Tue, Nov 22, 2011 at 20:58, Ben Widawsky wrote: > > > Many of the old fields from Ironlake have gone away. Strip all those > > fields, and try to update to fields people care about. RC information > > isn't exactly ideal anymore. All we can guarantee when we read the > > register is that we're not using forcewake, ie. the software isn't > > forcing the hardware to stay awake. The downside is that in doing this > > we may wait a while and that causes an unnaturally idle state on the > > GPU. > > > > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=42578 > > Cc: Eugeni Dodonov > > Signed-off-by: Ben Widawsky > > > > For both patches: > Reviewed-by: Eugeni Dodonov > > Just one comment below. > > > > + if (count == 50) > > + DRM_INFO("Couldn't get accurate RC information\n"); > > > > Maybe we should seq_printf() this as well? Like, for example: > > seq_printf(m, "RC information accurate: %s\n", yesno(count != 50)); > > So the userspace consulting this file would know if it should rely on the > values or retry the read.. > > Just an idea. It's a good idea... I should almost definitely do that since the information is *almost* definitely incorrect (unless we got really lucky and the bit flipped after we gave up). Also on second thought, I should probably check if user forcewake is set, in which case I can recommend they unset it before reading the value. I'll redo this. Thanks. Ben