From nobody Sun Apr 5 18:22:02 2026 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (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 21EDC364E95 for ; Mon, 23 Mar 2026 20:13:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774296784; cv=none; b=SWa1pdXp/rA+KmL9JCNfeu/MGRi7qszHDg4W5JX3MhW6deENV6eQ3JJNGsXLbvjmyaXLJ9hOZI8/RR4yzd8V5FPr+xnqjjEiKX+PGnHpIaTmZ4l0W+aOldSabyVS0+p7wuShtY6qSYjkClLPO/td8HE6ralrdE6xGasKZApmmbw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774296784; c=relaxed/simple; bh=sELChCEzxCGR2Lu27U9noN48qPqz/NrmLFJdIRsmNH8=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=P9OJ/VEQ4OyCe0GFp7O3pP1NS29I4+8Yh96tkt3XAAdLQ512fIEjvTfyhpyWfVfHK3ybSCLeK5tmILwGe5YCC+a/sB27SWkhtS8kuJ/FLjAeXCeWIfUtSOoeC13VHm7ip990hFZhULq1uMpP2rB29HoK+oRZ1i0nqlQaektmwQM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=hb3eSMNd; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=Vi+Jit4k; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="hb3eSMNd"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="Vi+Jit4k" Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 62NHqliC3634578 for ; Mon, 23 Mar 2026 20:13:02 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= vuW6AnATRy0mNRNmrdAu80AS+AJJl14JYp6IvrFFHNQ=; b=hb3eSMNd5wSMQ6e+ EqNiSySNyqMOI7bazhzRGQCNqSYl8WNOUBgNRs1BAxePQvqO0s6cMCGBVbJ/mOhL UR0VZGjVYzaFSseWhchzDnXfXPvkQF4k2rEKJAITTCYmuEhX9Rs5dLaf7qDBoEsN 4YE7pg90XtHwufOTAnG384F6ZgC3Iv7MeLp0FZ9SPih6qECJmA0ymOuPjYn8tP8z /elByFWpjNkRiMX9JTCPccYnIYcBJx2/GFKAZpDcn4TTdWXi+tiSVR0p0dSeHPU5 jKVVXvYP3RhXD305DTU0lxhiNTgMjbqd24heCr872QEJrq+skCy4Yce5r5/Gy0cX ZwYxgQ== Received: from mail-pf1-f200.google.com (mail-pf1-f200.google.com [209.85.210.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4d34k4hwh6-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 23 Mar 2026 20:13:02 +0000 (GMT) Received: by mail-pf1-f200.google.com with SMTP id d2e1a72fcca58-82a6c70f1f8so3900802b3a.0 for ; Mon, 23 Mar 2026 13:13:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1774296782; x=1774901582; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=vuW6AnATRy0mNRNmrdAu80AS+AJJl14JYp6IvrFFHNQ=; b=Vi+Jit4keVX24oiKkWzWh5oFjrp5iTpBTkSAqJe8JwHlpjBByQf3AZb31ID4jZ/xYM ISdCiRtGEQ2P/0hX83ySF14rfE7b1uvtYUB4JXj9uM8gZGnVwgF3ehff2q+Cd0VvPkcT hZBIGrSKQYqCEooHUgzwAOxkJYQ+IOwPZw/XPbKRxhmvRCDPzakNZ8HYIyQAUJuMPTRg AWUylaZ5s1j7Mr+ahjTdFGty7IGpFFmy01pEL8BV7T4xzUCOBo20+ePANI3XhTaZ1mFu qQ1SlDjbdCKz/HOdUe2JpFZcLdS14Ozh4kjcnEJ9O/1TBDzGNgN6zV1xW83pSWH42CJa wYOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774296782; x=1774901582; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=vuW6AnATRy0mNRNmrdAu80AS+AJJl14JYp6IvrFFHNQ=; b=BdodwWOsBXdc5UJYuolJ+qjreXh2jqSdnyiUwL2WgrYhhH4sg5UigfCIjbm7ts154n LDgJhn/5blTBX/7VHYn8tHzft2VuAU+Ehjuq3UdPVLUxx4cWxiSSFMn8dSmFKJtrAcO3 9mA4BlMjrEFDIsM5KT5MLsM5vkgSoqmRDWOgPlMVfecsWQu557MAhlrhG/IrKrlza21/ qLi9JpHAy7gaLaiWyjpWlJdml5XM3xCUgeSqq3Usd11X4WWzoHig6dNAX7lvCqH2eZQY ZfQAgxyD0Dxp58o4qv3wrPPxS8DE7FCL3MOSbVJEDzRBpj4+0g1K/ru3Vy68oYxgydMO YpWw== X-Forwarded-Encrypted: i=1; AJvYcCWAhJjlFWM8QxBbcau/gobJS0dMDzCvcQwNF7TwPsV2PC3GnjdVhYA2TdeI0d8Klp2vjsTYY+Cs1r0G8fI=@vger.kernel.org X-Gm-Message-State: AOJu0YzV5MVj9gX7KzjXgWeQ/5q3uMLEm4Hya508T7dMYU8A5tuzb1cz llYrpKaCzsNY8cz7aJ+fPZbTNa4f8aAoCCLqeiSBWo1xuozOrl9AGM81OU9KkD3wM5VjP7jCjUL oi7R6tW80I4mX2QgoBxvPinJxGxJXNOcz2SuC5wP2K1NUP+jMJhbVROCe9zg85k+1hzQ= X-Gm-Gg: ATEYQzyvOgb0o/kA2SWNp2Yy7DCWm/Vb8HKhaOt/UPuAMUC5kPkuOjtS5sHCjQPB6e8 svcXlCQSbYXnOPnFSFs2G+ylHKu5U/KHYhHokkyEF0p24CFPlYNn6QRnHUi07C33t4uaAU9yOT/ Ux2vG726cPZMEYLXVUfVkYWwJTyOBRzy95SEQXVwfPXdsU/VB8nlhZpFEyTJ+x8tdbbp85Bnmkh y2wmpA8uJplxK3qbUNW3f3JB9ogGsm7Snrffb4VedSMn34PYs1zJuiDE7U5s3YeBslLyhUzPVkN TzV3GUSUHWrYm+cg7hZGLvkAkw/8sUonmh2V3W5JHaEB1obAhoRCnfFcfAYfuiAXTI/SDpkv6ws wLMukxZCy/bzmRO05dk2Xrb0J8TTU82L5isiVM5C4H1SohA== X-Received: by 2002:a05:6a00:4288:b0:81e:7496:f826 with SMTP id d2e1a72fcca58-82a8c302094mr11008578b3a.31.1774296781765; Mon, 23 Mar 2026 13:13:01 -0700 (PDT) X-Received: by 2002:a05:6a00:4288:b0:81e:7496:f826 with SMTP id d2e1a72fcca58-82a8c302094mr11008547b3a.31.1774296781278; Mon, 23 Mar 2026 13:13:01 -0700 (PDT) Received: from hu-akhilpo-hyd.qualcomm.com ([202.46.23.25]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-82b0409d148sm9510738b3a.29.2026.03.23.13.12.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Mar 2026 13:13:00 -0700 (PDT) From: Akhil P Oommen Date: Tue, 24 Mar 2026 01:42:16 +0530 Subject: [PATCH 04/16] drm/msm/a6xx: Add support for Debug HFI Q 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: <20260324-a8xx-gpu-batch2-v1-4-fc95b8d9c017@oss.qualcomm.com> References: <20260324-a8xx-gpu-batch2-v1-0-fc95b8d9c017@oss.qualcomm.com> In-Reply-To: <20260324-a8xx-gpu-batch2-v1-0-fc95b8d9c017@oss.qualcomm.com> To: Rob Clark , Sean Paul , Konrad Dybcio , Dmitry Baryshkov , Abhinav Kumar , Jessica Zhang , Marijn Suijten , David Airlie , Simona Vetter , Antonino Maniscalco , Connor Abbott , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann Cc: linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org, Akhil P Oommen X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1774296753; l=3294; i=akhilpo@oss.qualcomm.com; s=20240726; h=from:subject:message-id; bh=sELChCEzxCGR2Lu27U9noN48qPqz/NrmLFJdIRsmNH8=; b=QRQiVhG4a4bfTyTLpWD25BEfUelIPhhcz/p6tq30dvKOuPYxKYBHwauVgKxvptrDrGtCNHFGA Pu3HSHbAmbHDjw+o2kFeXCyyLk1vAPhXYiw9VIaaOCacIhIu6dHRDSd X-Developer-Key: i=akhilpo@oss.qualcomm.com; a=ed25519; pk=lmVtttSHmAUYFnJsQHX80IIRmYmXA4+CzpGcWOOsfKA= X-Proofpoint-GUID: cULCH_7NNPi6HOeE-1FyQDaWLKncTV2T X-Proofpoint-ORIG-GUID: cULCH_7NNPi6HOeE-1FyQDaWLKncTV2T X-Authority-Analysis: v=2.4 cv=c+imgB9l c=1 sm=1 tr=0 ts=69c19ece cx=c_pps a=mDZGXZTwRPZaeRUbqKGCBw==:117 a=ZePRamnt/+rB5gQjfz0u9A==:17 a=IkcTkHD0fZMA:10 a=Yq5XynenixoA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=Um2Pa8k9VHT-vaBCBUpS:22 a=EUspDBNiAAAA:8 a=a1WYpzXZzT6O6UdPSaAA:9 a=QEXdDO2ut3YA:10 a=zc0IvFSfCIW2DFIPzwfm:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMzIzMDE0OSBTYWx0ZWRfX33nkesYCAkbH oQOOWI/Ayo8pXyxHzmJY9+vXVG1FjPJ7/7UcDQbMLXDmiMAexBNF/isIJ7cGETq3ijuX/pKBC70 8nwe1Og3BW0jYXrLIvzaduJJhKzkJ/1FQ7Wpl3W4fMyNjXc2X8nnzY2EJFkMHg3lwULpJ9CaacC w38lmeBplo8JUPbTsdfTq9XVJAJuC8atT5NHTyiBwpnA25VlE+O4Fi52UEABGL1ivAWfX1x7/Fj HuOl/yhf6ZIEIHRjY7LuT1u3IR072qQu+DkC/cTb5AVevnIyoWET5n0HlA48emKSBXSbFmFhe+X zYF1HSRQO234zERXEm34vDLg9XdKX/ee88Hnd3Y5NVjl5wf31v/X3KPDxq7VHgV8M+T/x1JY3o0 tch/vooGW4NEmFccRxwvoELdA6vIw7Cf27DjvbdcAleKGLQ2A4zRffqqL4uyHXDLmBwGeWfEpZ+ u5n1SeKpRT7DaPKJS8w== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-03-23_05,2026-03-23_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 impostorscore=0 phishscore=0 lowpriorityscore=0 spamscore=0 suspectscore=0 priorityscore=1501 bulkscore=0 adultscore=0 clxscore=1015 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2603050001 definitions=main-2603230149 Add the Debug HFI Queue which contains the F2H messages posted from the GMU firmware. Having this data in coredump is useful to debug firmware issues. Signed-off-by: Akhil P Oommen --- drivers/gpu/drm/msm/adreno/a6xx_gmu.h | 2 +- drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c | 2 +- drivers/gpu/drm/msm/adreno/a6xx_hfi.c | 16 +++++++++++++--- drivers/gpu/drm/msm/adreno/a6xx_hfi.h | 2 ++ 4 files changed, 17 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gmu.h b/drivers/gpu/drm/msm/ad= reno/a6xx_gmu.h index 2af074c8e8cf..dd0614b19aac 100644 --- a/drivers/gpu/drm/msm/adreno/a6xx_gmu.h +++ b/drivers/gpu/drm/msm/adreno/a6xx_gmu.h @@ -110,7 +110,7 @@ struct a6xx_gmu { =20 unsigned long freq; =20 - struct a6xx_hfi_queue queues[2]; + struct a6xx_hfi_queue queues[HFI_MAX_QUEUES]; =20 bool initialized; bool hung; diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c b/drivers/gpu/drm/= msm/adreno/a6xx_gpu_state.c index d2d6b2fd3cba..018c164ad980 100644 --- a/drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c +++ b/drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c @@ -57,7 +57,7 @@ struct a6xx_gpu_state { struct msm_gpu_state_bo *gmu_hfi; struct msm_gpu_state_bo *gmu_debug; =20 - s32 hfi_queue_history[2][HFI_HISTORY_SZ]; + s32 hfi_queue_history[HFI_MAX_QUEUES][HFI_HISTORY_SZ]; =20 struct list_head objs; =20 diff --git a/drivers/gpu/drm/msm/adreno/a6xx_hfi.c b/drivers/gpu/drm/msm/ad= reno/a6xx_hfi.c index 53cfdf4e6c34..2daaa340366d 100644 --- a/drivers/gpu/drm/msm/adreno/a6xx_hfi.c +++ b/drivers/gpu/drm/msm/adreno/a6xx_hfi.c @@ -1056,8 +1056,8 @@ void a6xx_hfi_init(struct a6xx_gmu *gmu) struct a6xx_gmu_bo *hfi =3D &gmu->hfi; struct a6xx_hfi_queue_table_header *table =3D hfi->virt; struct a6xx_hfi_queue_header *headers =3D hfi->virt + sizeof(*table); + int table_size, idx; u64 offset; - int table_size; =20 /* * The table size is the size of the table header plus all of the queue @@ -1076,12 +1076,22 @@ void a6xx_hfi_init(struct a6xx_gmu *gmu) table->active_queues =3D ARRAY_SIZE(gmu->queues); =20 /* Command queue */ + idx =3D 0; offset =3D SZ_4K; - a6xx_hfi_queue_init(&gmu->queues[0], &headers[0], hfi->virt + offset, + a6xx_hfi_queue_init(&gmu->queues[idx], &headers[idx], hfi->virt + offset, hfi->iova + offset, 0); =20 /* GMU response queue */ + idx++; offset +=3D SZ_4K; - a6xx_hfi_queue_init(&gmu->queues[1], &headers[1], hfi->virt + offset, + a6xx_hfi_queue_init(&gmu->queues[idx], &headers[idx], hfi->virt + offset, hfi->iova + offset, gmu->legacy ? 4 : 1); + + /* GMU Debug queue */ + idx++; + offset +=3D SZ_4K; + a6xx_hfi_queue_init(&gmu->queues[idx], &headers[idx], hfi->virt + offset, + hfi->iova + offset, gmu->legacy ? 5 : 2); + + WARN_ON(idx >=3D HFI_MAX_QUEUES); } diff --git a/drivers/gpu/drm/msm/adreno/a6xx_hfi.h b/drivers/gpu/drm/msm/ad= reno/a6xx_hfi.h index 6f9f74a0bc85..19f6eca2c8c9 100644 --- a/drivers/gpu/drm/msm/adreno/a6xx_hfi.h +++ b/drivers/gpu/drm/msm/adreno/a6xx_hfi.h @@ -4,6 +4,8 @@ #ifndef _A6XX_HFI_H_ #define _A6XX_HFI_H_ =20 +#define HFI_MAX_QUEUES 3 + struct a6xx_hfi_queue_table_header { u32 version; u32 size; /* Size of the queue table in dwords */ --=20 2.51.0