From patchwork Tue Sep 13 08:53:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 12974574 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 39D45C6FA82 for ; Tue, 13 Sep 2022 08:59:02 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E86B110E674; Tue, 13 Sep 2022 08:58:34 +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 ED51010E668; Tue, 13 Sep 2022 08:58:22 +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 86B5F6133D; Tue, 13 Sep 2022 08:58:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id ADBD7C43145; 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=UOddsd9fTwruKPtHK4PQdX3Aj2bOzBz9H6gKzdOs90A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XJGNN3RMN9Dthdp6C6tKrReVytqgtCRPdimn0nDLv08FKn1FtYzyF4rip8KK0lNNh F0HELeNhruuzY5er2ZM4mCviLpuFSG46ji9GB2djjc4jZRx3D76J/aPxvxAJxr+D96 hGCXEjg06cs4lfKFOidzMfndytS3ze+L2SYjr8TC5OHs71Mpqzhu+su+IxPbFBbBTR cSXq4cfllLOgIK40eZsetHhX8rAszju747dARUyWHrOQ5Y6vNlTLspZZeNur0wLC1D /t9YLhZ5iWpO1AeK6/GZduHdKeuxZmq+T2zY2xcMCOgDj0F2Ee8Q4M6kdjKpBI+Jg2 fiC2v/V2INWJg== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1oY1kI-0002HG-Vn; Tue, 13 Sep 2022 10:58:19 +0200 From: Johan Hovold To: Douglas Anderson , Dmitry Baryshkov , Rob Clark , Abhinav Kumar Subject: [PATCH v2 08/10] drm/msm/hdmi: fix IRQ lifetime Date: Tue, 13 Sep 2022 10:53:18 +0200 Message-Id: <20220913085320.8577-9-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 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 , linux-arm-msm@vger.kernel.org, Bjorn Andersson , freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org, Jernej Skrabec , Stephen Boyd , Johan Hovold , Robert Foss , Andrzej Hajda , Manivannan Sadhasivam , stable@vger.kernel.org, Kuogee Hsieh , Sean Paul , Steev Klimaszewski , 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 HDMI IRQ, which will otherwise remain requested so that the next bind attempt fails when requesting the IRQ a second time. Fix this by tying the device-managed lifetime of the HDMI IRQ to the DRM device so that it is released when bind fails. Fixes: 067fef372c73 ("drm/msm/hdmi: refactor bind/init") Cc: stable@vger.kernel.org # 3.19 Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold Tested-by: Kuogee Hsieh Reviewed-by: Kuogee Hsieh --- drivers/gpu/drm/msm/hdmi/hdmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/msm/hdmi/hdmi.c b/drivers/gpu/drm/msm/hdmi/hdmi.c index a0ed6aa8e4e1..f28fb21e3891 100644 --- a/drivers/gpu/drm/msm/hdmi/hdmi.c +++ b/drivers/gpu/drm/msm/hdmi/hdmi.c @@ -344,7 +344,7 @@ int msm_hdmi_modeset_init(struct hdmi *hdmi, goto fail; } - ret = devm_request_irq(&pdev->dev, hdmi->irq, + ret = devm_request_irq(dev->dev, hdmi->irq, msm_hdmi_irq, IRQF_TRIGGER_HIGH, "hdmi_isr", hdmi); if (ret < 0) {