From nobody Mon Feb 9 09:32:37 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 5F08332BF5B for ; Thu, 13 Nov 2025 23:30:32 +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=1763076634; cv=none; b=HNM7z3qQ1ZiAQS56NV1PsLOMIFw7JDAOKMkuub/xNwL2tYor0250bNcHPoIe+KeOqnr5FQBYIzMkJHTSIxH6vfGUfrLCA8Q7Godv2XmFqRhoIn+1eKvYi8xWIij6kOTHfp+4W/u6VwhZC5aD8fUBMLuv+VgwrVy5XDTMNESFSNw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763076634; c=relaxed/simple; bh=IGpokplXYyShZVLotE0neZI18HJLZ3KUnvDyUGOCvso=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=MZSRkFdSHAtaInSou9HVkxbNLuNAxEDi9PS8LXy32hPKgxwAa1Fa04hlEM7hLYzvlwfk+ycSrZ14uFk/x7axyTMZmTT8xxmz80w+JznAF5xUCgZNIwBAn47CbLX45WbjaGXdWDXfzZnyT6pB/2H5rrCEe5/wRMXRbNCuIOen/1Q= 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=ImtBloQj; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=EN0PdBwF; 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="ImtBloQj"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="EN0PdBwF" Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 5ADMadRp1484507 for ; Thu, 13 Nov 2025 23:30:31 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= gcf5l/K/LPI1X3Fga8TbV7X9VmsrDisI7kJ0hOFQ884=; b=ImtBloQjs3VbC6QK +PNa3ucCYR4LChcWkDL/0pay7FCkI0Fitv0oEgepxh7a/E3b6ekwOE+DGRXVibez X7soR84lC1lKKXaCC2LPLCF9klr0oQeh7LByi5aTu6q+Ism8XJZPw2J/w9lWfy6S dQsLilzzvYJ7gnyNxXYr6Y180sB04B6Psjr94kBYn1woDUMeaG+bqj8l3LJ8kGs6 Aai/RoKT1uX97Gqtp4lvZVVW2tE3qAUjybkZz3hWqpP9cIhgNMcxdbY+LKtoliYT aI93A+BVCxjvtZMd46+GH/lXu9lnC4+DJO58L1Is55xfTOpguZfkgGeG75LJI0DO +gSemw== Received: from mail-pg1-f198.google.com (mail-pg1-f198.google.com [209.85.215.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4adr9cg45a-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Thu, 13 Nov 2025 23:30:31 +0000 (GMT) Received: by mail-pg1-f198.google.com with SMTP id 41be03b00d2f7-b630b4d8d52so1167384a12.3 for ; Thu, 13 Nov 2025 15:30:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1763076631; x=1763681431; 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=gcf5l/K/LPI1X3Fga8TbV7X9VmsrDisI7kJ0hOFQ884=; b=EN0PdBwFmw6IJpo19utQMgjKMxb6GxRDf3mxpvBLtA5terDNhiH4sJpe5ljO3Mk6Xt aOJ+MLNSDnnANrN+B3XIuTyd2N6zEPty0spE0AlGu6hHwDm4BRON+I5pBXG2Fdkc94F0 Q9Qa8kHYHdVyK50Vi9fd6+BsjgDr/wvc47yw8H1a8Uu5MbGyRiI/fV64GksTr6d3zW+E 9AQkHMe+DpgxcvP+xRkb5qFHiV2syNqIc0M9cebbPvj21LeSla+ILVBoHmz0EI633Hac JGHxPnTcAcBiMJLo3iBZ08puvA+zszXFzHNtXb41YpavCEosis51AXuaagT3HknL7KdS 0BbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763076631; x=1763681431; 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=gcf5l/K/LPI1X3Fga8TbV7X9VmsrDisI7kJ0hOFQ884=; b=ub/+EjWlSLdp4nBii1lWfPu4sGXDs7hqqtR1pfQGvZFtqQFsrXwWgOV5xwFjG/exB+ g27+bVyi6BVdZSnzyZUbA5vWAQSxACdWcQ4h51gJ2jl4MdooK9KUPtZ8/HKxC+syaELK rojYPEqqQniMi3H1azGohtjy2b69d3jqToIAzbmJQGM6Ca1WqqgYRB/gWGBVtKFS1dtp +sgp6h8WZ754AVA4dBFag9dLyqn/9l6oyt5nWRDPxPDhO397d2zdCJ1ei/1s6KZhKYuY 9KZ0e1yoyTdo+Tr69KTdoBYTc9DjbmU/6AGOzVMJeIgfB+wnzalHIgMcVqMFkJRJgicm 9hKQ== X-Forwarded-Encrypted: i=1; AJvYcCVhzmqrGzvcSFzTib4CUj7ADVG3Zqhu4tNP89CmT1rtWNxIr31Ch8re5GBmMkls80YHiUgYzIGTfprs3GU=@vger.kernel.org X-Gm-Message-State: AOJu0YzXWESokPhoIIbMKqY34KpWa2PD8K/04gyOAeP9PUk/b5nF6ayo Xpg8Hv6AZTZlMca3scvHU+2CvRW9TzH+ivNynL9LPZuK7Umi4nvPs/55EUCmvSF+VnfMgKi7i7v 5nYfUu24l7uvvoKc3D2bOL/u9VfsPWJHV+1rNe7kazQ4OheU53giunIUgBQIDwCrOopg= X-Gm-Gg: ASbGncsLv0cpTtMgFpFK+tqVN72b6+Cp8FGuSEMrHFVJmIAZesKPscHY9dM7guWIb0P EnF9s5ZX85auSVCa7Pf9PSGQpvhijif/GFgd6GOsdUeOQdLdomSpZ4XWUABjVE7reacUa/HhR7I qq2d/Vf+Cd6lDyZu+IhggYXQOoVez4Zfob11JSGYNZAQtFarnlN16hUmdIHk2J1Fr7gExDi/kzb oQp0nBjh2QOASOjp/JrJQIakHTtF35tApguNd2jY/VUwU9k1IS5h2jY2t//e6OUZfF3UGwKo/a4 iwD1eiPqGXk7gwpCu1m8Mho93qkyvKI1CrMTzFAwC3vY7HjZneXo1eR+lZAYfAPQBfz3CYIQMKl mqOcsv6OZLdYZhaF5xWecm54= X-Received: by 2002:a05:6a20:7f81:b0:334:7bce:8394 with SMTP id adf61e73a8af0-35ba2c7f49fmr1558597637.51.1763076630331; Thu, 13 Nov 2025 15:30:30 -0800 (PST) X-Google-Smtp-Source: AGHT+IFF7D8yPEUPkp+NbY22BN0Y1kfgJd40q6G3P0giPrxIE2bqHGm6311EF07g9YkzAqUjbYGJXQ== X-Received: by 2002:a05:6a20:7f81:b0:334:7bce:8394 with SMTP id adf61e73a8af0-35ba2c7f49fmr1558536637.51.1763076629730; Thu, 13 Nov 2025 15:30:29 -0800 (PST) Received: from hu-akhilpo-hyd.qualcomm.com ([202.46.23.25]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-bc36ed72cd1sm3049486a12.11.2025.11.13.15.30.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Nov 2025 15:30:29 -0800 (PST) From: Akhil P Oommen Date: Fri, 14 Nov 2025 04:59:03 +0530 Subject: [PATCH v3 06/20] drm/msm/adreno: Move gbif_halt() to adreno_gpu_func 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: <20251114-kaana-gpu-support-v3-6-92300c7ec8ff@oss.qualcomm.com> References: <20251114-kaana-gpu-support-v3-0-92300c7ec8ff@oss.qualcomm.com> In-Reply-To: <20251114-kaana-gpu-support-v3-0-92300c7ec8ff@oss.qualcomm.com> To: Rob Clark , Bjorn Andersson , Konrad Dybcio , Sean Paul , Dmitry Baryshkov , Abhinav Kumar , Jessica Zhang , Marijn Suijten , David Airlie , Simona Vetter , Jonathan Marek , Jordan Crouse , Will Deacon , Robin Murphy , Joerg Roedel , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Connor Abbott Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, iommu@lists.linux.dev, devicetree@vger.kernel.org, Akhil P Oommen , Dmitry Baryshkov X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1763076574; l=3572; i=akhilpo@oss.qualcomm.com; s=20240726; h=from:subject:message-id; bh=IGpokplXYyShZVLotE0neZI18HJLZ3KUnvDyUGOCvso=; b=NVUVcDEzAp6sPGf+/YDVc97AOPQtMk6i7AKTEir8UVywiJ16mJrlqBXgy1BYJHHWn73Ng1nrJ TotY0EkaIRQAalvppoalIedeEivFRiO8/utpOvZ946ECcbG8esPdnuq X-Developer-Key: i=akhilpo@oss.qualcomm.com; a=ed25519; pk=lmVtttSHmAUYFnJsQHX80IIRmYmXA4+CzpGcWOOsfKA= X-Proofpoint-GUID: e1gU9GpMDxGoNJA_OEgqDPAdyn2ivPnu X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUxMTEzMDE4NSBTYWx0ZWRfX5/NXh7YUWn71 tAMM+pJOSu6StFBvt9PtGp9Rw6lHhr3Wc37qfkLHVnFhdOcRYWFJ9Iw8QngfO3WMRnF1pYJvq7e nz6MxkH2IQZQl0SZcRV43RJtJU1kcc2xZJyauwL6JDp13NL4tQcymrJVY6UFzKT/5fK4YONuMYr ANC1HBrBY3QZJBW8Q35k5w37B01/ZvwCFhgbrPEk9IR+PIn/dmKbkwRBloV6IgR6Utzd93kyezw QGw1+0UUtC2iInbaCsRipqeq64IBIr4rIezP3PjWGCz3vDfAImQetcllTJVD+mEfqVJUEzedWux ZRVzYWTqr6PxqMVn8yCRWI4TAxU2xRMXJjPhgQSWQnHzlE5Ae0ofRJpkUtlP1jzWOJp3OeLRgDR cp8X3ugv0p8ycl5lcmtfIWbdsCOf6g== X-Authority-Analysis: v=2.4 cv=MNdtWcZl c=1 sm=1 tr=0 ts=69166a17 cx=c_pps a=Qgeoaf8Lrialg5Z894R3/Q==:117 a=ZePRamnt/+rB5gQjfz0u9A==:17 a=IkcTkHD0fZMA:10 a=6UeiqGixMTsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=EUspDBNiAAAA:8 a=W_sW28Yvd0frASqVc48A:9 a=+jEqtf1s3R9VXZ0wqowq2kgwd+I=:19 a=QEXdDO2ut3YA:10 a=x9snwWr2DeNwDh03kgHS:22 X-Proofpoint-ORIG-GUID: e1gU9GpMDxGoNJA_OEgqDPAdyn2ivPnu X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.9,FMLib:17.12.100.49 definitions=2025-11-13_06,2025-11-13_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 suspectscore=0 priorityscore=1501 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 adultscore=0 malwarescore=0 phishscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2510240001 definitions=main-2511130185 Move the gbif halt fn to adreno_gpu_func so that we can call different implementation from common code. This will come handy when we implement A8x layer. Reviewed-by: Dmitry Baryshkov Signed-off-by: Akhil P Oommen --- drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 4 ++-- drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 7 +++++-- drivers/gpu/drm/msm/adreno/adreno_gpu.h | 1 + 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gmu.c b/drivers/gpu/drm/msm/ad= reno/a6xx_gmu.c index 605bb55de8d5..306fc08492e4 100644 --- a/drivers/gpu/drm/msm/adreno/a6xx_gmu.c +++ b/drivers/gpu/drm/msm/adreno/a6xx_gmu.c @@ -1053,7 +1053,7 @@ static void a6xx_gmu_force_off(struct a6xx_gmu *gmu) /* Halt the gmu cm3 core */ gmu_write(gmu, REG_A6XX_GMU_CM3_SYSRESET, 1); =20 - a6xx_bus_clear_pending_transactions(adreno_gpu, true); + adreno_gpu->funcs->bus_halt(adreno_gpu, true); =20 /* Reset GPU core blocks */ a6xx_gpu_sw_reset(gpu, true); @@ -1225,7 +1225,7 @@ static void a6xx_gmu_shutdown(struct a6xx_gmu *gmu) if (ret) goto force_off; =20 - a6xx_bus_clear_pending_transactions(adreno_gpu, a6xx_gpu->hung); + adreno_gpu->funcs->bus_halt(adreno_gpu, a6xx_gpu->hung); =20 /* tell the GMU we want to slumber */ ret =3D a6xx_gmu_notify_slumber(gmu); diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c b/drivers/gpu/drm/msm/ad= reno/a6xx_gpu.c index e9a0ee1262cc..9c6af226b076 100644 --- a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c +++ b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c @@ -1580,7 +1580,7 @@ static void a6xx_recover(struct msm_gpu *gpu) =20 if (adreno_has_gmu_wrapper(adreno_gpu)) { /* Drain the outstanding traffic on memory buses */ - a6xx_bus_clear_pending_transactions(adreno_gpu, true); + adreno_gpu->funcs->bus_halt(adreno_gpu, true); =20 /* Reset the GPU to a clean state */ a6xx_gpu_sw_reset(gpu, true); @@ -2291,7 +2291,7 @@ static int a6xx_pm_suspend(struct msm_gpu *gpu) mutex_lock(&a6xx_gpu->gmu.lock); =20 /* Drain the outstanding traffic on memory buses */ - a6xx_bus_clear_pending_transactions(adreno_gpu, true); + adreno_gpu->funcs->bus_halt(adreno_gpu, true); =20 if (adreno_is_a619_holi(adreno_gpu)) a6xx_sptprac_disable(gmu); @@ -2659,6 +2659,7 @@ const struct adreno_gpu_funcs a6xx_gpu_funcs =3D { }, .init =3D a6xx_gpu_init, .get_timestamp =3D a6xx_gmu_get_timestamp, + .bus_halt =3D a6xx_bus_clear_pending_transactions, }; =20 const struct adreno_gpu_funcs a6xx_gmuwrapper_funcs =3D { @@ -2689,6 +2690,7 @@ const struct adreno_gpu_funcs a6xx_gmuwrapper_funcs = =3D { }, .init =3D a6xx_gpu_init, .get_timestamp =3D a6xx_get_timestamp, + .bus_halt =3D a6xx_bus_clear_pending_transactions, }; =20 const struct adreno_gpu_funcs a7xx_gpu_funcs =3D { @@ -2721,4 +2723,5 @@ const struct adreno_gpu_funcs a7xx_gpu_funcs =3D { }, .init =3D a6xx_gpu_init, .get_timestamp =3D a6xx_gmu_get_timestamp, + .bus_halt =3D a6xx_bus_clear_pending_transactions, }; diff --git a/drivers/gpu/drm/msm/adreno/adreno_gpu.h b/drivers/gpu/drm/msm/= adreno/adreno_gpu.h index 2c8b38eae7b6..19a1a1f699bc 100644 --- a/drivers/gpu/drm/msm/adreno/adreno_gpu.h +++ b/drivers/gpu/drm/msm/adreno/adreno_gpu.h @@ -77,6 +77,7 @@ struct adreno_gpu_funcs { struct msm_gpu_funcs base; struct msm_gpu *(*init)(struct drm_device *dev); int (*get_timestamp)(struct msm_gpu *gpu, uint64_t *value); + void (*bus_halt)(struct adreno_gpu *adreno_gpu, bool gx_off); }; =20 struct adreno_reglist { --=20 2.51.0