From patchwork Tue Jun 8 08:12:06 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Lutomirski X-Patchwork-Id: 104899 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o588Caw7015597 for ; Tue, 8 Jun 2010 08:13:12 GMT Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A0F1B9E9D5 for ; Tue, 8 Jun 2010 01:12:36 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-pv0-f177.google.com (mail-pv0-f177.google.com [74.125.83.177]) by gabe.freedesktop.org (Postfix) with ESMTP id 9632B9E796 for ; Tue, 8 Jun 2010 01:12:26 -0700 (PDT) Received: by pvg11 with SMTP id 11so1457021pvg.36 for ; Tue, 08 Jun 2010 01:12:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:sender:received:from:date :x-google-sender-auth:message-id:subject:to:content-type; bh=wKzh0VBkweVftEa92ZonYn0QdPJpTyJpLmexfAtdBtU=; b=PxHxRVVnlVBix31XzQjde2QhdXxmfrsDpSUTp5OCpYuqtMatM2l7xXrK7oNVQ9LYYk WBEE9wSN1ZvowOrGpX07IQM00S8EfuTgnXDmvsdlDbkgyE2qFxpI6+2NZYJ+bm47ZFUQ OSL3efJm2Xlm61s9odS0hjaT0wqrABHz64lRc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:from:date:x-google-sender-auth:message-id :subject:to:content-type; b=aMcVhvQgTNbklEg16tmoBSHCKoaOfsOUEVLYvSjK9fv/ku5AlpyFqeGppy86RocMA6 5Zl5cGgRc+lOCEFEvQEpSivtifGCV6WAY16zjvAwHHppdgPRa9Nz2DdTjAkr6CAo278A u2NSxkNguQi3BYfAvACN6RCm9sjN7V5kQYDos= Received: by 10.140.252.6 with SMTP id z6mr12967516rvh.229.1275984746099; Tue, 08 Jun 2010 01:12:26 -0700 (PDT) MIME-Version: 1.0 Received: by 10.141.26.18 with HTTP; Tue, 8 Jun 2010 01:12:06 -0700 (PDT) From: Andrew Lutomirski Date: Tue, 8 Jun 2010 04:12:06 -0400 X-Google-Sender-Auth: mY5SmIXWiBDL_PlcENNAXuUcbNo Message-ID: To: intel-gfx@lists.freedesktop.org Subject: [Intel-gfx] hotplug storms still here X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Tue, 08 Jun 2010 08:13:12 +0000 (UTC) diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c index df6a9cd..58e403a 100644 --- a/drivers/gpu/drm/i915/i915_irq.c +++ b/drivers/gpu/drm/i915/i915_irq.c @@ -903,8 +903,8 @@ irqreturn_t i915_driver_irq_handler(DRM_IRQ_ARGS) (iir & I915_DISPLAY_PORT_INTERRUPT)) { u32 hotplug_status = I915_READ(PORT_HOTPLUG_STAT); - DRM_DEBUG_DRIVER("hotplug event received, stat 0x%08x\n", - hotplug_status); + printk(KERN_ERR "hotplug event received, iir 0x%08x, stat 0x%08x, mask 0x%08x\n", + iir, hotplug_status, dev_priv->hotplug_supported_mask); if (hotplug_status & dev_priv->hotplug_supported_mask) queue_work(dev_priv->wq, &dev_priv->hotplug_work); diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index 77e40cf..3ac3dd8 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c @@ -1172,6 +1172,7 @@ intel_dp_detect(struct drm_connector *connector) struct drm_device *dev = intel_encoder->base.dev; struct drm_i915_private *dev_priv = dev->dev_private; struct intel_dp_priv *dp_priv = intel_encoder->dev_priv; + uint32_t orig_hotplug_en; uint32_t temp, bit; enum drm_connector_status status; @@ -1180,10 +1181,10 @@ intel_dp_detect(struct drm_connector *connector) if (HAS_PCH_SPLIT(dev)) return ironlake_dp_detect(connector); - temp = I915_READ(PORT_HOTPLUG_EN); + orig_hotplug_en = I915_READ(PORT_HOTPLUG_EN); I915_WRITE(PORT_HOTPLUG_EN, - temp | + orig_hotplug_en | DPB_HOTPLUG_INT_EN | DPC_HOTPLUG_INT_EN | DPD_HOTPLUG_INT_EN); @@ -1201,13 +1202,16 @@ intel_dp_detect(struct drm_connector *connector) bit = DPD_HOTPLUG_INT_STATUS; break; default: - return connector_status_unknown; + status = connector_status_unknown; + goto out; } temp = I915_READ(PORT_HOTPLUG_STAT); - if ((temp & bit) == 0) - return connector_status_disconnected; + if ((temp & bit) == 0) { + status = connector_status_disconnected; + goto out; + } status = connector_status_disconnected; if (intel_dp_aux_native_read(intel_encoder, @@ -1217,6 +1221,9 @@ intel_dp_detect(struct drm_connector *connector) if (dp_priv->dpcd[0] != 0) status = connector_status_connected; } + +out: + I915_WRITE(PORT_HOTPLUG_EN, orig_hotplug_en); return status; }