From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 63B853B47DE; Mon, 23 Mar 2026 14:05:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774274721; cv=none; b=ogWgcXYtZHaAOhInSXhStPN2id7NWeRpm/zG9fHxmxsTfCT2JwVPxj2a3yxzxb087yw5003iEyCqmR5Pc1+FJ46x4HABzBaH+4neQtginMZbdqtiNtFdh4u/bOIzklaCNuoSgd64KlYivgAr/q6BpEXozVsIqpFSMXBtukF8FBg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774274721; c=relaxed/simple; bh=3nKdF8mhpqLTq434zIp+K0yCTrlsklbttqk27/ovzQU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=pUNaiwFs+awv6mRxRgkEFQaZz1qIVUW+veFMO/LSjj+AZ+I6hazXNsXhLGz0EYHL8BIiO/pLeRlenFNq1411RF3JaXUTjxK3hRgVn2hpWO8FRvodOFD6jaR1ochTZLKRe0qigxlBT2B4VDP/lOSUyu64S6jN2envEgabQOE7YVo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=BZUnf0FM; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="BZUnf0FM" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A5F77C4CEF7; Mon, 23 Mar 2026 14:05:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1774274721; bh=3nKdF8mhpqLTq434zIp+K0yCTrlsklbttqk27/ovzQU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BZUnf0FMvzC9Q5dPKAIOJVok6V7adVPfMadV2Py5N5s9peYER0HxxQZSL+fedbf4p zdbkwRpC1S/BgilhRRnpq4itDDbUxCXLZYQc4KLzuN+OUR/wQ1Icc6fNJDDsMutddY pjt5JDTB0yFfFwKsyEGEutYU6VEcTfRyC4CPAFlk= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Alessio Belle , Matt Coster Subject: [PATCH 6.18 088/212] drm/imagination: Fix deadlock in soft reset sequence Date: Mon, 23 Mar 2026 14:45:09 +0100 Message-ID: <20260323134506.556994236@linuxfoundation.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260323134503.770111826@linuxfoundation.org> References: <20260323134503.770111826@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Alessio Belle commit a55c2a5c8d680156495b7b1e2a9f5a3e313ba524 upstream. The soft reset sequence is currently executed from the threaded IRQ handler, hence it cannot call disable_irq() which internally waits for IRQ handlers, i.e. itself, to complete. Use disable_irq_nosync() during a soft reset instead. Fixes: cc1aeedb98ad ("drm/imagination: Implement firmware infrastructure and META FW support") Cc: stable@vger.kernel.org Signed-off-by: Alessio Belle Reviewed-by: Matt Coster Link: https://patch.msgid.link/20260309-fix-soft-reset-v1-1-121113be554f@imgtec.com Signed-off-by: Matt Coster Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/imagination/pvr_power.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) --- a/drivers/gpu/drm/imagination/pvr_power.c +++ b/drivers/gpu/drm/imagination/pvr_power.c @@ -509,7 +509,16 @@ pvr_power_reset(struct pvr_device *pvr_d } /* Disable IRQs for the duration of the reset. */ - disable_irq(pvr_dev->irq); + if (hard_reset) { + disable_irq(pvr_dev->irq); + } else { + /* + * Soft reset is triggered as a response to a FW command to the Host and is + * processed from the threaded IRQ handler. This code cannot (nor needs to) + * wait for any IRQ processing to complete. + */ + disable_irq_nosync(pvr_dev->irq); + } do { if (hard_reset) {