From: Keith Packard <keithp@keithp.com>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>,
intel-gfx <intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH 06/43] drm/i915: protect force_wake_(get|put) with the gt_lock
Date: Thu, 05 Jan 2012 16:29:43 -0800 [thread overview]
Message-ID: <86k4558yh4.fsf@sumi.keithp.com> (raw)
In-Reply-To: <20120105165947.GG3831@phenom.ffwll.local>
[-- Attachment #1.1: Type: text/plain, Size: 2913 bytes --]
On Thu, 5 Jan 2012 17:59:47 +0100, Daniel Vetter <daniel@ffwll.ch> wrote:
> Absolutely agreed, maybe with the adadendum to only try to make things
> faster if it's actually a problem and shows up in a fast-path we care
> about.
Here's a longer series that does a bunch of cleanup before trying to fix
things. Patches marked with '***' fix bugs. The patch marked with '...'
is the optimization to inline the spinlocks.
The following changes since commit d8e70a254d8f2da141006e496a51502b79115e80:
drm/i915: only set the intel_crtc DPMS mode to on if the mode set succeeded (2012-01-03 14:55:52 -0800)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/keithp/linux forcewake-spinlock
Keith Packard (9):
drm/i915: Split register access functions out from display functions
The forcewake functions are invoked unconditionally on >= gen6
hardware from the register read/write functions. Having these
initialized as a side-effect of display initialization seems
wrong to me. I've moved the functions out of the display
structure and into a separate structure, and moved the
initialization to driver load time.
drm/i915: Access registers through function pointers
This makes register access go through function pointers,
following similar changes in many other parts of the driver.
drm/i915: Split out reg read/write for pre/post gen6 hardware
Taking advantage of the previous indirection, this actually
creates separate register read/write functions for pre-gen6 and
post-gen6 hardware.
drm/i915: Move forcewake_count to reg_access structure
Just moves the count into the new structure to keep things
together.
drm/i915: hide forcewake_count behind i915_forcewake_count
Create a function to hide getting the forcewake_count value
drm/i915: Switch forcewake from atomic to using a spinlock
This changes the type from atomic to u32 and wraps all users in
a new spinlock. The spinlock is held across calls to
->force_wake_put and ->force_wake_get.
*** drm/i915: Hold forcewake spinlock across reset process
Changes the reset process to hold the spinlock -- this will
ensure that all register operations will be correct wrt the
spinlock, even if the hardware gets reset.
*** drm/i915: Hold forcewake spinlock during register write operations
This protects the gt_fifo_count value under the spinlock and
keeps modifications to that tied to the actual register write.
... drm/i915: inline spin_lock usage in register read macros
Here's the optimization I mentioned -- inlines the spinlocks
inside the register read operations.
--
keith.packard@intel.com
[-- Attachment #1.2: Type: application/pgp-signature, Size: 827 bytes --]
[-- 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:[~2012-01-06 0:29 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 [this message]
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
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=86k4558yh4.fsf@sumi.keithp.com \
--to=keithp@keithp.com \
--cc=daniel.vetter@ffwll.ch \
--cc=daniel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox