public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Keith Packard <keithp@keithp.com>
To: Chris Wilson <chris@chris-wilson.co.uk>,
	Dave Airlie <airlied@redhat.com>
Cc: intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Enable digital port hotplug on PCH systems
Date: Tue, 20 Sep 2011 09:36:31 -0700	[thread overview]
Message-ID: <yuniponf9ww.fsf@aiko.keithp.com> (raw)
In-Reply-To: <d08817$1gj40m@azsmga001.ch.intel.com>

[-- Attachment #1: Type: text/plain, Size: 1457 bytes --]

On Tue, 20 Sep 2011 17:24:21 +0100, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> On Tue, 20 Sep 2011 08:47:21 -0700, Keith Packard <keithp@keithp.com> wrote:
> > We were relying on the BIOS to set these bits, which doesn't always
> > happen.
> 
> Do we need to clear IRQ bits on uninstall, for example to prevent
> "Interrupt 19: no one cared!" or is that due to a different cause?

Probably a good plan, but of course that's separate from turning on the
hotplug hardware in the PCH. Something like:

diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
index c22823b..adeab2a 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -2044,6 +2044,10 @@ static void ironlake_irq_uninstall(struct drm_device *dev)
 	I915_WRITE(GTIMR, 0xffffffff);
 	I915_WRITE(GTIER, 0x0);
 	I915_WRITE(GTIIR, I915_READ(GTIIR));
+
+	I915_WRITE(SDEIMR, 0xffffffff);
+	I915_WRITE(SDEIER, 0x0);
+	I915_WRITE(SDEIIR, I915_READ(SDEIIR));
 }
 
 static void i915_driver_irq_uninstall(struct drm_device * dev)

> More of a general question really. The patch itself looks good and
> matches against the spec afaics.

I was amused to learn that the BIOS on my machine actually turns on the
hotplug hardware for no good reason, so things 'worked' without this
code on many machines. I wonder how many DP/DVI/HDMI machines aren't
actually doing hotplug today...

-- 
keith.packard@intel.com

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

      reply	other threads:[~2011-09-20 16:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-20 15:47 [PATCH] drm/i915: Enable digital port hotplug on PCH systems Keith Packard
2011-09-20 16:24 ` Chris Wilson
2011-09-20 16:36   ` Keith Packard [this message]

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=yuniponf9ww.fsf@aiko.keithp.com \
    --to=keithp@keithp.com \
    --cc=airlied@redhat.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.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