From: Jesse Barnes <jbarnes@virtuousgeek.org>
To: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Intel Graphics Development <intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH] drm/i915: enable sdvo interrupt on pch platforms
Date: Mon, 10 Dec 2012 13:20:29 -0800 [thread overview]
Message-ID: <20121210132029.6d60c746@jbarnes-desktop> (raw)
In-Reply-To: <1355099838-25466-1-git-send-email-daniel.vetter@ffwll.ch>
On Mon, 10 Dec 2012 01:37:18 +0100
Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> Noticed while strolling through docs. Might make a few dual-link dvi
> users happy(ier).
>
> v2: Remove the unrelated debug hacks in intel_display.c
>
> v3: Preserve register contexts to not upset fastboot or the modeset
> hw state checker.
>
> v4: Actually enable it in the irq handler/postinstall functions, too
>
> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> ---
> drivers/gpu/drm/i915/i915_irq.c | 3 +++
> drivers/gpu/drm/i915/i915_reg.h | 6 ++++--
> drivers/gpu/drm/i915/intel_sdvo.c | 14 +++++++++++++-
> 3 files changed, 20 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
> index d02e022..e9b9460 100644
> --- a/drivers/gpu/drm/i915/i915_irq.c
> +++ b/drivers/gpu/drm/i915/i915_irq.c
> @@ -1910,6 +1910,7 @@ static int ironlake_irq_postinstall(struct drm_device *dev)
> SDE_PORTB_HOTPLUG_CPT |
> SDE_PORTC_HOTPLUG_CPT |
> SDE_PORTD_HOTPLUG_CPT |
> + SDE_SDVOB_HOTPLUG_CPT |
> SDE_GMBUS_CPT |
> SDE_AUX_MASK_CPT);
> } else {
> @@ -1917,6 +1918,7 @@ static int ironlake_irq_postinstall(struct drm_device *dev)
> SDE_PORTB_HOTPLUG |
> SDE_PORTC_HOTPLUG |
> SDE_PORTD_HOTPLUG |
> + SDE_SDVOB_HOTPLUG |
> SDE_GMBUS |
> SDE_AUX_MASK);
> }
> @@ -1979,6 +1981,7 @@ static int ivybridge_irq_postinstall(struct drm_device *dev)
> SDE_PORTB_HOTPLUG_CPT |
> SDE_PORTC_HOTPLUG_CPT |
> SDE_PORTD_HOTPLUG_CPT |
> + SDE_SDVOB_HOTPLUG_CPT |
> SDE_GMBUS_CPT |
> SDE_AUX_MASK_CPT);
> dev_priv->pch_irq_mask = ~hotplug_mask;
I guess this needs fixing on top of your latest hotplug setup changes.
> diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
> index f2a5ea6..d8162f8 100644
> --- a/drivers/gpu/drm/i915/i915_reg.h
> +++ b/drivers/gpu/drm/i915/i915_reg.h
> @@ -1673,7 +1673,7 @@
> #define SDVO_ENABLE (1 << 31)
> #define SDVO_PIPE_B_SELECT (1 << 30)
> #define SDVO_STALL_SELECT (1 << 29)
> -#define SDVO_INTERRUPT_ENABLE (1 << 26)
> +#define SDVO_INTERRUPT_ENABLE_PCH (1 << 23)
Why drop the old one? Not possible to use there too?
> @@ -1085,6 +1085,9 @@ static void intel_sdvo_mode_set(struct drm_encoder *encoder,
> if (!mode)
> return;
>
> + /* Preserve the PCH interrupt enable bit. */
> + sdvox = I915_READ(intel_sdvo->sdvo_reg) & SDVO_INTERRUPT_ENABLE_PCH;
> +
Don't we unconditionally set sdvox later? Do you need to add some
s/=/|=/ later on in sdvo_mode_set?
> /* First, set the input mapping for the first input to our controlled
> * output. This is only correct if we're a single-input device, in
> * which case the first input is the output from the appropriate SDVO
> @@ -2775,9 +2778,18 @@ bool intel_sdvo_init(struct drm_device *dev, uint32_t sdvo_reg, bool is_sdvob)
> /* Only enable the hotplug irq if we need it, to work around noisy
> * hotplug lines.
> */
> - if (intel_sdvo->hotplug_active)
> + if (intel_sdvo->hotplug_active) {
> dev_priv->hotplug_supported_mask |= hotplug_mask;
>
> + if (HAS_PCH_SPLIT(dev)) {
> + u32 temp;
> +
> + temp = I915_READ(intel_sdvo->sdvo_reg);
> + temp &= SDVO_INTERRUPT_ENABLE_PCH;
> + intel_sdvo_write_sdvox(intel_sdvo, temp);
> + }
> + }
Clearing everything but the interrupt enable bit? Or should this be |=?
--
Jesse Barnes, Intel Open Source Technology Center
next prev parent reply other threads:[~2012-12-10 21:20 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-09 21:28 [PATCH] drm/i915: enable sdvo interrupt on pch platforms Daniel Vetter
2012-12-09 21:30 ` Daniel Vetter
2012-12-09 21:35 ` Daniel Vetter
2012-12-10 0:37 ` Daniel Vetter
2012-12-10 21:20 ` Jesse Barnes [this message]
2012-12-10 21:29 ` 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=20121210132029.6d60c746@jbarnes-desktop \
--to=jbarnes@virtuousgeek.org \
--cc=daniel.vetter@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;
as well as URLs for NNTP newsgroup(s).