From: Daniel Vetter <daniel@ffwll.ch>
To: Ben Widawsky <ben@bwidawsk.net>
Cc: Intel GFX <intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH 18/18] drm/i915: add I915_PARAM_HAS_VEBOX to i915_getparam
Date: Fri, 31 May 2013 20:52:29 +0200 [thread overview]
Message-ID: <20130531185229.GC15743@phenom.ffwll.local> (raw)
In-Reply-To: <1369794154-1639-19-git-send-email-ben@bwidawsk.net>
On Tue, May 28, 2013 at 07:22:34PM -0700, Ben Widawsky wrote:
> From: "Xiang, Haihao" <haihao.xiang@intel.com>
>
> This will let userland only try to use the new ring
> when the appropriate kernel is present
>
> Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
> Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
> Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
So originally I wanted to take a closer look at the interrupt handling
changes before merging them. But somehow my brain was notoriously not up
to the task of reviewing tricky interrupt stuff. Anyway here's my list of
things I've spotted while applying patches:
- Unrelated, but spotted while checking interrupt code:
ironlake_enable_display_irq is not called with the irq_lock held
everywhere, and some are outside of the irq setup/teradown (so real
races). Specifically
commit 8664281b64c457705db72fc60143d03827e75ca9
Author: Paulo Zanoni <paulo.r.zanoni@intel.com>
Date: Fri Apr 12 17:57:57 2013 -0300
drm/i915: report Gen5+ CPU and PCH FIFO underruns
broke stuff. But I guess a full review of the interrupt handling code
should be in order ... At least we should sprinkle assert_spin_locked
harder.
Now the real stuff:
- rmw register access isn't paranoid, but imo fragile. Either we don't
need it, and then it just obfuscates the code (especially with scary
comments around). Or there's indeed a race somewhere, and then rmw is
_really_ good at papering over it. Until it blows up randomly and no one
has a clue why.
So I'm not a fan, and I've pretty much exlcusive just killed them. These
patches add _lots_ of them instead.
- rps.lock could just be killed and existing users switched over to
irq_lock. Would simplify a lot in the interrupt handling. E.g. the
special ring->irqrefcount could just be dropped.
- rps setup is async now (yeah, that's newer than these patches, still). I
think I've seen a few races around that ...
- There's no inconsistencies in the PM rps interrupt setup on snb vs
ivb/hsw. Such inconsistency tend to be fragile (but I haven't spotted
something which would blow up on snb).
- CS_MASTER interrupt handling: None of the other rings seem to enable
this on gen5+. Not sure whether it actually works correctly, I suspect
at least i915_report_and_clear_eir needs some more code ...
- Calling queue_work from the spin_lock protection smells a bit like
cargo-culting (I've reinstated that one since later patches would have
been broken).
- hsw_pm_irq_handler has no need to unconditionally take the spinlock.
Patches are merged for now, but I'm not happy by far.
Cheers, Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
next prev parent reply other threads:[~2013-05-31 18:52 UTC|newest]
Thread overview: 83+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-28 0:59 [PATCH 00/18] Introduce the Haswell VECS Ben Widawsky
2013-04-28 0:59 ` [PATCH 01/18] drm/i915: Comments for semaphore clarification Ben Widawsky
2013-05-07 13:54 ` Damien Lespiau
2013-05-07 16:51 ` Ben Widawsky
2013-05-07 17:00 ` Ben Widawsky
2013-04-28 0:59 ` [PATCH 02/18] drm/i915: Semaphore MBOX update generalization Ben Widawsky
2013-05-07 15:34 ` Damien Lespiau
2013-05-08 5:17 ` Ben Widawsky
2013-04-28 0:59 ` [PATCH 03/18] drm/i915: Introduce VECS: the 4th ring Ben Widawsky
2013-05-07 15:35 ` Damien Lespiau
2013-04-28 0:59 ` [PATCH 04/18] drm/i915: Add VECS semaphore bits Ben Widawsky
2013-05-07 14:49 ` Damien Lespiau
2013-05-08 5:59 ` Ben Widawsky
2013-04-28 0:59 ` [PATCH 05/18] drm/i915: Rename ring flush functions Ben Widawsky
2013-05-07 17:28 ` Damien Lespiau
2013-04-28 0:59 ` [PATCH 06/18] drm/i915: add HAS_VEBOX Ben Widawsky
2013-05-07 14:59 ` Damien Lespiau
2013-04-28 0:59 ` [PATCH 07/18] drm/i915: Vebox ringbuffer init Ben Widawsky
2013-05-07 17:16 ` Damien Lespiau
2013-04-28 0:59 ` [PATCH 08/18] drm/i915: Create a more generic pm handler for hsw+ Ben Widawsky
2013-05-28 13:00 ` Damien Lespiau
2013-04-28 0:59 ` [PATCH 09/18] drm/i915: make PM interrupt writes non-destructive Ben Widawsky
2013-05-28 13:30 ` Damien Lespiau
2013-05-28 18:02 ` Ben Widawsky
2013-04-28 0:59 ` [PATCH 10/18] drm/i915: Create an ivybridge_irq_preinstall Ben Widawsky
2013-05-28 13:37 ` Damien Lespiau
2013-04-28 0:59 ` [PATCH 11/18] drm/i915: Add PM regs to pre install Ben Widawsky
2013-05-28 13:38 ` Damien Lespiau
2013-04-28 0:59 ` [PATCH 12/18] drm/i915: Convert irq_refounct to struct Ben Widawsky
2013-05-28 13:40 ` Damien Lespiau
2013-04-28 0:59 ` [PATCH 13/18] drm/i915: consolidate interrupt naming scheme Ben Widawsky
2013-05-28 14:01 ` Damien Lespiau
2013-05-28 18:50 ` Ben Widawsky
2013-05-29 15:51 ` Damien Lespiau
2013-04-28 0:59 ` [PATCH 14/18] drm/i915: vebox interrupt get/put Ben Widawsky
2013-05-28 14:38 ` Damien Lespiau
2013-04-28 0:59 ` [PATCH 15/18] drm/i915: Enable vebox interrupts Ben Widawsky
2013-05-28 14:52 ` Damien Lespiau
2013-04-28 0:59 ` [PATCH 16/18] drm/i915: add VEBOX into debugfs Ben Widawsky
2013-05-28 15:06 ` Damien Lespiau
2013-05-28 18:44 ` Ben Widawsky
2013-04-28 0:59 ` [PATCH 17/18] drm/i915: add I915_EXEC_VEBOX to i915_gem_do_execbuffer() Ben Widawsky
2013-05-28 15:08 ` Damien Lespiau
2013-04-28 0:59 ` [PATCH 18/18] drm/i915: add I915_PARAM_HAS_VEBOX to i915_getparam Ben Widawsky
2013-05-28 15:10 ` Damien Lespiau
2013-04-30 21:25 ` [PATCH 00/18] Introduce the Haswell VECS Jesse Barnes
2013-05-08 6:13 ` Ben Widawsky
2013-05-09 9:07 ` Li, Zhong
2013-05-29 2:22 ` [PATCH 00/18] Introduce the Haswell VECS v2 Ben Widawsky
2013-05-29 2:22 ` [PATCH 01/18] [v2] drm/i915: Comments for semaphore clarification Ben Widawsky
2013-05-29 16:02 ` Damien Lespiau
2013-05-29 2:22 ` [PATCH 02/18] drm/i915: Semaphore MBOX update generalization Ben Widawsky
2013-05-29 16:05 ` Damien Lespiau
2013-05-29 2:22 ` [PATCH 03/18] drm/i915: Introduce VECS: the 4th ring Ben Widawsky
2013-05-29 19:10 ` Daniel Vetter
2013-05-29 2:22 ` [PATCH 04/18] [v2] drm/i915: Add VECS semaphore bits Ben Widawsky
2013-05-29 16:06 ` Damien Lespiau
2013-05-29 2:22 ` [PATCH 05/18] drm/i915: Rename ring flush functions Ben Widawsky
2013-05-29 2:22 ` [PATCH 06/18] drm/i915: add HAS_VEBOX Ben Widawsky
2013-05-29 2:22 ` [PATCH 07/18] [v2] drm/i915: Vebox ringbuffer init Ben Widawsky
2013-05-29 2:22 ` [PATCH 08/18] drm/i915: Create a more generic pm handler for hsw+ Ben Widawsky
2013-05-29 19:19 ` Daniel Vetter
2013-05-31 18:25 ` Daniel Vetter
2013-05-29 2:22 ` [PATCH 09/18] [v2] drm/i915: Create an ivybridge_irq_preinstall Ben Widawsky
2013-05-29 16:23 ` Damien Lespiau
2013-05-29 19:48 ` Daniel Vetter
2013-05-29 2:22 ` [PATCH 10/18] [v2] drm/i915: Add PM regs to pre/post install Ben Widawsky
2013-05-29 17:04 ` Damien Lespiau
2013-05-29 2:22 ` [PATCH 11/18] [v5] drm/i915: make PM interrupt writes non-destructive Ben Widawsky
2013-05-29 17:02 ` Damien Lespiau
2013-05-29 2:22 ` [PATCH 12/18] drm/i915: Convert irq_refounct to struct Ben Widawsky
2013-05-29 2:22 ` [PATCH 13/18] [v2] drm/i915: consolidate interrupt naming scheme Ben Widawsky
2013-05-29 2:22 ` [PATCH 14/18] [v2] drm/i915: vebox interrupt get/put Ben Widawsky
2013-05-29 2:22 ` [PATCH 15/18] [v3] drm/i915: Enable vebox interrupts Ben Widawsky
2013-05-29 2:22 ` [PATCH 16/18] [v2] drm/i915: add VEBOX into debugfs Ben Widawsky
2013-05-29 16:22 ` [PATCH 16/18] [v3] " Ben Widawsky
2013-05-29 16:44 ` Damien Lespiau
2013-05-29 2:22 ` [PATCH 17/18] drm/i915: add I915_EXEC_VEBOX to i915_gem_do_execbuffer() Ben Widawsky
2013-05-29 2:22 ` [PATCH 18/18] drm/i915: add I915_PARAM_HAS_VEBOX to i915_getparam Ben Widawsky
2013-05-31 18:52 ` Daniel Vetter [this message]
2013-05-31 19:52 ` Ben Widawsky
2013-05-31 20:08 ` Daniel Vetter
-- strict thread matches above, loose matches on Subject: below --
2012-11-06 16:25 [PATCH 00/18] [RFC] Introduce the Haswell VECS Ben Widawsky
2012-11-06 16:25 ` [PATCH 18/18] drm/i915: add I915_PARAM_HAS_VEBOX to i915_getparam Ben Widawsky
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=20130531185229.GC15743@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=ben@bwidawsk.net \
--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