From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796235320; b=piMDq5qck0bQVlU6GRse7sr13N+kzvoW5hbzSYnclWzUKaBUNmabEuheV+NFQpkWwQGE Cck4CKFdCFBVPqLMOKt3HPtN7KixIxv/xlCfeCjYSdhP9vGmRJshlfvS4UvJqPHKmPwOP C+RgmbIdhg5Y66SeymuRAjNA2KOTo58bXhBCa7iZLzlIHI9ATgddYaHYSYh0kZoC2BMsl ka4hZglm80fTovTr3j1OlR+SAs5CFDGqJXh2jjXFmhzMH4cvVi4U7xiCrZjmMsajSutBy /hnVFdYOp02EotTnnV0/adH5LAs9G7nZMUya8iRvmicls6kQ30YU22JDgRFDDprtN+Q== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796235320; h=Received:DKIM-Signature:From:To:Cc:Subject:In-Reply-To:References: Date:Message-ID:MIME-Version:Content-Type; bh=/gIX2D3xLUZPkh6+InMsRLDAiTsaer0BodXKH/84QfQ=; b=ZF8PKQlKkJvNapzfgOA0/WrooYhIA+o269P4I3yhDKuj30N9kM/iCE7MGkWm+zFzFXdy WOS6mzxnSC5F1DcZ2+rQwl0t5KdSXGAHQYPGF4wHAXWNRafzH9AeAJyN1V5X8lQ8m89Dw g5TneUhTaw7jzKYDcupydBT7kLd9lNKGpoVgi3X+Up2QZTQYo93oWpp8gI4+2qbBsiLIK VPunoe6NF8Dg/Z37BQDqBb/dj3SOZJiRbiRXmd5gu4y0XXq3X1HVLUE38SXggGznO9Jyc UPdebjxRsSZnR+sUtbi/T4Q+loshkLUd8taVRi2klx2Z3V3XxW3lsCdaZEdeAKPp8jA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=gshfx8lk; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with UTF8SMTPS id 3B1F0606A335 for ; Wed, 2 Dec 2026 18:15:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=gshfx8lk Received: by smtp.kernel.org (Postfix) with UTF8SMTPSA id F1A151F00897; Wed, 2 Dec 2026 18:15:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796235320; bh=/gIX2D3xLUZPkh6+InMsRLDAiTsaer0BodXKH/84QfQ=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=gshfx8lk7Td0IYTDw2j3Qk3zteay69Z3b0lwqr3vnBWqZLn8fM7Jn+hqCdvhuIIz6 1CFQI5Xj1BV5bPWr4MxsKkX6GDfSX8ri+uxwGhYyOXv+67Ub+Y8r6eLklEdB9reZJn /GMLcWrsZBIvH8aDhbo//ie6W3C5e6rpRv/Jbm2FtMkp1lAK/NDTXgSg/FdrUfFyJV /mxykNvmKDXEugYh5wivWb3b4xwb63SyqjB2sWiaIHK888axnhilkQxvXI/s7dvkuC U9uoRtjYq/eOgIECu7YH5+2MNhCATTG+Frd1Cqjqf3LJ1uFs+D4GCGe5D+6+bKAqna zqrUo+Rq+nRDA== From: Kevin Hilman To: Jerome Brunet , Lucas Stach , Russell King , Christian Gmeiner , David Airlie , Simona Vetter , Philipp Zabel , Simon Lenain , LECOINTRE Philippe Cc: Tomeu Vizoso , etnaviv@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Jerome Brunet Subject: Re: [PATCH] drm/etnaviv: hold the core in reset while runtime suspended In-Reply-To: <20261030-etnaviv-rpm-reset-v1-1-f45761846329@baylibre.com> References: <20261030-etnaviv-rpm-reset-v1-1-f45761846329@baylibre.com> Date: Wed, 02 Dec 2026 10:15:19 -0800 Message-ID: <7hik1bo8g8.fsf@baylibre.com> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain Jerome Brunet writes: > The reset is asserted at probe and released once, in etnaviv_gpu_init(), > and is never asserted again. Runtime suspend only stops the clocks, and the > power domain may then cut power to the core. On the next runtime resume, > the domain powers the core up again while the reset is still deasserted. > > On the Amlogic A311D NPU, the power domain lifts isolation on a core that > is out of reset, which locks up the SoC on the first runtime resume after > a runtime suspend. Toggling the reset again solves the problem. > > From an existing comment in the driver, the reset must be deasserted with > the clock running, so handle it together with the clocks. Rename the clock > helpers accordingly, as they now handle the reset as well. This way the > reset is properly handled whether or not CONFIG_PM is enabled. > > Fixes: 6bde14ba5f7e ("drm/etnaviv: add optional reset support") > Signed-off-by: Jerome Brunet > --- > This was found while running the MobileNetV1 demo with Teflon on the > Khadas VIM3 (Amlogic A311D). Tested-by: Kevin Hilman Also tested on a Khadas VIM3 (A311D) with mainline (v7.4-rc5+). Without this patch the board hard-locks on the first NPU runtime resume, whether triggered by a job or by writing "on" to power/control; with it, the NPU suspends and resumes cleanly (RESET_NNA held while the NNA domain is off) and Mesa's Teflon test suite completes under runtime PM. Kevin