Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Paulo Zanoni <przanoni@gmail.com>
Cc: intel-gfx@lists.freedesktop.org, Paulo Zanoni <paulo.r.zanoni@intel.com>
Subject: Re: [PATCH 00/15] Unify interrupt register init/reset
Date: Wed, 24 Jul 2013 13:52:23 +0200	[thread overview]
Message-ID: <20130724115223.GR5939@phenom.ffwll.local> (raw)
In-Reply-To: <1374618835-28120-1-git-send-email-przanoni@gmail.com>

On Tue, Jul 23, 2013 at 07:33:40PM -0300, Paulo Zanoni wrote:
> From: Paulo Zanoni <paulo.r.zanoni@intel.com>
> 
> Hi
> 
> This patch series is based on emails I sent a few days ago, with subject
> "proposals/questions about the IRQ registers". The biggest goal of the series is
> to have an unified way to initialize/reset IRQ regsiters. After this series,
> when you add new interrupts to our driver you won't need to think about doing
> the correct reads, writes and posting_reads, all you'll need to worry about is
> to call the macros everyone else calls. So now either all the registers are
> initialized correctly or all the registers are initialized wrongly.
> 
> The first 10 patches do all the rework on i915+. The changes should be
> incremental and any non-trivial changes are on separate patches, so bisecting
> regressions should be very easy. It is worth mentioning that patches 2, 6, 9 and
> 10 touch VLV-specific code, and I don't have a way to test this code.
> 
> On my intial patches the i8xx code was changed along with the i915+ code, but
> Ben suggested I shouldn't be touching i8xx code, so patches 11-15 do the i8xx
> work.  I don't know if we really want these patches, but they're here anyway, so
> feel free to give them a NACK, I won't complain. In case we decide to merge the
> patches, git bisect should easily spot regressions.
> 
> Patches tested on Haswell (constant use for 2 weeks), SandyBridge (a few hours
> of usage) and Atom (only booted and then suspend/resumed once).

My first question was why you didn't use name##IMR, name##IER, name##IIR
in the macros, since that would match what we have in -internal and imo
would look more natural. But then I've noticed that for IIR, IER & IMR we
don't have a prefix ... I still think the I in the name looks a bit funny
though (e.g. GTI). Maybe we should add an I915_ prefix then we could
remove the I.

The other thing I'm unclear about is the do_iir flag, which in the end
seems to clear IIR bits in uninstall but not in preinstall. Iirc Ben's
proposal was to do the double IIR clear in preinstall, and I tend to agree
with him. Can you please elaborate on this?

Maybe one patch on top to add some kerneldoc to the new magic macros would
be good so that we can explain once what the thinking between the sequence
is.

Cheers, Daniel
> 

> Thanks,
> Paulo
> 
> Paulo Zanoni (15):
>   drm/i915: add INTEL_IRQ_REG_RESET
>   drm/i915: change how VLV_IIR is reset
>   drm/i915: port i965_irq_uninstall go INTEL_IRQ_REG_RESET
>   drm/i915: really clear the IIR registers
>   drm/i915: add INTEL_IRQ_REG_INIT
>   drm/i915: use INTEL_IRQ_REG_INIT on VLV too
>   drm/i915: reset the IIR registers at preinstall
>   drm/i915: WARN if IIR is not zero at irq_postinstall
>   drm/i915: remove additional zerogin of VLV_IIR at postinstall
>   drm/i915: remove extra clearing of GTIIR from VLV irq preinstall
>   drm/i915: add INTEL_IRQ_REG_RESET16
>   drm/i915: really clear the IIR registers on i8xx
>   drm/i915: add INTEL_IRQ_REG_INIT16
>   drm/i915: reset the i8xx IIR registers at preinstall
>   drm/i915: WARN if IIR is not zero at i8xx irq_postinstall
> 
>  drivers/gpu/drm/i915/i915_irq.c | 144 +++++++++++++++++-----------------------
>  1 file changed, 62 insertions(+), 82 deletions(-)
> 
> -- 
> 1.8.1.2
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

  parent reply	other threads:[~2013-07-24 11:52 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-23 22:33 [PATCH 00/15] Unify interrupt register init/reset Paulo Zanoni
2013-07-23 22:33 ` [PATCH 01/15] drm/i915: add INTEL_IRQ_REG_RESET Paulo Zanoni
2013-07-23 22:33 ` [PATCH 02/15] drm/i915: change how VLV_IIR is reset Paulo Zanoni
2013-07-23 22:33 ` [PATCH 03/15] drm/i915: port i965_irq_uninstall go INTEL_IRQ_REG_RESET Paulo Zanoni
2013-07-24 11:11   ` Chris Wilson
2013-07-24 14:14     ` Paulo Zanoni
2013-07-29 11:47       ` Ville Syrjälä
2013-07-23 22:33 ` [PATCH 04/15] drm/i915: really clear the IIR registers Paulo Zanoni
2013-07-24 11:11   ` Chris Wilson
2013-07-24 13:00     ` Paulo Zanoni
2013-07-24 13:25       ` Chris Wilson
2013-07-23 22:33 ` [PATCH 05/15] drm/i915: add INTEL_IRQ_REG_INIT Paulo Zanoni
2013-07-24 11:13   ` Chris Wilson
2013-07-23 22:33 ` [PATCH 06/15] drm/i915: use INTEL_IRQ_REG_INIT on VLV too Paulo Zanoni
2013-07-23 22:33 ` [PATCH 07/15] drm/i915: reset the IIR registers at preinstall Paulo Zanoni
2013-07-24 11:15   ` Chris Wilson
2013-07-23 22:33 ` [PATCH 08/15] drm/i915: WARN if IIR is not zero at irq_postinstall Paulo Zanoni
2013-07-23 22:33 ` [PATCH 09/15] drm/i915: remove additional zerogin of VLV_IIR at postinstall Paulo Zanoni
2013-07-23 22:33 ` [PATCH 10/15] drm/i915: remove extra clearing of GTIIR from VLV irq preinstall Paulo Zanoni
2013-07-23 22:33 ` [PATCH 11/15] drm/i915: add INTEL_IRQ_REG_RESET16 Paulo Zanoni
2013-07-24 11:18   ` Chris Wilson
2013-07-23 22:33 ` [PATCH 12/15] drm/i915: really clear the IIR registers on i8xx Paulo Zanoni
2013-07-23 22:33 ` [PATCH 13/15] drm/i915: add INTEL_IRQ_REG_INIT16 Paulo Zanoni
2013-07-23 22:33 ` [PATCH 14/15] drm/i915: reset the i8xx IIR registers at preinstall Paulo Zanoni
2013-07-23 22:33 ` [PATCH 15/15] drm/i915: WARN if IIR is not zero at i8xx irq_postinstall Paulo Zanoni
2013-07-24 11:52 ` Daniel Vetter [this message]
2013-07-24 13:10   ` [PATCH 00/15] Unify interrupt register init/reset Paulo Zanoni
2013-07-24 13:16     ` 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=20130724115223.GR5939@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=paulo.r.zanoni@intel.com \
    --cc=przanoni@gmail.com \
    /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