From patchwork Fri Aug 9 19:35:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Anderson X-Patchwork-Id: 13759213 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 CB508C52D7C for ; Fri, 9 Aug 2024 19:39:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=ikxIScfUv2b8NNW6uDWKv1jhmd4Ojs4CUAXyBEP9cr8=; b=s5UQcMqV71h159oNLADiHUgE0S TiJ8ZaUPc2uRivhiQ28P6VYr2XPLK2LfOnileIRY6JEEyb7y61VqH6dwYD1YJXp6i3lGF9kyMUaJh DsZdJNn/JcypIHmoLsLgKGbqsnkCZqUdYhnjiYYLla/6V7p9vKKppGx3rdrK3nr00oT76kwbk4TQW iPTcNWs985VhZFlmtAN4/qobRNoGA9KdfNrhEkqc0kj+6dp68r3sfe/Eb/VgAcP5MJy5UeuEi16iH QIseeFQDJ4kwMeoLsftFcyFpeirnXT5ngjPYgDGalC+f7VN4kgIOgq6FSAcA4lpATl/C779JduzRk TWVUdGOw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1scVSH-0000000COHO-1v7Y; Fri, 09 Aug 2024 19:39:17 +0000 Received: from out-171.mta1.migadu.com ([2001:41d0:203:375::ab]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1scVPa-0000000CNMu-0cIx for linux-arm-kernel@lists.infradead.org; Fri, 09 Aug 2024 19:36:32 +0000 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1723232187; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ikxIScfUv2b8NNW6uDWKv1jhmd4Ojs4CUAXyBEP9cr8=; b=uWKfHF9mVEROSGlYuIMLMnFyS6kri9nglPKCWfrbBwWpFSwEM7iYXO4wMBRQcHqbUt/0cR UJpVlHY3xm542SqnzkYKUqs54yK+wBiHOdqCOXmBivciW9YX+8tzhFJvsx+oBb7/kt7fRj xFCnCUQXZPA/ntcwW2I20Q4BG1f8oWI= From: Sean Anderson To: Laurent Pinchart , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , dri-devel@lists.freedesktop.org Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, David Airlie , Michal Simek , Daniel Vetter , Tomi Valkeinen , Sean Anderson Subject: [PATCH v6 4/8] drm: zynqmp_dp: Convert to a hard IRQ Date: Fri, 9 Aug 2024 15:35:56 -0400 Message-Id: <20240809193600.3360015-5-sean.anderson@linux.dev> In-Reply-To: <20240809193600.3360015-1-sean.anderson@linux.dev> References: <20240809193600.3360015-1-sean.anderson@linux.dev> MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240809_123630_354826_1A38906D X-CRM114-Status: UNSURE ( 9.68 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Now that all of the sleeping work is done outside of the IRQ, we can convert it to a hard IRQ. Shared IRQs may be triggered even after calling disable_irq, so use free_irq instead which removes our callback altogether. Signed-off-by: Sean Anderson Reviewed-by: Tomi Valkeinen --- Changes in v6: - Fix hang upon driver removal Changes in v3: - New drivers/gpu/drm/xlnx/zynqmp_dp.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/xlnx/zynqmp_dp.c b/drivers/gpu/drm/xlnx/zynqmp_dp.c index cec5711c7026..532e103713b3 100644 --- a/drivers/gpu/drm/xlnx/zynqmp_dp.c +++ b/drivers/gpu/drm/xlnx/zynqmp_dp.c @@ -1831,9 +1831,8 @@ int zynqmp_dp_probe(struct zynqmp_dpsub *dpsub) * Now that the hardware is initialized and won't generate spurious * interrupts, request the IRQ. */ - ret = devm_request_threaded_irq(dp->dev, dp->irq, NULL, - zynqmp_dp_irq_handler, IRQF_ONESHOT, - dev_name(dp->dev), dp); + ret = devm_request_irq(dp->dev, dp->irq, zynqmp_dp_irq_handler, + IRQF_SHARED, dev_name(dp->dev), dp); if (ret < 0) goto err_phy_exit; @@ -1858,7 +1857,7 @@ void zynqmp_dp_remove(struct zynqmp_dpsub *dpsub) struct zynqmp_dp *dp = dpsub->dp; zynqmp_dp_write(dp, ZYNQMP_DP_INT_DS, ZYNQMP_DP_INT_ALL); - disable_irq(dp->irq); + devm_free_irq(dp->dev, dp->irq, dp); cancel_work_sync(&dp->hpd_irq_work); cancel_work_sync(&dp->hpd_work);