Received: by 10.223.176.5 with SMTP id f5csp992956wra; Fri, 2 Feb 2018 09:22:41 -0800 (PST) X-Google-Smtp-Source: AH8x226VUHdfE2ZAj1gd6IU9iFpCu8F+ECFTT704iUpnvRIDVshsAKgKhRCkYubjmGfql7i8of8E X-Received: by 10.98.212.26 with SMTP id a26mr40933533pfh.38.1517592161604; Fri, 02 Feb 2018 09:22:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517592161; cv=none; d=google.com; s=arc-20160816; b=JFp6Jy7u+2M4OiM+jP8agWGXtB1IJrpWxyNcqJokpEEQbtm8Z0+1oipsohWhUcHPY6 7qWe+R0KgDGJ5itSYEtd7Ww5fzma8vyQMhZlg1U9dR6Ll8P1mM6MhcpmH9WqpgvIY8KB Aw3g6OZiaczQ9GpUOtp75+e8wCRGi51HP3eIg16RtTuKS7dwgjTJQXF/P6+WLr8QDn1L jCw8am8tGhZiRd25gkcSf/60vqnaek9I43mHzRMTUW01oGI+AuKty6OtuXPvTenkN197 B3mXTijvn3wXOdbzoy9E1a9CkTl5hQQNBiUmnIdu3qPnbXzLnbngCgnVDXWGGA/5M6Xf wdag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=WZwEYmKtPt7Qn0kXEJ3IKl7B/XxrFA4J3PBu7aT17cQ=; b=by02cG0E5kABKi9b78FcdgJGgCaej10+HdW9fanzxzaZ62YsY7Jga1t68hSBz+xr1Z 1rEOJg71RXl6YpR1RHVh2Q0A79YMFmOhkH/vz5AM+ge0SLvfdur0q1dbsgZZAspFWbil jxSfDeAzBb+fDO19kFnd/Alx4IsxqI4y3MNt0TRdFvG5d058f8OymWNgrBKTDy2IfkbO 09tCNk78+QVab5twsxKKVqwfBQF7a2oKUUoptzmcYW2cCLx5HzRqVkRdkCz76eN+4lKY A4KLXO3Css8CF38DJvANdTd+PkGf0BVZkR0zESBWoseoN5LxPsTcgiW1dhKViMM5dZ62 ISOw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v184si18595pgb.832.2018.02.02.09.22.26; Fri, 02 Feb 2018 09:22:41 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753492AbeBBRVU (ORCPT + 99 others); Fri, 2 Feb 2018 12:21:20 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:39158 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753485AbeBBRM4 (ORCPT ); Fri, 2 Feb 2018 12:12:56 -0500 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id E4BE2E27; Fri, 2 Feb 2018 17:12:55 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Stefan Schake , Eric Anholt , Stefan Wahren , Sasha Levin Subject: [PATCH 4.14 127/156] drm/vc4: Move IRQ enable to PM path Date: Fri, 2 Feb 2018 17:58:28 +0100 Message-Id: <20180202140846.119895785@linuxfoundation.org> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180202140840.242829545@linuxfoundation.org> References: <20180202140840.242829545@linuxfoundation.org> User-Agent: quilt/0.65 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Stefan Schake [ Upstream commit ce9caf2f79a5aa170a4b6456a03db639eed9c988 ] We were calling enable_irq on bind, where it was already enabled previously by the IRQ helper. Additionally, dev->irq is not set correctly until after postinstall and so was always zero here, triggering a warning in 4.15. Fix both by moving the enable to the power management resume path, where we know there was a previous disable invocation during suspend. Fixes: 253696ccd613 ("drm/vc4: Account for interrupts in flight") Signed-off-by: Stefan Schake Signed-off-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/1514563543-32511-1-git-send-email-stschake@gmail.com Tested-by: Stefan Wahren Reviewed-by: Eric Anholt Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/vc4/vc4_irq.c | 3 --- drivers/gpu/drm/vc4/vc4_v3d.c | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) --- a/drivers/gpu/drm/vc4/vc4_irq.c +++ b/drivers/gpu/drm/vc4/vc4_irq.c @@ -208,9 +208,6 @@ vc4_irq_postinstall(struct drm_device *d { struct vc4_dev *vc4 = to_vc4_dev(dev); - /* Undo the effects of a previous vc4_irq_uninstall. */ - enable_irq(dev->irq); - /* Enable both the render done and out of memory interrupts. */ V3D_WRITE(V3D_INTENA, V3D_DRIVER_IRQS); --- a/drivers/gpu/drm/vc4/vc4_v3d.c +++ b/drivers/gpu/drm/vc4/vc4_v3d.c @@ -327,6 +327,9 @@ static int vc4_v3d_runtime_resume(struct return ret; vc4_v3d_init_hw(vc4->dev); + + /* We disabled the IRQ as part of vc4_irq_uninstall in suspend. */ + enable_irq(vc4->dev->irq); vc4_irq_postinstall(vc4->dev); return 0;