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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 984EFCCFA13 for ; Mon, 10 Nov 2025 16:39:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=kqWzdHtLoSmSQ6c0tUp8mHto9/TmfMwNT7KQvhP7HUY=; b=3PjdDgP3P4HiZBqgYokRzdO1m1 m7Oz/4Is5e6wl0lsB6OyrdM9DAQkL2KIovkleMWrP6uQTSPNMSfcUf9iFTDatxQP2IMgqchZsNnyj iGV6JYctvPtMEk3GJAzB/gnFgB0QWHA09J83mdpnDBSmMt6U4XDiQLvibxy1CdURIWljAwc/g/bEm lpmiJiIbQx68RGqHhqwb5GAubmdXFRocIJP2i2Dmm629ZwB7VkTMwsqZhfz6F5VemnYh1Qc0PYDrL Y5YYywyiXm4PAG0DeLVwl1azcBcUC3rkzzzK5YEQgo/PaTu2ZNwp810GZknd8yRIk/BExU0gw1WPz RA3Jqayw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1vIUui-00000005omZ-3TOA; Mon, 10 Nov 2025 16:38:45 +0000 Received: from mx0a-0031df01.pphosted.com ([205.220.168.131]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1vIUug-00000005okl-15ej for linux-arm-kernel@lists.infradead.org; Mon, 10 Nov 2025 16:38:43 +0000 Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 5AABZbMU3271111 for ; Mon, 10 Nov 2025 16:38:41 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= kqWzdHtLoSmSQ6c0tUp8mHto9/TmfMwNT7KQvhP7HUY=; b=IFVzynHlJh5eKUpt vp/AObknorlijD1QCapu+T6Yp76FHLHmjT2bhy46ViLm0DZhGTM6WNbO4qVIwnEn bNj6KvspKG2/Wu7OOM8OoDtgyy6ZvnB6Bb2jpnYX09I9BSxUFFPYx8Qpc96c7qMa 3nKvFkj4JYNFkCNi46vvJc0OISyFpTZgJ0TERLDAp3sUn2mdBf1b01im0iYSowVK DDkOWqYDPTG0/Agucg/evTQayNbayFnSrkvPAZjKLZIHYl3pebZekGipUCcFxszK E90CksT9wMcYJMJsFiSoEj4kk33afgUCQ0RxbOWmqCrpJtcExzed1kF1XD3Z9+E0 SWN+Xw== Received: from mail-pj1-f69.google.com (mail-pj1-f69.google.com [209.85.216.69]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4abfafrvkd-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 10 Nov 2025 16:38:41 +0000 (GMT) Received: by mail-pj1-f69.google.com with SMTP id 98e67ed59e1d1-3439fe6229aso1551568a91.1 for ; Mon, 10 Nov 2025 08:38:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1762792721; x=1763397521; darn=lists.infradead.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=kqWzdHtLoSmSQ6c0tUp8mHto9/TmfMwNT7KQvhP7HUY=; b=R4PdyZDHIXzy5ZhVM7yJNbML9rKOYsl+lcKiNGwlv3JOJcO/7bOWPJyMOgzWB1bD/2 kOytmPcVGQ1YLgzd+skByiY1blQ1HlA9tZa1pm7apLPww57vOgMkTw5eJ5vhbFA2Xb2N +h17QLKt/TORiVINL8AL7nXf0dmP78yidLzL+jFF6ZsEPvou13UK+VKJxPb7DvcPICNy Spk60uaJ9OJ7ehGNAMxaTYoeojZ4wsnQo0dAhEesRIhVDLI1hc1Ga7Qlc+EH4lZ+qHLU aQUkrmWwfkVhi+x7L+p7lxijOyk4VjhxFpfi2LjSMLQEMyj6JLFezVs+wJswmnkTybfS QAWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1762792721; x=1763397521; 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=kqWzdHtLoSmSQ6c0tUp8mHto9/TmfMwNT7KQvhP7HUY=; b=YLk+xI/zFDRWyhOH/3KXqp1tbMVu9oa4UVgoeWUgMQA+rIEvBO0GiRFpTcOxvEDsD0 CgVAQIenuqeo1y9rVbKqlFvCiHtd9scffliIW/05aFrwCWSCqaq7PFVMF/N7YN9D81GV 7sh48Gg4o5yd931G2IhIRHpuUUqmJ6bSi2IdXG/tPlr/UdlrsHy9JQ8FjXhgkYXiZ1o/ X3/YbHFLyQXeryqDX4h/1JigZV1SkFuowIDTy5smF2cN1iOOk/qpfh2pcdUvaigtBW/k HdWDY5rfeDv2sdbH7RCnWajbqf1fAFtPNrITNc+li425NhlWSAaVjfFszhRwNd+M3LiO Jwig== X-Forwarded-Encrypted: i=1; AJvYcCVS82eB5+M0jK7m+A97+5zwz1zq3+ACKsOeSfIas7Zyzd3v30+YUy2FP6kggqHPAb/7V4ReJ9xMn/8c7BIshRc6@lists.infradead.org X-Gm-Message-State: AOJu0Ywh0WoLt005mH/+x4VOTzgXzYgczM1R/kydk+5QGlYQooyJLJpS Gm8FOzPbjKp/jmA4rusYP4EHs6Rte25CR529ik+xNabqbWvVVydQL7pV3q7nClDdg9EIBWbJgS+ cr42CL6dvVeIaHRGx17umEI0DGDbStX+CvTpINze4Gd4u8/FcX2C4qqsxDA/JScFO34rBqSLL71 Sn5Q== X-Gm-Gg: ASbGncupPOx4wgsdRkmkQk+FdmwA5bmZ4sfG/FVsoDtTMYDvACqM2E6wOG9qNWd8e4z NHmWP1lA/Bh8y7lnHa89z6CsBENfUhppXuE5X2Ur0Ud5Ha5MtTcrMTgI3g/3ks98EyUNPWHzqSX 70TivyvpqLvNNo3We6AYtyQmQyV2UiUBjCQX8ffeugJtmx5/VPalfGXga0CWxrF903FC+K7zd6L fCh9oqSF/FOa5o8DlankS05x6EAtl0wiAwjt3pelyFXj0whZvY3VZXaZFT/18Ri/Em3C/vRQoJT u/QpfBhfrtSvRp6vqS68j3R2OydkHppVzSROHgDjticgRsC1FY3GFJJQIdzuhHKlRM+lVbEHpDO ZXy0njuN//QJxV5Lqq9CiYOQ= X-Received: by 2002:a17:90a:da8c:b0:340:9d78:59 with SMTP id 98e67ed59e1d1-343befa5329mr27603a91.3.1762792720776; Mon, 10 Nov 2025 08:38:40 -0800 (PST) X-Google-Smtp-Source: AGHT+IFa+U0rNARWTCaF7lT0o/+MjPISBIEKRbY/WloUig3k1nekUFejy3Fa2ZzeHzIccBq6UKyi0w== X-Received: by 2002:a17:90a:da8c:b0:340:9d78:59 with SMTP id 98e67ed59e1d1-343befa5329mr27560a91.3.1762792720235; Mon, 10 Nov 2025 08:38:40 -0800 (PST) Received: from hu-akhilpo-hyd.qualcomm.com ([202.46.23.25]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3434c337b20sm11468922a91.13.2025.11.10.08.38.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Nov 2025 08:38:39 -0800 (PST) From: Akhil P Oommen Date: Mon, 10 Nov 2025 22:07:10 +0530 Subject: [PATCH v2 04/21] drm/msm/adreno: Create adreno_func->submit_flush() MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20251110-kaana-gpu-support-v2-4-bef18acd5e94@oss.qualcomm.com> References: <20251110-kaana-gpu-support-v2-0-bef18acd5e94@oss.qualcomm.com> In-Reply-To: <20251110-kaana-gpu-support-v2-0-bef18acd5e94@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 X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1762792679; l=2550; i=akhilpo@oss.qualcomm.com; s=20240726; h=from:subject:message-id; bh=SpYPI0Dwwc05293klD0NCzpYJPQgyGdGUUEDRA+kgpo=; b=iljtrUe9v0tW0jYWcmnPgbIA1ijJ1IP3iqFE5kXmMTtN9/lE1waAYHqHOrPWj1SCMCrqoTurw LUilb1BA64mCClDRQ7wVSRi9QxYoF7J+ZjuTcEWO4spE9icQT8LZMnC X-Developer-Key: i=akhilpo@oss.qualcomm.com; a=ed25519; pk=lmVtttSHmAUYFnJsQHX80IIRmYmXA4+CzpGcWOOsfKA= X-Proofpoint-ORIG-GUID: Bmo74MmcC3Z2vOBAB2ZjB1kUC_T-wHsG X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUxMTEwMDE0MCBTYWx0ZWRfX62wRkpQTAsYs 82z0KtUgR0RLAaov6OfvzvKmpGLvb3I+e743l8cEEHE2C+ZxiamIhHD6WQjhp3f7/8UeEjE6eRT eBKHorha2CQcXXggpcG8Th4BfG03pHsXJQUq73JnVYLOtB142IA0CH+AojSXLXhO/vWV630dKFW fMY5FIYQpn7qqyRYRXTmkAHqxjOLvGZlU/7p4+2VLOnx3Kqcd/Drx7LkwSnNLUiO+UOMffNz3kn glv+3hDnfHE5VwbRM2qZOQvCYhqrcm8rs/Ku3f1mktfQeU1m2uzg9mb5nHsSSGfVRL9V0i1lwVS OzqoZik+GBC6xNSazh5ByLeJyOoObkpxpzKsxGY8VrceUSLyVD+EpR7rpPi4/uSCeCyhD8LAIix BIt3778oJdTwRGQnBm7P+mekptq15A== X-Authority-Analysis: v=2.4 cv=UZJciaSN c=1 sm=1 tr=0 ts=69121511 cx=c_pps a=vVfyC5vLCtgYJKYeQD43oA==:117 a=ZePRamnt/+rB5gQjfz0u9A==:17 a=IkcTkHD0fZMA:10 a=6UeiqGixMTsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=EUspDBNiAAAA:8 a=geZ1VMdEqvdXz0YL0KoA:9 a=QEXdDO2ut3YA:10 a=rl5im9kqc5Lf4LNbBjHf:22 X-Proofpoint-GUID: Bmo74MmcC3Z2vOBAB2ZjB1kUC_T-wHsG 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-10_06,2025-11-10_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 clxscore=1015 suspectscore=0 malwarescore=0 impostorscore=0 adultscore=0 priorityscore=1501 spamscore=0 phishscore=0 bulkscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2510240001 definitions=main-2511100140 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20251110_083842_312866_EFD25958 X-CRM114-Status: GOOD ( 16.52 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org To dynamically decide the right flush routine, convert a6xx_flush to an adreno_func op. This will help us to reuse a7xx_submit() along with a8xx_flush op. Signed-off-by: Akhil P Oommen --- drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 7 +++++-- drivers/gpu/drm/msm/adreno/adreno_gpu.h | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c index 6f7ed07670b1..b675a512e7ca 100644 --- a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c +++ b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c @@ -397,7 +397,7 @@ static void a6xx_submit(struct msm_gpu *gpu, struct msm_gem_submit *submit) trace_msm_gpu_submit_flush(submit, read_gmu_ao_counter(a6xx_gpu)); - a6xx_flush(gpu, ring); + adreno_gpu->funcs->submit_flush(gpu, ring); } static void a6xx_emit_set_pseudo_reg(struct msm_ringbuffer *ring, @@ -597,7 +597,7 @@ static void a7xx_submit(struct msm_gpu *gpu, struct msm_gem_submit *submit) trace_msm_gpu_submit_flush(submit, read_gmu_ao_counter(a6xx_gpu)); - a6xx_flush(gpu, ring); + adreno_gpu->funcs->submit_flush(gpu, ring); /* Check to see if we need to start preemption */ a6xx_preempt_trigger(gpu); @@ -2563,6 +2563,7 @@ static const struct adreno_gpu_funcs funcs = { .sysprof_setup = a6xx_gmu_sysprof_setup, }, .get_timestamp = a6xx_gmu_get_timestamp, + .submit_flush = a6xx_flush, }; static const struct adreno_gpu_funcs funcs_gmuwrapper = { @@ -2592,6 +2593,7 @@ static const struct adreno_gpu_funcs funcs_gmuwrapper = { .progress = a6xx_progress, }, .get_timestamp = a6xx_get_timestamp, + .submit_flush = a6xx_flush, }; static const struct adreno_gpu_funcs funcs_a7xx = { @@ -2624,6 +2626,7 @@ static const struct adreno_gpu_funcs funcs_a7xx = { .sysprof_setup = a6xx_gmu_sysprof_setup, }, .get_timestamp = a6xx_gmu_get_timestamp, + .submit_flush = a6xx_flush, }; struct msm_gpu *a6xx_gpu_init(struct drm_device *dev) diff --git a/drivers/gpu/drm/msm/adreno/adreno_gpu.h b/drivers/gpu/drm/msm/adreno/adreno_gpu.h index 390fa6720d9b..77b1c73ff894 100644 --- a/drivers/gpu/drm/msm/adreno/adreno_gpu.h +++ b/drivers/gpu/drm/msm/adreno/adreno_gpu.h @@ -74,6 +74,7 @@ enum adreno_family { struct adreno_gpu_funcs { struct msm_gpu_funcs base; int (*get_timestamp)(struct msm_gpu *gpu, uint64_t *value); + void (*submit_flush)(struct msm_gpu *gpu, struct msm_ringbuffer *ring); }; struct adreno_reglist { -- 2.51.0