From: Daniel Vetter <daniel@ffwll.ch>
To: Adam Jackson <ajax@redhat.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: pch_irq_handler -> {ibx, cpt}_irq_handler
Date: Wed, 6 Jun 2012 22:01:50 +0200 [thread overview]
Message-ID: <20120606200150.GG4699@phenom.ffwll.local> (raw)
In-Reply-To: <1339011944-31176-1-git-send-email-ajax@redhat.com>
On Wed, Jun 06, 2012 at 03:45:44PM -0400, Adam Jackson wrote:
> Cougar/Panther Point redefine the bits in SDEIIR pretty completely.
> This function is just debugging, but if we're debugging we probably want
> to be told accurate things instead of lies.
>
> I'm told Lynx Point changes this yet more, but I have no idea how...
>
> Signed-off-by: Adam Jackson <ajax@redhat.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=35103
If no one beats me to it, I'll bspec-check this tomorrow. Thanks for the
patch.
-Daniel
> ---
> drivers/gpu/drm/i915/i915_irq.c | 38 +++++++++++++++++++++++++++++++++++---
> drivers/gpu/drm/i915/i915_reg.h | 35 ++++++++++++++++++++++++++++++++---
> 2 files changed, 67 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
> index 1417660..b1fe0ed 100644
> --- a/drivers/gpu/drm/i915/i915_irq.c
> +++ b/drivers/gpu/drm/i915/i915_irq.c
> @@ -510,7 +510,7 @@ out:
> return ret;
> }
>
> -static void pch_irq_handler(struct drm_device *dev, u32 pch_iir)
> +static void ibx_irq_handler(struct drm_device *dev, u32 pch_iir)
> {
> drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private;
> int pipe;
> @@ -550,6 +550,35 @@ static void pch_irq_handler(struct drm_device *dev, u32 pch_iir)
> DRM_DEBUG_DRIVER("PCH transcoder A underrun interrupt\n");
> }
>
> +static void cpt_irq_handler(struct drm_device *dev, u32 pch_iir)
> +{
> + drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private;
> + int pipe;
> +
> + if (pch_iir & SDE_AUDIO_POWER_MASK_CPT)
> + DRM_DEBUG_DRIVER("PCH audio power change on port %d\n",
> + (pch_iir & SDE_AUDIO_POWER_MASK_CPT) >>
> + SDE_AUDIO_POWER_SHIFT_CPT);
> +
> + if (pch_iir & SDE_AUX_MASK_CPT)
> + DRM_DEBUG_DRIVER("AUX channel interrupt\n");
> +
> + if (pch_iir & SDE_GMBUS_CPT)
> + DRM_DEBUG_DRIVER("PCH GMBUS interrupt\n");
> +
> + if (pch_iir & SDE_AUDIO_CP_REQ_CPT)
> + DRM_DEBUG_DRIVER("Audio CP request interrupt\n");
> +
> + if (pch_iir & SDE_AUDIO_CP_CHG_CPT)
> + DRM_DEBUG_DRIVER("Audio CP change interrupt\n");
> +
> + if (pch_iir & SDE_FDI_MASK_CPT)
> + for_each_pipe(pipe)
> + DRM_DEBUG_DRIVER(" pipe %c FDI IIR: 0x%08x\n",
> + pipe_name(pipe),
> + I915_READ(FDI_RX_IIR(pipe)));
> +}
> +
> static irqreturn_t ivybridge_irq_handler(DRM_IRQ_ARGS)
> {
> struct drm_device *dev = (struct drm_device *) arg;
> @@ -591,7 +620,7 @@ static irqreturn_t ivybridge_irq_handler(DRM_IRQ_ARGS)
>
> if (pch_iir & SDE_HOTPLUG_MASK_CPT)
> queue_work(dev_priv->wq, &dev_priv->hotplug_work);
> - pch_irq_handler(dev, pch_iir);
> + cpt_irq_handler(dev, pch_iir);
>
> /* clear PCH hotplug event before clear CPU irq */
> I915_WRITE(SDEIIR, pch_iir);
> @@ -684,7 +713,10 @@ static irqreturn_t ironlake_irq_handler(DRM_IRQ_ARGS)
> if (de_iir & DE_PCH_EVENT) {
> if (pch_iir & hotplug_mask)
> queue_work(dev_priv->wq, &dev_priv->hotplug_work);
> - pch_irq_handler(dev, pch_iir);
> + if (HAS_PCH_CPT(dev))
> + cpt_irq_handler(dev, pch_iir);
> + else
> + ibx_irq_handler(dev, pch_iir);
> }
>
> if (de_iir & DE_PCU_EVENT) {
> diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
> index 2d49b95..b27bcf6 100644
> --- a/drivers/gpu/drm/i915/i915_reg.h
> +++ b/drivers/gpu/drm/i915/i915_reg.h
> @@ -3313,7 +3313,7 @@
>
> /* PCH */
>
> -/* south display engine interrupt */
> +/* south display engine interrupt: IBX */
> #define SDE_AUDIO_POWER_D (1 << 27)
> #define SDE_AUDIO_POWER_C (1 << 26)
> #define SDE_AUDIO_POWER_B (1 << 25)
> @@ -3349,15 +3349,44 @@
> #define SDE_TRANSA_CRC_ERR (1 << 1)
> #define SDE_TRANSA_FIFO_UNDER (1 << 0)
> #define SDE_TRANS_MASK (0x3f)
> -/* CPT */
> -#define SDE_CRT_HOTPLUG_CPT (1 << 19)
> +
> +/* south display engine interrupt: CPT/PPT */
> +#define SDE_AUDIO_POWER_D_CPT (1 << 31)
> +#define SDE_AUDIO_POWER_C_CPT (1 << 30)
> +#define SDE_AUDIO_POWER_B_CPT (1 << 29)
> +#define SDE_AUDIO_POWER_SHIFT_CPT 29
> +#define SDE_AUDIO_POWER_MASK_CPT (7 << 29)
> +#define SDE_AUXD_CPT (1 << 27)
> +#define SDE_AUXC_CPT (1 << 26)
> +#define SDE_AUXB_CPT (1 << 25)
> +#define SDE_AUX_MASK_CPT (7 << 25)
> #define SDE_PORTD_HOTPLUG_CPT (1 << 23)
> #define SDE_PORTC_HOTPLUG_CPT (1 << 22)
> #define SDE_PORTB_HOTPLUG_CPT (1 << 21)
> +#define SDE_CRT_HOTPLUG_CPT (1 << 19)
> #define SDE_HOTPLUG_MASK_CPT (SDE_CRT_HOTPLUG_CPT | \
> SDE_PORTD_HOTPLUG_CPT | \
> SDE_PORTC_HOTPLUG_CPT | \
> SDE_PORTB_HOTPLUG_CPT)
> +#define SDE_GMBUS_CPT (1 << 17)
> +#define SDE_AUDIO_CP_REQ_C_CPT (1 << 10)
> +#define SDE_AUDIO_CP_CHG_C_CPT (1 << 9)
> +#define SDE_FDI_RXC_CPT (1 << 8)
> +#define SDE_AUDIO_CP_REQ_B_CPT (1 << 6)
> +#define SDE_AUDIO_CP_CHG_B_CPT (1 << 5)
> +#define SDE_FDI_RXB_CPT (1 << 4)
> +#define SDE_AUDIO_CP_REQ_A_CPT (1 << 2)
> +#define SDE_AUDIO_CP_CHG_A_CPT (1 << 1)
> +#define SDE_FDI_RXA_CPT (1 << 0)
> +#define SDE_AUDIO_CP_REQ_CPT (SDE_AUDIO_CP_REQ_C_CPT | \
> + SDE_AUDIO_CP_REQ_B_CPT | \
> + SDE_AUDIO_CP_REQ_A_CPT)
> +#define SDE_AUDIO_CP_CHG_CPT (SDE_AUDIO_CP_CHG_C_CPT | \
> + SDE_AUDIO_CP_CHG_B_CPT | \
> + SDE_AUDIO_CP_CHG_A_CPT)
> +#define SDE_FDI_MASK_CPT (SDE_FDI_RXC_CPT | \
> + SDE_FDI_RXB_CPT | \
> + SDE_FDI_RXA_CPT)
>
> #define SDEISR 0xc4000
> #define SDEIMR 0xc4004
> --
> 1.7.7.6
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Daniel Vetter
Mail: daniel@ffwll.ch
Mobile: +41 (0)79 365 57 48
next prev parent reply other threads:[~2012-06-06 20:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-06 19:45 [PATCH] drm/i915: pch_irq_handler -> {ibx, cpt}_irq_handler Adam Jackson
2012-06-06 20:01 ` Daniel Vetter [this message]
2012-06-06 20:39 ` Eugeni Dodonov
2012-06-06 21:02 ` 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=20120606200150.GG4699@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=ajax@redhat.com \
--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.