From patchwork Fri Feb 7 10:08:22 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Kosina X-Patchwork-Id: 3600541 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 8C31A9F2D6 for ; Fri, 7 Feb 2014 10:08:31 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AD7FA2012F for ; Fri, 7 Feb 2014 10:08:30 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 9EE4320120 for ; Fri, 7 Feb 2014 10:08:29 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5212CFB9DD; Fri, 7 Feb 2014 02:08:27 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15]) by gabe.freedesktop.org (Postfix) with ESMTP id D7783FB9DD for ; Fri, 7 Feb 2014 02:08:25 -0800 (PST) Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id BC9D5ABB3; Fri, 7 Feb 2014 10:08:24 +0000 (UTC) Date: Fri, 7 Feb 2014 11:08:22 +0100 (CET) From: Jiri Kosina To: Dave Airlie , Daniel Vetter , Linus Torvalds Subject: Re: [git pull] drm next tree In-Reply-To: Message-ID: References: User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) MIME-Version: 1.0 Cc: Jani Nikula , linux-kernel@vger.kernel.org, DRI mailing list X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Thu, 30 Jan 2014, Jiri Kosina wrote: > > git://people.freedesktop.org/~airlied/linux drm-next > [ ... snip ... ] > > Daniel Vetter (59): > [ ... snip ... ] > > drm/i915: dp aux irq support for g4x/vlv > > This commit causes all kinds of havoc on my ThinkPad x200s. It results in [ ... snip ... ] Not having received any response, I suggest the following for 3.14 From: Jiri Kosina Subject: [PATCH] Revert "drm/i915: dp aux irq support for g4x/vlv" This reverts commit 4aeebd7443e36b0a40032e518a9338f48bd27efc. Conflicts: drivers/gpu/drm/i915/i915_reg.h This commit causes all kinds of havoc on my ThinkPad x200s. It results in irq 16: nobody cared (try booting with the "irqpoll" option) CPU: 0 PID: 0 Comm: swapper/0 Not tainted 3.12.0-00854-g4aeebd7 #1 Hardware name: LENOVO 7470BN2/7470BN2, BIOS 6DET38WW (2.02 ) 12/19/2008 ffff8800795186c0 ffff88007c203e08 ffffffff81582503 ffff88007c203e38 ffffffff810a6a98 ffff88007c203e88 ffff880079518600 0000000000000000 0000000000000010 ffff88007c203e78 ffffffff810a6d43 00000010ffc4af9d Call Trace: [] dump_stack+0x7a/0x97 [] __report_bad_irq+0x38/0xf0 [] note_interrupt+0x1f3/0x240 [] handle_irq_event_percpu+0x142/0x220 [] handle_irq_event+0x49/0x70 [] handle_fasteoi_irq+0x61/0x100 [] handle_irq+0x59/0x150 [] ? _local_bh_enable+0xe/0x10 [] ? irq_enter+0x81/0x90 [] do_IRQ+0x5b/0xe0 [] common_interrupt+0x6f/0x6f [] ? retint_restore_args+0xe/0xe [] ? poll_idle+0x47/0x90 [] ? poll_idle+0x20/0x90 [] ? ktime_get+0x56/0xd0 [] cpuidle_enter_state+0x40/0xd0 [] cpuidle_idle_call+0x10a/0x160 [] arch_cpu_idle+0x9/0x30 [] cpu_idle_loop+0x8b/0x270 [] cpu_startup_entry+0x1e/0x20 [] rest_init+0xd3/0xe0 [] ? csum_partial_copy_generic+0x170/0x170 [] start_kernel+0x3b3/0x461 [] ? repair_env_string+0x58/0x58 [] x86_64_start_reservations+0x1b/0x32 [] x86_64_start_kernel+0x13a/0x141 handlers: [] usb_hcd_irq [usbcore] Disabling IRQ #16 and things go south afterwards (the machine hangs randomly, I/O is horribly slow, etc). Signed-off-by: Jiri Kosina --- drivers/gpu/drm/i915/i915_irq.c | 7 ------- drivers/gpu/drm/i915/i915_reg.h | 5 ----- drivers/gpu/drm/i915/intel_dp.c | 2 +- 3 files changed, 1 insertions(+), 13 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c index 17d8fcb..b7fae5b 100644 --- a/drivers/gpu/drm/i915/i915_irq.c +++ b/drivers/gpu/drm/i915/i915_irq.c @@ -1480,9 +1480,6 @@ static irqreturn_t valleyview_irq_handler(int irq, void *arg) intel_hpd_irq_handler(dev, hotplug_trigger, hpd_status_i915); - if (hotplug_status & DP_AUX_CHANNEL_MASK_INT_STATUS_G4X) - dp_aux_irq_handler(dev); - I915_WRITE(PORT_HOTPLUG_STAT, hotplug_status); I915_READ(PORT_HOTPLUG_STAT); } @@ -3670,10 +3667,6 @@ static irqreturn_t i965_irq_handler(int irq, void *arg) intel_hpd_irq_handler(dev, hotplug_trigger, IS_G4X(dev) ? hpd_status_g4x : hpd_status_i915); - if (IS_G4X(dev) && - (hotplug_status & DP_AUX_CHANNEL_MASK_INT_STATUS_G4X)) - dp_aux_irq_handler(dev); - I915_WRITE(PORT_HOTPLUG_STAT, hotplug_status); I915_READ(PORT_HOTPLUG_STAT); } diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h index a48b7ca..94b4cd5 100644 --- a/drivers/gpu/drm/i915/i915_reg.h +++ b/drivers/gpu/drm/i915/i915_reg.h @@ -2139,11 +2139,6 @@ #define CRT_HOTPLUG_MONITOR_COLOR (3 << 8) #define CRT_HOTPLUG_MONITOR_MONO (2 << 8) #define CRT_HOTPLUG_MONITOR_NONE (0 << 8) -#define DP_AUX_CHANNEL_D_INT_STATUS_G4X (1 << 6) -#define DP_AUX_CHANNEL_C_INT_STATUS_G4X (1 << 5) -#define DP_AUX_CHANNEL_B_INT_STATUS_G4X (1 << 4) -#define DP_AUX_CHANNEL_MASK_INT_STATUS_G4X (7 << 4) - /* SDVO is different across gen3/4 */ #define SDVOC_HOTPLUG_INT_STATUS_G4X (1 << 3) #define SDVOB_HOTPLUG_INT_STATUS_G4X (1 << 2) diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index 5ede4e8..464c047 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c @@ -404,7 +404,7 @@ intel_dp_aux_ch(struct intel_dp *intel_dp, int i, ret, recv_bytes; uint32_t status; int try, precharge, clock = 0; - bool has_aux_irq = true; + bool has_aux_irq = INTEL_INFO(dev)->gen >= 5 && !IS_VALLEYVIEW(dev); uint32_t timeout; /* dp aux is extremely sensitive to irq latency, hence request the