From nobody Fri Jul 24 21:29:56 2026 Received: from mx07-00376f01.pphosted.com (mx07-00376f01.pphosted.com [185.132.180.163]) (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 48A522F1FED for ; Fri, 24 Jul 2026 14:42:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.132.180.163 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784904171; cv=none; b=m206kJvNK6uAXJAqpyAMQ3jehiNUE16O+gGOjGysPIQFwSHh4TkMvt4Je30DDgmSu7MkL2pGfh3i6qDzk5B6MhcGs0sosn6yS1GS6kYk4Vt00j6m/B3Z4M9rEIdIgDoXp2v8mla9fFwk6OFAQPDSngRtRZZpOT8VhWvdhP12HPI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784904171; c=relaxed/simple; bh=nHIpt78TJSHP/AfTrbsjhzfUBkMaH8UCb1o55oDb600=; h=From:Date:Subject:MIME-Version:Content-Type:Message-ID:To:CC; b=jqNXChyl1ltahYurbbxqQlEXdX6oS5QXKaeNrMRD2B2fhlOY7wSTF7+vrjXfBWpGsvGLfV/Bh+xX00kN+T8I0XMEV3lsHE4ix97YVFERDt11WE/HbNJygyYur1ILp6SNmbR9doCy08Z8NExS10OtZYiHpN2ILm7IWml1HOUYSog= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=imgtec.com; spf=pass smtp.mailfrom=imgtec.com; dkim=pass (2048-bit key) header.d=imgtec.com header.i=@imgtec.com header.b=nYWbogC5; arc=none smtp.client-ip=185.132.180.163 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=imgtec.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=imgtec.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=imgtec.com header.i=@imgtec.com header.b="nYWbogC5" Received: from pps.filterd (m0168889.ppops.net [127.0.0.1]) by mx07-00376f01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 66ODbMS2673068; Fri, 24 Jul 2026 15:42:34 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=imgtec.com; h=cc :content-transfer-encoding:content-type:date:from:message-id :mime-version:subject:to; s=dk201812; bh=J+uDwHmFgPX2hB6XIi8+xEJ mKjxuh68/SDxeqMyzHGw=; b=nYWbogC5BTokF018go1bX/9CM0451/Kd/I7MszY LOWSlApAp0SpFBDDOaI8o/IPzHFxiKPZbkOVyB3oo+F41GIi44vpW/7H6xK/PQ0W gbBrAVQtZaVvzJlLyBsqE7uQhRGx3RQ26DIWHkurtDDs0Dk+8PyOzyeV63LPBE4o TO2jf28ta9aplH6n0WR8I4t5AsmAwGBV3TXYnKSksW2sRn2BMLNqNLoy07dCyXJu 5dgXhAfr8q2WeSnWhWzGBcYu/xkFZcmvXppoEwOJpl5JQgrpP71TiwyeKOiOnDib iMuR9EcgXjL9oBi/Nn3GjBtkFtT465csRkD8sqMWJaD4byQ== Received: from hhmail01.hh.imgtec.org (83-244-153-141.cust-83.exponential-e.net [83.244.153.141]) by mx07-00376f01.pphosted.com (PPS) with ESMTPS id 4fhq52bstc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 24 Jul 2026 15:42:33 +0100 (BST) Received: from [127.0.1.1] (172.25.128.225) by HHMAIL01.hh.imgtec.org (10.100.10.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.43; Fri, 24 Jul 2026 15:42:27 +0100 From: Brajesh Gupta Date: Fri, 24 Jul 2026 20:12:12 +0530 Subject: [PATCH v3] drm/imagination: Update the trace point pvr_job_submit_fw() 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: quoted-printable Message-ID: <20260724-b4-tracepoint-fix-v3-1-8f8e5e8179d3@imgtec.com> X-B4-Tracking: v=1; b=H4sIAMN5Y2oC/33NTQ6CMBCG4auQrq3pHxRceQ/jopYpzAJK2qbRE O5uYaWJcfl+yTyzkggBIZJLtZIAGSP6uYQ8VcSOZh6AYl+aCCYapoWgD0VTMBYWj3OiDp+UOds 1vNdMyJ6UuyVAmQ/zdi89Ykw+vI4Xme/rPy1zyqnTtVbambrj5orTkMCerZ/IzmXxSahfhCgEN KblRqpWduqL2LbtDVMRWLD2AAAA To: Alessio Belle , Luigi Santivetti , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Matt Coster , Alexandru Dadu , Frank Binns CC: , , , Brajesh Gupta X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1784904147; l=2729; i=brajesh.gupta@imgtec.com; s=20260417; h=from:subject:message-id; bh=nHIpt78TJSHP/AfTrbsjhzfUBkMaH8UCb1o55oDb600=; b=coZ4ZkoATX2jfMOdQcAkHPrE7K7RiOmA1JVLxvGQD8gDHnr69JpznHYGrFM544DGPH2nrKyeA Oe5WZuE8rErAfAHID5m120G0H8Lcx/CFTbJ9VnEOkn5YMA6KPFI/PeI X-Developer-Key: i=brajesh.gupta@imgtec.com; a=ed25519; pk=vDcrSP6vOpWKs914T986xUbB/vY0/cU7mRRb16MRkcg= X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNzI0MDEzMyBTYWx0ZWRfX875huRyrg/NB LuO8XjP1OmkW4lu/DfZIlUCBXAGR0B+51HgW6qLHrlo1dHbEC/r+UEhjGSjpF48oDlOHc5enCKl rzNDAeNn0gcymc90ToWF7U8nzavQR0oddu7li4oC+TqbUs8uFQ0/XkE47RnULItZSrlG1o+Zfed wuconu5i0/U1w3VxFYz3uZapuG418EdhbOne6d7yvzc/Ekoa6sFhrU8xsgFA+WJL271m1/PRkf2 KIKB/nJKgs5N+VFA/vhFptKZaMTRwUkI5Yx5Mhu7HopKd8dl4PPauV80zu+tHGnOIsqLSMfSj9M yAoi6HGzTMVAgisD96LbFgi3raNXoVn6+Vcfb+vKC9f9cZVaOftkqFK8I8kFmfZafwAuuLASZNq PtUk6RU3YtKbft5G0LaWbLviQbfL4VvYtHtagljWOF0swg9Qpi0hSjpvKG6Ydvl5VApwK8ZEYVO tCxmWlv4LnrGbpdGOUg== X-Authority-Analysis: v=2.4 cv=B5+JFutM c=1 sm=1 tr=0 ts=6a6379d9 cx=c_pps a=AKOq//PuzOIrVTIF9yBwbA==:117 a=AKOq//PuzOIrVTIF9yBwbA==:17 a=HYrZrZQ_E1YA:10 a=IkcTkHD0fZMA:10 a=RAioF0-LDSMA:10 a=VkNPw1HP01LnGYTKEx00:22 a=kQ-hrUj2-E3RCbRHssb7:22 a=7RYWX5rxfSByPNLylY2M:22 a=VwQbUJbxAAAA:8 a=r_1tXGB3AAAA:8 a=yWxx2l9es2RvQy5cUQQA:9 a=QEXdDO2ut3YA:10 a=t8nPyN_e6usw4ciXM-Pk:22 X-Proofpoint-GUID: dpOy4eFo4QUyml8rjmkr5Lp_lskaBwUf X-Proofpoint-ORIG-GUID: dpOy4eFo4QUyml8rjmkr5Lp_lskaBwUf X-Proofpoint-Spam-Info: AW1haW4tMjYwNzI0MDEzMyBTYWx0ZWRfX0nRb/LvDWTzw aFKQXIUzURHIB78SksFvM35ZU80wtHYyyv98GkcK5q6r6hyRy7pDVFZEJeBtYxa4hFsuDthKpiQ wJZs0kpA4IrqPkjpXQquhmKBUXsu9+A= Trace point pvr_job_submit_fw() is used to trace job submission to the FW. Currently it is recorded when a command is written to the Client circular buffer. Move trace recording after writing command to the Kernel circular buffer to better represent command submission to the FW. Fixes: c1079aebb4de ("drm/imagination: Add support for trace points") Signed-off-by: Brajesh Gupta Signed-off-by: Brajesh Gupta --- Changes in v3: - Reverted back to v1 version as per issue flagged by AI-bot. - v1 version is proper as mentioned in v2 update and correctly mark the submission of job to the Firmware. - Link to v2: https://lore.kernel.org/r/20260724-b4-tracepoint-fix-v2-1-e6a= 81a348394@imgtec.com Changes in v2: - Updated safer trace point recording for fragment job to handle Sashiko-bot reported possible use-after-free case. - Due to depenedency between grometry and fragment jobs, fragment job will not be scheduled till geometry is scheduled so even V1 solution is saf= e. - Link to v1: https://lore.kernel.org/r/20260722-b4-tracepoint-fix-v1-1-f75= 747fa591a@imgtec.com --- drivers/gpu/drm/imagination/pvr_queue.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/imagination/pvr_queue.c b/drivers/gpu/drm/imag= ination/pvr_queue.c index 941c017399fc..d13726401d92 100644 --- a/drivers/gpu/drm/imagination/pvr_queue.c +++ b/drivers/gpu/drm/imagination/pvr_queue.c @@ -726,8 +726,6 @@ static void pvr_queue_submit_job_to_cccb(struct pvr_job= *job) cmd->partial_render_geom_frag_fence.value =3D job->done_fence->seqno - 1; } =20 - trace_pvr_job_submit_fw(job); - /* Submit job to FW */ pvr_cccb_write_command_with_header(cccb, job->fw_ccb_cmd_type, job->cmd_l= en, job->cmd, job->id, job->id); @@ -802,6 +800,9 @@ static struct dma_fence *pvr_queue_run_job(struct drm_s= ched_job *sched_job) job->hwrt, frag_job->fw_ccb_cmd_type =3D=3D ROGUE_FWIF_CCB_CMD_TYPE_FRAG_PR); + + trace_pvr_job_submit_fw(geom_job); + trace_pvr_job_submit_fw(frag_job); } else { struct pvr_queue *queue =3D container_of(job->base.sched, struct pvr_queue, scheduler); @@ -809,6 +810,8 @@ static struct dma_fence *pvr_queue_run_job(struct drm_s= ched_job *sched_job) pvr_cccb_send_kccb_kick(pvr_dev, &queue->cccb, pvr_context_get_fw_addr(job->ctx) + queue->ctx_offset, job->hwrt); + + trace_pvr_job_submit_fw(job); } =20 return dma_fence_get(job->done_fence); --- base-commit: e5320be8a585a9286f231305d0d443d59c24e46c change-id: 20260722-b4-tracepoint-fix-0fc961d7023d Best regards, --=20 Brajesh Gupta