From mboxrd@z Thu Jan 1 00:00:00 1970 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 645B2CA0ED1 for ; Fri, 15 Aug 2025 19:59:18 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CDF3710E964; Fri, 15 Aug 2025 19:59:17 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=igalia.com header.i=@igalia.com header.b="T0YxlGIi"; dkim-atps=neutral Received: from fanzine2.igalia.com (fanzine2.igalia.com [213.97.179.56]) by gabe.freedesktop.org (Postfix) with ESMTPS id 85DD110E964 for ; Fri, 15 Aug 2025 19:59:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com; s=20170329; h=Cc:To:In-Reply-To:References:Message-Id: Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date:From:Sender: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=52+wC+LWr/XqFJrPaJguN9iDPM6LJr7r3zTMXj1ujYI=; b=T0YxlGIipgUeGUEKdyQqzmEiEO Il68CT3bmO1KrUvOXv/O7XkdwmtGmvugqBukea3DfirTNZYG79QW6S5SU0JZKhYAn9uFaBd5X9NgI 5Kg5AVaivtU7J6E8FUEbX6SIbnBpKNIlqh8FlIQYI3dAOE0qfIDLBdw6kdFobA+kkBLjPAO3yd5vC mYIrOt8x2vW51dUTO848PXyR0UjIjGXIdMX8eOkMZn3tZ6duhbU2JDX2JrvXvyMTzbufak/b6UR9h L4ETPCBOd9pt9ixJPzArOpGCGhjbSddo4z9QnCVLS84lovYYX8pxZWl/3QS9mObtTHH/xLe/k925m 1yDpwtZw==; Received: from [177.191.196.76] (helo=[192.168.0.165]) by fanzine2.igalia.com with esmtpsa (Cipher TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim) id 1un0a2-00EoI4-4i; Fri, 15 Aug 2025 21:59:14 +0200 From: =?utf-8?q?Ma=C3=ADra_Canal?= Date: Fri, 15 Aug 2025 16:58:44 -0300 Subject: [PATCH v2 5/6] drm/v3d: Synchronous operations can't timeout MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Message-Id: <20250815-v3d-queue-lock-v2-5-ce37258ffb53@igalia.com> References: <20250815-v3d-queue-lock-v2-0-ce37258ffb53@igalia.com> In-Reply-To: <20250815-v3d-queue-lock-v2-0-ce37258ffb53@igalia.com> To: Melissa Wen , Iago Toral Quiroga , Jose Maria Casanova Crespo , David Airlie , Simona Vetter Cc: kernel-dev@igalia.com, dri-devel@lists.freedesktop.org, =?utf-8?q?Ma=C3=ADra_Canal?= X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=2282; i=mcanal@igalia.com; h=from:subject:message-id; bh=+sZrDrdFnAUnaekXGVkCXcdE+KzFESfZ/TUUB8uONxA=; b=owEBbQGS/pANAwAKAT/zDop2iPqqAcsmYgBon5GAIg7OQO294wHBhJz3cz6vMufkRjSvJ/cYC blpqUPF4/aJATMEAAEKAB0WIQT45F19ARZ3Bymmd9E/8w6Kdoj6qgUCaJ+RgAAKCRA/8w6Kdoj6 qpYyB/0Sf1wf7aDB1l9CrknYuB7sR/oxmJJuzXZ2kXP5A2b6KI5ZkzFtY7Z1HNx+ffLz5sROmcy 3kSE1Wa2n6vRdn2DK063ZgXrbDE4D4cas1FwUcqPq/1emwt+OVIr/1/PrCSPzai1cblj8iMbqi3 +tqFcDkIRfGE4a/WaMVlZfifUMWvGGX+2Pvrge3arTh3ksylOHXlFQM0zWJw3+BE16v1AyI6JhY /fWshBbm63mqReV5melbEUNGra1qd1SiBtKg2utxa8hdxZHQwMjPY6aynZpcvnUHDzza7VoNrVG 0p+sRejPHoJ8ulr3wnrNLdfF9ksEI7Fr806FwQhqR8+cn9O1 X-Developer-Key: i=mcanal@igalia.com; a=openpgp; fpr=F8E45D7D0116770729A677D13FF30E8A7688FAAA X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" CPU jobs and CACHE CLEAN jobs execute synchronously once the DRM scheduler starts running them. Therefore, there is no fence to wait on, neither are those jobs able to timeout. Hence, remove the `timedout_job` hook from the CPU and CACHE CLEAN scheduler ops. Signed-off-by: MaĆ­ra Canal Reviewed-by: Iago Toral Quiroga --- drivers/gpu/drm/v3d/v3d_sched.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/v3d/v3d_sched.c b/drivers/gpu/drm/v3d/v3d_sched.c index 60e251367f42170b30de968682deb6370604db44..d2045d0db12e63bc67bac6a47cabcf746189ea88 100644 --- a/drivers/gpu/drm/v3d/v3d_sched.c +++ b/drivers/gpu/drm/v3d/v3d_sched.c @@ -701,6 +701,7 @@ v3d_cpu_job_run(struct drm_sched_job *sched_job) trace_v3d_cpu_job_end(&v3d->drm, job->job_type); v3d_job_update_stats(&job->base, V3D_CPU); + /* Synchronous operation, so no fence to wait on. */ return NULL; } @@ -716,6 +717,7 @@ v3d_cache_clean_job_run(struct drm_sched_job *sched_job) v3d_job_update_stats(job, V3D_CACHE_CLEAN); + /* Synchronous operation, so no fence to wait on. */ return NULL; } @@ -797,7 +799,7 @@ v3d_render_job_timedout(struct drm_sched_job *sched_job) } static enum drm_gpu_sched_stat -v3d_generic_job_timedout(struct drm_sched_job *sched_job) +v3d_tfu_job_timedout(struct drm_sched_job *sched_job) { struct v3d_job *job = to_v3d_job(sched_job); @@ -837,7 +839,7 @@ static const struct drm_sched_backend_ops v3d_render_sched_ops = { static const struct drm_sched_backend_ops v3d_tfu_sched_ops = { .run_job = v3d_tfu_job_run, - .timedout_job = v3d_generic_job_timedout, + .timedout_job = v3d_tfu_job_timedout, .free_job = v3d_sched_job_free, }; @@ -849,13 +851,11 @@ static const struct drm_sched_backend_ops v3d_csd_sched_ops = { static const struct drm_sched_backend_ops v3d_cache_clean_sched_ops = { .run_job = v3d_cache_clean_job_run, - .timedout_job = v3d_generic_job_timedout, .free_job = v3d_sched_job_free }; static const struct drm_sched_backend_ops v3d_cpu_sched_ops = { .run_job = v3d_cpu_job_run, - .timedout_job = v3d_generic_job_timedout, .free_job = v3d_cpu_job_free }; -- 2.50.1