From nobody Sat Feb 7 19:03:21 2026 Received: from mail-pf1-f180.google.com (mail-pf1-f180.google.com [209.85.210.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DD1F32556E for ; Tue, 2 Dec 2025 21:31:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.180 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764711072; cv=none; b=KRr8mgMc2s/yf6vZiSV3yQSKLcVnZdp6/SM0Dv6IhesgpjPGySC5/VurCCQH/g1Yvk26hYdmrd5fOFS0kb99I+WXxOBXrvhkJ2v4MeIT+kqCo4q72CcYFB4Ifu6b30QTAxWwFcyxgQ95O1nKiQu1bW18YfdW3ahbHXlA0prGXSQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764711072; c=relaxed/simple; bh=EGIrEIrN4S/rYlwTA1062gOm5xsbYyiGtaXKZH08Oq0=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=cw4D1nt3JYkXRY/cOen7UYvK2qYTX9ZyugtEBg2v1oFd2G6n162YHZxD1kx5zR171OF+boMNnzAMuSLzFUPqsYxc9i+Hr9bX3gCfvrxTcVZmRifHcdXKd51xWDiq5stZkd1eXWpJIaLF/w4bMQfx4dhZnaNRAzMmeQDfl0bvu5k= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=U6fFFHR1; arc=none smtp.client-ip=209.85.210.180 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="U6fFFHR1" Received: by mail-pf1-f180.google.com with SMTP id d2e1a72fcca58-7bb3092e4d7so6132459b3a.0 for ; Tue, 02 Dec 2025 13:31:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1764711070; x=1765315870; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=yH5BeOmwEsubUzKm+mTo1kbqOHNBbe73SWrF7jJ44Lo=; b=U6fFFHR1N0Ss/OHLeaxOumGP2ULinn0IjptpsGE31R7F1TJf7CEP9y6a+npWV5+BO/ WzjbJ1EDnhO1uk6aZ9q4dA+TF/B4g1vwn4lwg0Y4AUqmhF/olEDMJIh72C0JsUO3fFO3 FLY2apy3lmJnE6DhOJmaJOWSPQKcmH6IG12ni1Z61uKP9vDNmAYR48m3WozAgwfdFrQ4 aGXZqJNP3gH3US8rp3X1L+GeBeY9YTaY5IL9HM6cAbRDHy7lzISuE4VBHbKXbXoJiiwI YcMJNfPmI8AA6yZ5AMqBBQ36sF4P4JzogNZ7rclQr2pIVkv+RtRqZpWiF6dUBfWW00ef RF5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764711070; x=1765315870; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=yH5BeOmwEsubUzKm+mTo1kbqOHNBbe73SWrF7jJ44Lo=; b=fiRE6SsSyxZzsyLnOvcUKJSiW6WNW/5n4UyL2V5HqHcDLfbpUAjRk0Ch3s9ZfF6B61 JV323Qee97xWmA3j3plFhcBRPTSZe+Xl2wVnVtttg17kgrKTUuNP2yZpQtLfs2PnJnsu YpusqnxnmjKbYlGBVdE21YWGN4gSAZfbE/zEr+0pE4OGNVoravH963tSoNR6QmCaSQRR wvm2e0soJQeg02xHVK6Bu6o3mAqeYBwqpy/ZlF5VlKj9vbP/jDpwtEFMqFPaqmiWe+d5 IpOS7kqLtJPVGq+dkJa8pHhYGf8QTfwIgr3/xRWfA+vFzTykMhMXbwxY60V8cn1aNnWb 2BkA== X-Forwarded-Encrypted: i=1; AJvYcCWLjpmuEnZfdrVARHXfwlVhchc0yYh6RPEUhyFqiD7V1BpAtfMRCJDfJprd6pphv8wQ+LBz6NC44TyIi60=@vger.kernel.org X-Gm-Message-State: AOJu0YzmwSll+bxonre6+adeJtvjWC74gCnvhYMetRMMyzMTrecWC9gD Z1jwbNw74XRyeizlsK8aXtI1xtqQGCFyM/CkPussnQ649pcMLYE3T2rC X-Gm-Gg: ASbGncs4aEzBVsuzr+gMtVpWV749Csk5DChocGx5uMtMbtgi73upEvtmRgu80/7PKDb 89mCl2SO26gb7CEHrTTU8MbRvx8Qf3OH1ha0seKQx+v/A+pTTC6PckdTPAs5ogSGcSp9b6UoHvV QGeAfOTGlquShW9fZjEY51fMvbFjioLORO/VpozRtnSHdKUtqyoycBOBz9qgFbp2GZC7Hvnj2r4 ko9Dq3zqDdr3rbjTahR8VMyC4b+BX6AzN82zGgB/3tTri+P0bsL2Pk3UTi1Dq1eFjCh7n3j3sOB Em03Z4h3l7kfQQqOSrc4OsVCpO+0gu/yWeM/jbn+qaxI3VU/QXH3iKmZ5Da3roQZCmSZiYkCUqp eGsiq6LW9Sry6dI5Elhne+viSnr0NOp2SQVZswZxuzxCCYcucT7883W6N++iigKp2sDGWiVyzRD jZlkDRb7T3Qsi+rIsMP4nULyNOCOKGBMHSIQoaHJMN924= X-Google-Smtp-Source: AGHT+IFLhtBquNW3xKloVQHsX1MZpv5u7WEmUkGX/XE0NZ6v4BvhM0KL2YOk9v5fch5S241BeyuiBw== X-Received: by 2002:a05:6a00:88b:b0:7aa:d434:69d6 with SMTP id d2e1a72fcca58-7c58c7a3e40mr43738305b3a.10.1764711069957; Tue, 02 Dec 2025 13:31:09 -0800 (PST) Received: from localhost (78.31.125.34.bc.googleusercontent.com. [34.125.31.78]) by smtp.gmail.com with UTF8SMTPSA id d2e1a72fcca58-7d15e6e5e2dsm17742194b3a.35.2025.12.02.13.31.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Dec 2025 13:31:09 -0800 (PST) From: Chia-I Wu To: Boris Brezillon , Steven Price , Liviu Dudau , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Grant Likely , Heiko Stuebner , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, ashley.smith@collabora.com Subject: [PATCH v2] drm/panthor: fix queue_reset_timeout_locked Date: Tue, 2 Dec 2025 13:31:02 -0800 Message-ID: <20251202213102.3197965-1-olvaffe@gmail.com> X-Mailer: git-send-email 2.52.0.158.g65b55ccf14-goog Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" queue_check_job_completion calls queue_reset_timeout_locked to reset the timeout when progress is made. We want the reset to happen when the timeout is running, not when it is suspended. Fixes: 345c5b7cc0f85 ("drm/panthor: Make the timeout per-queue instead of p= er-job") Signed-off-by: Chia-I Wu Reviewed-by: Boris Brezillon Reviewed-by: Liviu Dudau --- v2: reset queue->timeout.remaining when suspended (Boris) --- drivers/gpu/drm/panthor/panthor_sched.c | 26 +++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/panthor/panthor_sched.c b/drivers/gpu/drm/pant= hor/panthor_sched.c index 389d508b3848e..95ae42168ce18 100644 --- a/drivers/gpu/drm/panthor/panthor_sched.c +++ b/drivers/gpu/drm/panthor/panthor_sched.c @@ -1052,18 +1052,6 @@ group_is_idle(struct panthor_group *group) return hweight32(inactive_queues) =3D=3D group->queue_count; } =20 -static void -queue_reset_timeout_locked(struct panthor_queue *queue) -{ - lockdep_assert_held(&queue->fence_ctx.lock); - - if (queue->timeout.remaining !=3D MAX_SCHEDULE_TIMEOUT) { - mod_delayed_work(queue->scheduler.timeout_wq, - &queue->timeout.work, - msecs_to_jiffies(JOB_TIMEOUT_MS)); - } -} - static bool group_can_run(struct panthor_group *group) { @@ -1080,6 +1068,20 @@ queue_timeout_is_suspended(struct panthor_queue *que= ue) return queue->timeout.remaining !=3D MAX_SCHEDULE_TIMEOUT; } =20 +static void +queue_reset_timeout_locked(struct panthor_queue *queue) +{ + lockdep_assert_held(&queue->fence_ctx.lock); + + if (queue_timeout_is_suspended(queue)) { + queue->timeout.remaining =3D msecs_to_jiffies(JOB_TIMEOUT_MS); + } else { + mod_delayed_work(queue->scheduler.timeout_wq, + &queue->timeout.work, + msecs_to_jiffies(JOB_TIMEOUT_MS)); + } +} + static void queue_suspend_timeout_locked(struct panthor_queue *queue) { --=20 2.52.0.158.g65b55ccf14-goog