From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bali.collaboradmins.com (bali.collaboradmins.com [148.251.105.195]) (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 B362543231B for ; Tue, 11 Aug 2026 10:17:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.251.105.195 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786443492; cv=none; b=lKeo+tKBMRO94RFJHkmVzRVhXi8SkEgrptra/tpCKVaLjCiDGxNnH9GYf7Q6L/6jrBdvNGGfmJDyqu3HBDOZ7w1ET9N8g72HeCOJxYLkhbObjY1DLKpfFL6AbjCTNXGDnG7bUkDkfkqI4fPc/plCN/ppBnMlbxYwUkr4beUrAgQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786443492; c=relaxed/simple; bh=fzLWUDPtqoIwG8+ccSWaLGPju4rxuXjgRSA/ZeNnC6E=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=cxVnMY06cFqEh1TAJZ1kJ5TtI7jg2UaBCvBWQM8fqLXlT5frmYrTVnA2WMSFJ5G5/Qynux6j66K44xxQ6Auma2ie9mWWrj5+G3G9p9Cp3ABvhvz5ivJ6xLnoYEnUBalC4O13f7T5zdp83SRK4SXhMBKb5Xo/2ZN89q4yK9yK14k= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=g8btHzNm; arc=none smtp.client-ip=148.251.105.195 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="g8btHzNm" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1786443468; bh=fzLWUDPtqoIwG8+ccSWaLGPju4rxuXjgRSA/ZeNnC6E=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=g8btHzNmnHcZ/N36x8L0IRMZMWbrhUFj3yteqbte6AGhUy8FuPLgRgOH62j0uYmfx lTBFatH658IgIVBM2aon7TS7NsbAK9ePQn8xVvPrGGaaVXvcciMZmL+WpO4EvJHAMT xznZPv1VXXnnghzKDnh6rMKBMeSaXUNvH2kT93GSI5duRb6/LjIlDDz3cP8Zoi0nxU EIl5OrfaCHnoHQ5Nl4JXNbFgK9ngEuqEqjY1d5+v5f9mIR8r4T8mf4AIMFu7n8EcCH /5nrmFLQ3jyEcSGlK6ueXffHxW7+UEYlkzdcun3GM3RjD4I1Ikncug74FXjHAerI8B 7aw51Sq0VOedg== Received: from fedora-21.home (unknown [100.64.0.11]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: bbrezillon) by bali.collaboradmins.com (Postfix) with ESMTPSA id 287F317E0EF0; Tue, 11 Aug 2026 12:17:48 +0200 (CEST) From: Boris Brezillon Date: Tue, 11 Aug 2026 12:17:36 +0200 Subject: [PATCH v2 02/17] drm/panthor: Further delay reset work enablement 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-Transfer-Encoding: 7bit Message-Id: <20260811-panthor-unplug-fixes-v2-2-6b583e37f9ae@collabora.com> References: <20260811-panthor-unplug-fixes-v2-0-6b583e37f9ae@collabora.com> In-Reply-To: <20260811-panthor-unplug-fixes-v2-0-6b583e37f9ae@collabora.com> To: Steven Price , Liviu Dudau Cc: Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Boris Brezillon X-Mailer: b4 0.15.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1786443466; l=1731; i=boris.brezillon@collabora.com; s=20260429; h=from:subject:message-id; bh=fzLWUDPtqoIwG8+ccSWaLGPju4rxuXjgRSA/ZeNnC6E=; b=v4QUI2eEqCE7l0H1iOl8FYGceTetF0ckuE0U63QSdLYPeVsRHBo+njSpylXOytl3AWnZwOBuZ dkuYk/sZV8nAb9Vb+rBv5HIXPNqDFh3ikRWfqACLMayuod2fQqRR7JA X-Developer-Key: i=boris.brezillon@collabora.com; a=ed25519; pk=eN+ORdOgQY7d5U+0kA8h5bf67XdD8bhKbjD/TCHexSY= There's no point re-enabling the reset work before the DRM device registration succeeds, so move the enable_work() after the point where nothing can fail anymore, and in the unlikely event where a reset was pending, reschedule it. Fixes: 1b8d771fb214 ("drm/panthor: Keep the reset work disabled until everything is initialized") Closes: https://sashiko.dev/#/patchset/20260625-panthor-misc-fixes-v1-0-b67ed973fea6@collabora.com?part=2 Signed-off-by: Boris Brezillon --- drivers/gpu/drm/panthor/panthor_device.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/panthor/panthor_device.c b/drivers/gpu/drm/panthor/panthor_device.c index c41de1b61533..5355c4074f1f 100644 --- a/drivers/gpu/drm/panthor/panthor_device.c +++ b/drivers/gpu/drm/panthor/panthor_device.c @@ -305,9 +305,6 @@ int panthor_device_init(struct panthor_device *ptdev) panthor_gem_init(ptdev); - /* Now that everything is initialized, we can enable the reset work. */ - enable_work(&ptdev->reset.work); - /* ~3 frames */ pm_runtime_set_autosuspend_delay(ptdev->base.dev, 50); pm_runtime_use_autosuspend(ptdev->base.dev); @@ -316,6 +313,14 @@ int panthor_device_init(struct panthor_device *ptdev) if (ret) goto err_disable_autosuspend; + /* Now that everything is initialized, we can enable the reset work. + * If there was a reset pending, clear and reschedule, otherwise the + * reset.pending bit is stuck. + */ + enable_work(&ptdev->reset.work); + if (atomic_read(&ptdev->reset.pending)) + queue_work(ptdev->reset.wq, &ptdev->reset.work); + pm_runtime_put_autosuspend(ptdev->base.dev); return 0; -- 2.55.0