From: Chris Wilson <chris@chris-wilson.co.uk>
To: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: intel-gfx <intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH 08/43] drm/i915: drop register special-casing in forcewake
Date: Thu, 15 Dec 2011 10:44:43 +0000 [thread overview]
Message-ID: <e39f63$31nkt2@fmsmga002.fm.intel.com> (raw)
In-Reply-To: <CAKMK7uFTiU8mzN=+1XKRGO8VN1wgpW=MRDeQrZy1EPui89VNwg@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2149 bytes --]
On Thu, 15 Dec 2011 11:21:27 +0100, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> On Wed, Dec 14, 2011 at 16:05, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> > On Wed, 14 Dec 2011 13:57:05 +0100, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> >> We currently have 3 register for which we must not grab forcewake for:
> >> FORCEWAKE, FROCEWAKE_MT and ECOBUS.
> >> - FORCEWAKE is excluded in the NEEDS_FORCE_WAKE macro and accessed
> >> Â with _NOTRACE.
> >> - FORCEWAKE_MT is just accessed with _NOTRACE.
> >> - ECOBUS is only excluded in the macro.
> >>
> >> In fear of an ever-growing list of special cases and to cut down the
> >> confusion, just access all of them with the _NOTRACE variants.
> >
> > Instead you build in future confusion by making us guess wtf is this using
> > *_NOTRACE. The NOTRACE macro needs a bit of explanation as it now is
> > more than simply skipping the tracepoints, and why certain registers
> > must be accessed through the macro. Also add that warning to the
> > register define.
>
> When I last checked _NOTRACE was only used to avoid the forcewake
> dance, hence why I didn't add any comment. Would renaming it to
> _NO_FORCEWAKE make you happy, too?
Yeah, the macro did get abused past its original intentions and I'm just
catching up with my complaint. I'd suggest __I915_READ.
> Otherwise I think I'll call it _RAW
> and smash a bunch of comments all over the place, but imo that's
> overkill (and especially in such architectural corner-cases comments
> tend to get stale fast or at least not really reflect reality fully
> correctly).
Right. So the best place for the warning would be next to the register
define that it needs to avoid the forcewake dance, and a mention in the
forcewake dance that some registers are special. Despite the seemingly
futile nature, keeping the relevant information near the code is even
more important when it changes frequently. Knowing precisely which
assumptions and knowledge that was used when the code is written helps
when we need to adapt to new architectures and looking for
oversights/bugs.
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2011-12-15 10:45 UTC|newest]
Thread overview: 115+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-14 12:56 [PATCH 01/43] drm/i915: kicking rings stuck on semaphores considered harmful Daniel Vetter
2011-12-14 12:56 ` [PATCH 02/43] drm/i915: don't bail out of intel_wait_ring_buffer too early Daniel Vetter
2011-12-14 18:39 ` Eugeni Dodonov
2011-12-14 12:57 ` [PATCH 03/43] drm/i915: switch ring->id to be a real id Daniel Vetter
2011-12-14 18:42 ` Eugeni Dodonov
2012-01-29 16:40 ` Daniel Vetter
2011-12-14 12:57 ` [PATCH 04/43] drm/i915: refactor ring error state capture to use arrays Daniel Vetter
2011-12-14 18:43 ` Eugeni Dodonov
2012-01-29 16:44 ` Daniel Vetter
2011-12-14 12:57 ` [PATCH 05/43] drm/i915: collect more per ring error state Daniel Vetter
2011-12-14 18:43 ` Eugeni Dodonov
2012-01-29 16:48 ` Daniel Vetter
2011-12-14 12:57 ` [PATCH 06/43] drm/i915: protect force_wake_(get|put) with the gt_lock Daniel Vetter
2012-01-03 18:51 ` Keith Packard
2012-01-03 19:12 ` Daniel Vetter
2012-01-03 21:13 ` Keith Packard
2012-01-03 21:49 ` Ben Widawsky
2012-01-03 22:23 ` Chris Wilson
2012-01-03 21:49 ` Daniel Vetter
2012-01-03 23:33 ` Keith Packard
2012-01-04 17:11 ` Daniel Vetter
2012-01-04 17:54 ` Keith Packard
2012-01-04 18:12 ` Daniel Vetter
2012-01-05 2:22 ` Keith Packard
2012-01-05 11:29 ` Daniel Vetter
2012-01-05 15:49 ` Keith Packard
2012-01-05 16:59 ` Daniel Vetter
2012-01-06 0:29 ` Keith Packard
2012-01-06 5:41 ` Keith Packard
2012-01-06 20:43 ` Keith Packard
2011-12-14 12:57 ` [PATCH 07/43] drm/i915: convert force_wake_get to func pointer in the gpu reset code Daniel Vetter
2011-12-14 12:57 ` [PATCH 08/43] drm/i915: drop register special-casing in forcewake Daniel Vetter
2011-12-14 15:05 ` Chris Wilson
2011-12-15 10:21 ` Daniel Vetter
2011-12-15 10:44 ` Chris Wilson [this message]
2011-12-22 0:28 ` [PATCH] drm/i915: clear up I915_(READ|WRITE)_NOTRACE confusion Daniel Vetter
2011-12-22 17:54 ` Keith Packard
2011-12-22 18:16 ` Daniel Vetter
2011-12-14 12:57 ` [PATCH 09/43] drm/i915: introduce a vtable for gpu core functions Daniel Vetter
2011-12-14 15:06 ` Chris Wilson
2011-12-21 20:38 ` Daniel Vetter
2011-12-14 18:58 ` Kenneth Graunke
2011-12-14 12:57 ` [PATCH 10/43] drm/i915/ringbuffer: kill snb blt workaround Daniel Vetter
2012-01-29 16:52 ` Daniel Vetter
2011-12-14 12:57 ` [PATCH 11/43] drm/i915: Separate fence pin counting from normal bind pin counting Daniel Vetter
2012-01-29 16:56 ` Daniel Vetter
2011-12-14 12:57 ` [PATCH 12/43] drm/i915: don't trash the gtt when running out of fences Daniel Vetter
2011-12-14 15:09 ` Chris Wilson
2012-01-29 16:57 ` Daniel Vetter
2011-12-14 12:57 ` [PATCH 13/43] drm/i915: refactor debugfs open function Daniel Vetter
2011-12-14 15:10 ` Chris Wilson
2011-12-14 18:36 ` Eugeni Dodonov
2012-01-29 17:28 ` Daniel Vetter
2011-12-14 12:57 ` [PATCH 14/43] drm/i915: refactor debugfs create functions Daniel Vetter
2011-12-14 18:44 ` Eugeni Dodonov
2011-12-14 12:57 ` [PATCH 15/43] drm/i915: add interface to simulate gpu hangs Daniel Vetter
2011-12-14 19:00 ` Eugeni Dodonov
2011-12-14 12:57 ` [PATCH 16/43] drm/i915: rework dev->first_error locking Daniel Vetter
2011-12-14 15:13 ` Chris Wilson
2011-12-14 18:37 ` Eugeni Dodonov
2011-12-14 12:57 ` [PATCH 17/43] drm/i915: destroy existing error_state when simulating a gpu hang Daniel Vetter
2011-12-14 18:45 ` Eugeni Dodonov
2011-12-14 12:57 ` [PATCH 18/43] drm/i915: fix swizzle detection for gen3 Daniel Vetter
2012-01-29 17:36 ` Chris Wilson
2012-01-30 20:20 ` Daniel Vetter
2011-12-14 12:57 ` [PATCH 19/43] drm/i915: add debugfs file for swizzling information Daniel Vetter
2012-01-29 17:37 ` Chris Wilson
2012-01-30 20:22 ` Daniel Vetter
2011-12-14 12:57 ` [PATCH 20/43] drm/i915: swizzling support for snb/ivb Daniel Vetter
2012-01-29 18:34 ` Chris Wilson
2012-01-31 7:44 ` Ben Widawsky
2012-01-31 8:42 ` Daniel Vetter
2011-12-14 12:57 ` [PATCH 21/43] drm/i915: add gen6+ registers to i915_swizzle_info Daniel Vetter
2011-12-14 12:57 ` [PATCH 22/43] drm/i915: prevent division by zero when asking for chipset power Daniel Vetter
2011-12-14 19:05 ` Kenneth Graunke
2011-12-14 12:57 ` [PATCH 23/43] drm/i915: multithreaded forcewake is an ivb+ feature Daniel Vetter
2011-12-14 21:07 ` Eric Anholt
2011-12-14 12:57 ` [PATCH 24/43] drm/i915: capture error_state also for stuck rings Daniel Vetter
2012-01-29 17:36 ` Daniel Vetter
2011-12-14 12:57 ` [PATCH 25/43] drm/i915: properly flush the wc buffer in pwrites to phys objects Daniel Vetter
2011-12-14 15:23 ` Chris Wilson
2011-12-14 12:57 ` [PATCH 26/43] drm/i915: Only clear the GPU domains upon a successful finish Daniel Vetter
2011-12-16 20:07 ` Eric Anholt
2012-03-01 20:40 ` Daniel Vetter
2011-12-14 12:57 ` [PATCH 27/43] drm/i915: flush overlay regfile writes Daniel Vetter
2011-12-14 15:24 ` Chris Wilson
2011-12-21 20:41 ` Daniel Vetter
2011-12-14 12:57 ` [PATCH 28/43] drm/i915: Handle unmappable buffers during error state capture Daniel Vetter
2011-12-14 18:46 ` Eugeni Dodonov
2012-01-31 19:32 ` Daniel Vetter
2011-12-14 12:57 ` [PATCH 29/43] drm/i915: remove the i915_batchbuffer_info debugfs file Daniel Vetter
2012-01-29 17:35 ` Daniel Vetter
2011-12-14 12:57 ` [PATCH 30/43] drm/i915: reject GTT domain in relocations Daniel Vetter
2012-01-29 17:38 ` Daniel Vetter
2011-12-14 12:57 ` [PATCH 31/43] drm/i915: Use kcalloc instead of kzalloc to allocate array Daniel Vetter
2011-12-14 18:48 ` Eugeni Dodonov
2011-12-14 12:57 ` [PATCH 32/43] drm/i915: Avoid using mappable space for relocation processing through the CPU Daniel Vetter
2011-12-14 12:57 ` [PATCH 33/43] drm/i915: fall through pwrite_gtt_slow to the shmem slow path Daniel Vetter
2011-12-14 12:57 ` [PATCH 34/43] drm/i915: rewrite shmem_pwrite_slow to use copy_from_user Daniel Vetter
2011-12-14 12:57 ` [PATCH 35/43] drm/i915: rewrite shmem_pread_slow to use copy_to_user Daniel Vetter
2012-01-30 22:37 ` Daniel Vetter
2011-12-14 12:57 ` [PATCH 36/43] agp/intel-gtt: export the scratch page dma address Daniel Vetter
2011-12-14 12:57 ` [PATCH 37/43] agp/intel-gtt: export the gtt pagetable iomapping Daniel Vetter
2011-12-14 12:57 ` [PATCH 38/43] drm/i915: initialization/teardown for the aliasing ppgtt Daniel Vetter
2011-12-14 12:57 ` [PATCH 39/43] drm/i915: ppgtt binding/unbinding support Daniel Vetter
2011-12-14 12:57 ` [PATCH 40/43] drm/i915: ppgtt register definitions Daniel Vetter
2011-12-14 18:58 ` Eugeni Dodonov
2011-12-14 19:01 ` Eugeni Dodonov
2011-12-14 12:57 ` [PATCH 41/43] drm/i915: ppgtt debugfs info Daniel Vetter
2011-12-14 12:57 ` [PATCH 42/43] drm/i915: per-ring fault reg Daniel Vetter
2011-12-14 19:00 ` Eugeni Dodonov
2012-01-29 22:20 ` Daniel Vetter
2011-12-14 12:57 ` [PATCH 43/43] drm/i915: enable ppgtt Daniel Vetter
2011-12-14 15:34 ` Chris Wilson
2011-12-21 20:46 ` Daniel Vetter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='e39f63$31nkt2@fmsmga002.fm.intel.com' \
--to=chris@chris-wilson.co.uk \
--cc=daniel.vetter@ffwll.ch \
--cc=intel-gfx@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.