Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp6319063rwn; Tue, 13 Sep 2022 02:21:14 -0700 (PDT) X-Google-Smtp-Source: AA6agR7d0pGMVN4146liH7+vQ9BxJ3rczK/AMadZ335je6cBEaCSYJAcKGz/b3zPnM6n5CHsWBfE X-Received: by 2002:a05:6402:d06:b0:440:3e9d:77d with SMTP id eb6-20020a0564020d0600b004403e9d077dmr24404577edb.286.1663060874301; Tue, 13 Sep 2022 02:21:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663060874; cv=none; d=google.com; s=arc-20160816; b=AnQPHOpRwRL6JLb2mu5cc8UaaemonlugtqQR2PjHbQOJnzd8bPZr9NPfw8iw7ssrDG rdU6UJpSI7LQDL4xl8kBixA8jsQlcviWuA922SpWOatGSv1GzwrE92F71wwRgulr6JLq iXleRDqiJcHIMsY+8JPm8TiD7OrOkHQ21ZcYKQ6rSBw3IqF0qZo8R3LhYVr+xie4zPtG FsAamRgrgc4IefdNWNVP0GRhaIFUg0vuJoHhKbB4tK7YX7b50y2vO/hKj9h8Hvp4F9ar yVFqWQPxjte4bSzDi0GIf5d7eebmr+3l+UKIbBSOxK3ITPGGY0RA1JJie4GZVDsxnl9q 40uw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Qh4cfrPlHxxGIkWZb0r6kWL5bWCuREvnQcC1s8Vlk6c=; b=qNFmlNxtyUNv+aIpVW9Q5OuoeXj+HD+KHZBL8A1czw3T93m8fu9Rrz4cpZXltFTg/0 DovNlZqfSr4ZZz8+0Mk1XGBVERsLtm2RBB1rxVx1oNIQq/V0d9M7Y+yZTo8adrCAuzs8 YTkeIGwnRJ1tBFS2XoOfb63BWKDOYN7lXmycl4vRm0axWQI42kVULXnd7f36DxokYH7Z Kpj7Kf/qTpx8zVWZWalBsbXkGHBkvhOztRoKKnl+0p1bFJoMiDL+TqN1jEcKQsumS/Y7 1yVSJmPuZnOwPTBpzqeeUtrb07V7ytfPpE+Tmj2vfpBksyFO5YZs7+vj+L98uYlCExKr 8YeQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=JNWJLiFD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b4-20020a0564021f0400b0044f84e9a280si8465425edb.529.2022.09.13.02.20.48; Tue, 13 Sep 2022 02:21:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=JNWJLiFD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231545AbiIMI7J (ORCPT + 99 others); Tue, 13 Sep 2022 04:59:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37130 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231485AbiIMI6Y (ORCPT ); Tue, 13 Sep 2022 04:58:24 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 088F750072; Tue, 13 Sep 2022 01:58:22 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 48FCCB80E3B; Tue, 13 Sep 2022 08:58:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 930BFC43141; Tue, 13 Sep 2022 08:58:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1663059499; bh=CRJa+aCnTW2lozDHsj71EhQscca1SBgRhruw2lgMFWk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JNWJLiFDM491qo/jWE0+OfQgwmdEsHA654+Ahbe0Hpt4JDpkKFzg9BpM20cNIk/wh JMLXgvuy3RkZqFUJAKvHj9uO8LYAOTphp9tGRgadmum8AsjsO/E3xyLZqRP98cLFZQ IQaa0TtmqibuemIgk71NmwMpouZBvkfiod6XXqHPwLT2IWB5xC1eT+DTvTnSTuEWk7 EfjSi76ew3+Z4xsE/U3W602lF3L75Udomq9RbjoFWEF8IavnFHIzR0FgpJvo5Y3i+j jAX/KBDlRhdI+5qqv0YaJKxqAMAAEwCxf2k5hPoRcCCQrESEfKjqgrJKmqNl+1VrSJ JkC/5FEhoKbeg== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1oY1kI-0002HA-OD; Tue, 13 Sep 2022 10:58:18 +0200 From: Johan Hovold To: Douglas Anderson , Dmitry Baryshkov , Rob Clark , Abhinav Kumar Cc: Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Daniel Vetter , Sean Paul , Stephen Boyd , Bjorn Andersson , Manivannan Sadhasivam , Kuogee Hsieh , Steev Klimaszewski , dri-devel@lists.freedesktop.org, linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org, Johan Hovold , stable@vger.kernel.org Subject: [PATCH v2 05/10] drm/msm/dp: fix IRQ lifetime Date: Tue, 13 Sep 2022 10:53:15 +0200 Message-Id: <20220913085320.8577-6-johan+linaro@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220913085320.8577-1-johan+linaro@kernel.org> References: <20220913085320.8577-1-johan+linaro@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Device-managed resources allocated post component bind must be tied to the lifetime of the aggregate DRM device or they will not necessarily be released when binding of the aggregate device is deferred. This is specifically true for the DP IRQ, which will otherwise remain requested so that the next bind attempt fails when requesting the IRQ a second time. Since commit c3bf8e21b38a ("drm/msm/dp: Add eDP support via aux_bus") this can happen when the aux-bus panel driver has not yet been loaded so that probe is deferred. Fix this by tying the device-managed lifetime of the DP IRQ to the DRM device so that it is released when bind fails. Fixes: c943b4948b58 ("drm/msm/dp: add displayPort driver support") Cc: stable@vger.kernel.org # 5.10 Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold --- drivers/gpu/drm/msm/dp/dp_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/msm/dp/dp_display.c b/drivers/gpu/drm/msm/dp/dp_display.c index fbe950edaefe..ba557328710a 100644 --- a/drivers/gpu/drm/msm/dp/dp_display.c +++ b/drivers/gpu/drm/msm/dp/dp_display.c @@ -1258,7 +1258,7 @@ int dp_display_request_irq(struct msm_dp *dp_display) return -EINVAL; } - rc = devm_request_irq(&dp->pdev->dev, dp->irq, + rc = devm_request_irq(dp_display->drm_dev->dev, dp->irq, dp_display_irq_handler, IRQF_TRIGGER_HIGH, "dp_display_isr", dp); if (rc < 0) { -- 2.35.1