From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH 1/2] drm/i915: allow userspace forcewake references also on gen7 Date: Tue, 24 Jan 2012 12:04:31 +0100 Message-ID: <20120124110431.GC3980@phenom.ffwll.local> References: <1327394669-11681-1-git-send-email-daniel.vetter@ffwll.ch> 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 5751D9E8D3 for ; Tue, 24 Jan 2012 03:04:32 -0800 (PST) Received: by wera10 with SMTP id a10so11039wer.36 for ; Tue, 24 Jan 2012 03:04:31 -0800 (PST) In-Reply-To: Content-Disposition: inline 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: Daniel Vetter , Intel Graphics Development List-Id: intel-gfx@lists.freedesktop.org On Tue, Jan 24, 2012 at 10:35:04AM +0000, Chris Wilson wrote: > On Tue, 24 Jan 2012 09:44:28 +0100, Daniel Vetter wrote: > > We need this to correctly access registers in the gt power well from > > userspace. > > How about a INTEL_INFO(dev)->has_forcewake or check for the > ->forcewake_get? That would be more self-documenting, and we are less > likely to miss one in the future, than adding more random generation > checks. I'll jot down a todo to create a cleanup patch for -next that introduce some feature flags like has_forcewake has_rc6 and such to avoid such gaffles (hopefully). -Daniel -- Daniel Vetter Mail: daniel@ffwll.ch Mobile: +41 (0)79 365 57 48