From patchwork Mon Sep 12 15:40:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 12973769 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E0174ECAAD5 for ; Mon, 12 Sep 2022 15:42:22 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id AD1B310E5C2; Mon, 12 Sep 2022 15:42:16 +0000 (UTC) Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by gabe.freedesktop.org (Postfix) with ESMTPS id 738EA10E5C2; Mon, 12 Sep 2022 15:41:28 +0000 (UTC) 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 dfw.source.kernel.org (Postfix) with ESMTPS id B0D326125C; Mon, 12 Sep 2022 15:41:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E9C72C4347C; Mon, 12 Sep 2022 15:41:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1662997286; bh=Q+bfFqjYpYH8FLx0wDO8gWAsRaCXfRayuVMg8azBXGI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Za3sazuEvM92RtTsY538WlS+mfRdLOvYX9RyzhnwsAXvTz7XN1H6miDFoiegEBIJU V7tZWti+3bCBjczUbC4Rg2UofCZv/qjq8F4+2L5Ij4Y8e3fLmnSMQ7E7a7o/pAt2z/ aari64ZgyABmQKrV+5lSonZmhQgsoXRt5KYKCwkZ1bqW8LjBTX/Jbp6W36yBw8UgVH e3l7qmnR0gZmYEEK9I42vshA7aB0AVWhEUGTIoapr/Oc7AcvjMktZJb7wdSjpS5FSZ 8PQL+FhWiVfjmb4vE69nvlHNic83Nj21b7VtxMwAb5GPg7AE53bATQGPRpZx0JFHeB 2VzqBxzmmf+xw== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1oXlYp-0003Ms-Bi; Mon, 12 Sep 2022 17:41:23 +0200 From: Johan Hovold To: Douglas Anderson , Dmitry Baryshkov , Rob Clark Subject: [PATCH 3/7] drm/msm/dp: fix IRQ lifetime Date: Mon, 12 Sep 2022 17:40:42 +0200 Message-Id: <20220912154046.12900-4-johan+linaro@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220912154046.12900-1-johan+linaro@kernel.org> References: <20220912154046.12900-1-johan+linaro@kernel.org> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: dri-devel@lists.freedesktop.org, Neil Armstrong , Jonas Karlman , David Airlie , linux-arm-msm@vger.kernel.org, Bjorn Andersson , linux-kernel@vger.kernel.org, Jernej Skrabec , Stephen Boyd , Robert Foss , Andrzej Hajda , Manivannan Sadhasivam , stable@vger.kernel.org, freedreno@lists.freedesktop.org, Sean Paul , Johan Hovold , Laurent Pinchart Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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 Signed-off-by: Johan Hovold Reviewed-by: Dmitry Baryshkov --- 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) {