From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D48283F4DFF for ; Fri, 26 Jun 2026 12:42:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782477777; cv=none; b=gAjocmHX45ATbr3ipO0+3DZ43JJ2nKx2Kthao6ZBhYe6b1oUzCZhNPeW6J6iky98UaHwOSunw/N7vGhj4UUz5ZM14j3CAduLTrrXgb1nFCZR6hcbVERYUubeKB9aO+Y/dzcdncPdTZTSx5g0GJKvzzaMHIiMk1tJoYHBXVDOBdI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782477777; c=relaxed/simple; bh=pkJ7hKqsHzdywNID8YI4JJNx0CiKhJYQK75DY9g6CuE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=rFz2r/mrlV1MDvfwI7eIjEGzOjjGsOg9fEEwHyDhVr22LYQVOtdCz6NsRsPUf1rjBSvmLVEUR+HzwzFPG+xjeJ4A63h9MERf8n15GSShWXkHmWthLBiDc11cu06x/lW6ISjSgsVWHTOKb+SEyLa/wer9I3D5QNeLe4gt+gedU9Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b=sntn6bTX; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b="sntn6bTX" Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 7BFC81FCD for ; Fri, 26 Jun 2026 05:42:49 -0700 (PDT) Received: from [192.168.0.1] (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id CF8D43F905 for ; Fri, 26 Jun 2026 05:42:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arm.com; s=foss; t=1782477774; bh=pkJ7hKqsHzdywNID8YI4JJNx0CiKhJYQK75DY9g6CuE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=sntn6bTXjXvp3F3/DaL24HZT9sjONUjjUV5KxIrz0/Yu2yG/b9gVM1vitAxhybxwi E9ZjlP1WWOwdz7I5zH2YkO60H9wluAHpi8pJHidMUp8C25iGSvnJOnwC4X4FhcaTJu kILwwqfvZ3dEVhGSUDcZ1Sxil02XXT6c4Skxg/fo= Date: Fri, 26 Jun 2026 13:42:42 +0100 From: Liviu Dudau To: Boris Brezillon Cc: Steven Price , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Nicolas Frattaroli , Chia-I Wu , Karunika Choo , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 07/11] drm/panthor: Fix panthor_pwr_unplug() Message-ID: References: <20260625-panthor-misc-fixes-v1-0-b67ed973fea6@collabora.com> <20260625-panthor-misc-fixes-v1-7-b67ed973fea6@collabora.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20260625-panthor-misc-fixes-v1-7-b67ed973fea6@collabora.com> On Thu, Jun 25, 2026 at 02:40:33PM +0200, Boris Brezillon wrote: > We can't call panthor_pwr_irq_suspend() if the device is suspended, > or this leads to a hang when the IOMEM region is accessed while the > clks are disabled. Do what other sub-components do and conditionally > call panthor_pwr_irq_suspend() if we know the PWR regbank block is > accessible. > > Fixes: c27787f2b77f ("drm/panthor: Introduce panthor_pwr API and power control framework") > Signed-off-by: Boris Brezillon Reviewed-by: Liviu Dudau Best regards, Liviu > --- > drivers/gpu/drm/panthor/panthor_pwr.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/panthor/panthor_pwr.c b/drivers/gpu/drm/panthor/panthor_pwr.c > index 7c7f424a1436..090362bd700b 100644 > --- a/drivers/gpu/drm/panthor/panthor_pwr.c > +++ b/drivers/gpu/drm/panthor/panthor_pwr.c > @@ -453,7 +453,8 @@ void panthor_pwr_unplug(struct panthor_device *ptdev) > return; > > /* Make sure the IRQ handler is not running after that point. */ > - panthor_pwr_irq_suspend(&ptdev->pwr->irq); > + if (!IS_ENABLED(CONFIG_PM) || pm_runtime_active(ptdev->base.dev)) > + panthor_pwr_irq_suspend(&ptdev->pwr->irq); > > /* Wake-up all waiters. */ > spin_lock_irqsave(&ptdev->pwr->reqs_lock, flags); > > -- > 2.54.0 > -- ==================== | I would like to | | fix the world, | | but they're not | | giving me the | \ source code! / --------------- ¯\_(ツ)_/¯