public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Ben Widawsky <ben@bwidawsk.net>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 14/18] drm/i915: vebox interrupt get/put
Date: Wed, 13 Feb 2013 20:28:32 +0100	[thread overview]
Message-ID: <20130213192832.GQ5813@phenom.ffwll.local> (raw)
In-Reply-To: <1352219142-1395-15-git-send-email-ben@bwidawsk.net>

On Tue, Nov 06, 2012 at 04:25:38PM +0000, Ben Widawsky wrote:
> v2: Use the correct lock to protect PM interrupt regs, this was
> accidentally lost from earlier (Haihao)
> Fix return types (Ben)
> 
> CC: Xiang, Haihao <haihao.xiang@intel.com>
> Signed-off-by: Ben Widawsky <ben@bwidawsk.net>

[snip]

> ---
> diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.h b/drivers/gpu/drm/i915/intel_ringbuffer.h
> index b2fe5b4..2a2bd20 100644
> --- a/drivers/gpu/drm/i915/intel_ringbuffer.h
> +++ b/drivers/gpu/drm/i915/intel_ringbuffer.h
> @@ -58,8 +58,9 @@ struct  intel_ring_buffer {
>  	u32		last_retired_head;
>  
>  	struct {
> -		u32	gt;
> -	} irq_refcount;	/* protected by dev_priv->irq_lock */
> +		u32	gt; /*  protected by dev_priv->irq_lock */
> +		u32	pm; /*  protected by dev_priv->rps.lock (sucks) */
> +	} irq_refcount;

So Ben asked me on internal irc to at least ack the irq stuff in his VECS
patches here as a cheap excuse for why he never updated them. I'm ok with
it on a quick read, the #define unification seems to make tons of sense,
and the locking trick here is imo ok, too. Only bikeshed I could have come
up with is to put gt/pm irq_refcount into a union, since for a given ring
we'll never use both. Maybe also add a bigger comment above the
irq_refcount union/struct to explain clearly wtf is going on here.

Cheers, Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

  reply	other threads:[~2013-02-13 19:26 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-06 16:25 [PATCH 00/18] [RFC] Introduce the Haswell VECS Ben Widawsky
2012-11-06 16:25 ` [PATCH 01/18] drm/i915: Comments for semaphore clarification Ben Widawsky
2012-11-07 13:30   ` Jani Nikula
2012-11-06 16:25 ` [PATCH 02/18] drm/i915: Semaphore MBOX update generalization Ben Widawsky
2012-11-07 14:00   ` Jani Nikula
2012-11-06 16:25 ` [PATCH 03/18] drm/i915: Introduce VECS: the 4th ring Ben Widawsky
2012-11-06 16:25 ` [PATCH 04/18] drm/i915: Add VECS semaphore bits Ben Widawsky
2012-11-06 16:25 ` [PATCH 05/18] drm/i915: Rename ring flush functions Ben Widawsky
2012-11-07 14:47   ` Jani Nikula
2012-11-06 16:25 ` [PATCH 06/18] drm/i915: add HAS_VEBOX Ben Widawsky
2012-11-07 14:59   ` Jani Nikula
2012-11-06 16:25 ` [PATCH 07/18] drm/i915: Vebox ringbuffer init Ben Widawsky
2012-11-06 16:25 ` [PATCH 08/18] drm/i915: Create a more generic pm handler for hsw+ Ben Widawsky
2012-11-06 16:25 ` [PATCH 09/18] drm/i915: make PM interrupt writes non-destructive Ben Widawsky
2012-11-07 10:17   ` Chris Wilson
2012-11-07 11:53     ` Ben Widawsky
2012-11-12 19:11   ` [PATCH 09/18 v3] " Ben Widawsky
2012-11-12 19:39     ` [PATCH 09/18 v4] " Ben Widawsky
2012-11-06 16:25 ` [PATCH 10/18] drm/i915: Create an ivybridge_irq_preinstall Ben Widawsky
2012-11-06 16:25 ` [PATCH 11/18] drm/i915: Add PM regs to pre install Ben Widawsky
2012-11-06 16:25 ` [PATCH 12/18] drm/i915: Convert irq_refounct to struct Ben Widawsky
2012-11-06 16:25 ` [PATCH 13/18] drm/i915: consolidate interrupt naming scheme Ben Widawsky
2012-11-06 16:25 ` [PATCH 14/18] drm/i915: vebox interrupt get/put Ben Widawsky
2013-02-13 19:28   ` Daniel Vetter [this message]
2012-11-06 16:25 ` [PATCH 15/18] drm/i915: Enable vebox interrupts Ben Widawsky
2012-11-06 16:25 ` [PATCH 16/18] drm/i915: add VEBOX into debugfs Ben Widawsky
2012-11-06 16:25 ` [PATCH 17/18] drm/i915: add I915_EXEC_VEBOX to i915_gem_do_execbuffer() Ben Widawsky
2012-11-06 16:25 ` [PATCH 18/18] drm/i915: add I915_PARAM_HAS_VEBOX to i915_getparam Ben Widawsky
2012-11-07 12:03 ` [PATCH 00/18] [RFC] Introduce the Haswell VECS Ben Widawsky
  -- strict thread matches above, loose matches on Subject: below --
2013-04-28  0:59 [PATCH 00/18] " Ben Widawsky
2013-04-28  0:59 ` [PATCH 14/18] drm/i915: vebox interrupt get/put Ben Widawsky
2013-05-28 14:38   ` Damien Lespiau

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=20130213192832.GQ5813@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