From nobody Mon Feb 9 16:13:04 2026 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.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 3B1CE2F3600 for ; Wed, 31 Dec 2025 08:45:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767170758; cv=none; b=SpVD8fbGZOTRhdX38ZmxswrnN/lmkHmazmCtL0wGQxMvLX9iLh5YgHUVurYEeO+FGxQhd2kGKoO0ZhPnwFebJoM/05DD69o/iogDcKDTL5HjBYFwKNnJVwUuiBocOGcQAJuTFPKigUn/SwoiDDZwXl9xywY+7kYD6yVi0feEFJM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767170758; c=relaxed/simple; bh=OPiDnreeN1/VHEOQRtyu84fDdgcHq5MMvUjo9czgt40=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=inr5zxIQ5O12dXtd9LiEkK6kQv8AkEZEi1zbPM5y2WnZpka5102IHiEbiN47+WB9EGvpNL10omRs6WCIhIzNiQZIUmpiRxH6URBAL47DaRpR9L12fL5sOLr0szZnm8tvwjR8Ax0V92kvlTuzbRZjjHadHJ9zfC2XzXXDIxKBJ4g= 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=mZOpK1N8; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=C640gJzc; arc=none smtp.client-ip=205.220.180.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="mZOpK1N8"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="C640gJzc" Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 5BV04Y6p2990605 for ; Wed, 31 Dec 2025 08:45:55 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= MEhqbU0WUFx5unoTkBAi+ncY8G/nDPpOVVFJMkC1J7c=; b=mZOpK1N8IIZG/DZH 5aIWijGvEQAoh0sIzVTObni8pcabvR8I+yVad3XASCI7C9px3dDJH/Jk4cdSQKxk Zq7UCuuUScUHDzPbW4qDQE/Uu8Wd1XzTs9gukr4k2egF3V2xofufdBFMa07lyUkR n+kdkbFMe7NDNRzq4VoidmszvMj49XiNxO5J0pSyMRFrrJsaPNVWBy4wYlS+97uY u2rFEaUZx/WTLVR80OeLRNEOQur1vbRe8Dl0kZ9f2pAk5DT8Al5E2nZeWnuk9plK K/jpVJeEkTB8795pTI3uHB37Nrf/1WDMObe0C2Vd36raCznq+8Fjdx8OfQZ4ot2c XO0CUQ== Received: from mail-pf1-f198.google.com (mail-pf1-f198.google.com [209.85.210.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4bc0vdky04-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Wed, 31 Dec 2025 08:45:55 +0000 (GMT) Received: by mail-pf1-f198.google.com with SMTP id d2e1a72fcca58-7d5564057d0so25443767b3a.0 for ; Wed, 31 Dec 2025 00:45:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1767170754; x=1767775554; 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=MEhqbU0WUFx5unoTkBAi+ncY8G/nDPpOVVFJMkC1J7c=; b=C640gJzc+x/geYCa0R/YT+Sgpxqgx7SA9hNGjYvH7L8Fijejx/4m5HWGA4pSNCV1od f5Dj+nO04bXces8MICCy35JUJ+e0cAf8rGhxE6DY8BVfMx9SpIC8Y7zckik9UmdA17nJ jap1eGbJfIBUnHKtAxpveVu/j44RujWV61EPQr9A6V5RMilRS6vIuFlJE8fldnQuFQZn O5GO1Lhu19N9TOvqieHD0rgoy5rzIkyLlBEudXwx/i+zDQYHi6+j2JTlVeCpDOzzTimn oK3K/cU9Rvup6YHdcpWHNjOD8tEqTHzMgedhOCkQ5pgTUkMpwcAFil1FHocGYIK37VZ6 fO2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767170754; x=1767775554; 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=MEhqbU0WUFx5unoTkBAi+ncY8G/nDPpOVVFJMkC1J7c=; b=jBE+iCgp2awEITjAJiLFl6/XdJ8LH9itGQW0hwnYMH6ZBY7GlTSRI2glcLAennPzFt QV4YKKE8Gvj+huUtj5GmEXT8WB/xPHZkWl75BAEDCrLH1Ni+4+9F1HiKsDKrmA8yKP6/ 67unito6OFhPQ1cIM0YF94zbQivU4TJBQgGDlgi2XDeXahYfoF7Hwhv0kgYr8/GHnS+B THd6GNq8Bo/0/FH/ft+oy465SdFMkUJ/dLjHJBf23736DuWt3x29r6CbOCHhT65A7sF6 kJhCJa3HM7nfgsMri5TBOvAOjo7Knr3k8SPCPQVxzRwq8h1tmBI73zHGm3uqz68Sx2Wn V5FA== X-Forwarded-Encrypted: i=1; AJvYcCXgN1QzX7nmDLF/y0qJvxYqYL9Q4PzxU1exhDSYksXJO1udmzsWmqr300AwVX7dFcUWmaU2DQ4eIT1iKI8=@vger.kernel.org X-Gm-Message-State: AOJu0YyBF5/aWNUZ+eni7yj1SlrJBI5sjOkAamOqBkFpWCsh9L+pClju mHZXBnTld3sxgKrlxaLiurVzHkULN8LDclTAqiq9I7PEHacx7pd/+9W1/gfL+7kZ/8/PZ/9x0mD 2QfeZ3OVZFMPJ11ZH/ODrXzzYFNPs+GT71ekmIpf755X+sk94zXFFSG7/ieJDCMFPEVY= X-Gm-Gg: AY/fxX7cqtwVRTtD19q1L9DuI7Pg/iGC8drFvCQ+vlWxdHvnTJ6CJsXnpTm8l+r5a79 DgEzvrtccGYelnvNnZsxgURT9os3JYdmJ+5vQm98c/6SQ89iP7fPW3uNVlBBNQvHiu67ZoeNrDS q3lsgmNDApzwn+73eOIlu/9w9/FmKG9iXXMVKcc2tX1JlKVyjDVWSX4QLir+wwooHKy8HQSmruV oqS02SiSo/Hv3zo4lUV7l/9mMG4a7VjHlVKa0v8Xw06H2dQbNnG4GmvayQrolR9+CbR9jZibMCk b//CA1cttWz8ujlEZMHLB6216ngn8gjcQkqxcqu3qQAKmB2aIjKXyz+niBuzPAXrhKG+kWPINHy gNl4Pl+h05PPZo6aeaTGjTVsBGHBKmUQmvA== X-Received: by 2002:a05:6a21:3381:b0:350:8f99:367c with SMTP id adf61e73a8af0-376aabfb4a5mr37381374637.58.1767170754153; Wed, 31 Dec 2025 00:45:54 -0800 (PST) X-Google-Smtp-Source: AGHT+IFAo6dVSAwao+S3Igkb8Qh1q5ljTKlW1Z+o57LI4podu7CjXok+fqoYJxLC0NUQooJgkDPFDw== X-Received: by 2002:a05:6a21:3381:b0:350:8f99:367c with SMTP id adf61e73a8af0-376aabfb4a5mr37381335637.58.1767170753692; Wed, 31 Dec 2025 00:45:53 -0800 (PST) Received: from hu-akhilpo-hyd.qualcomm.com ([202.46.23.25]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-c1e7a018eb5sm31356070a12.16.2025.12.31.00.45.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Dec 2025 00:45:53 -0800 (PST) From: Akhil P Oommen Date: Wed, 31 Dec 2025 14:15:22 +0530 Subject: [PATCH v6 1/8] drm/msm/a6xx: Retrieve gmu core range by index 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: <20251231-qcs615-spin-2-v6-1-da87debf6883@oss.qualcomm.com> References: <20251231-qcs615-spin-2-v6-0-da87debf6883@oss.qualcomm.com> In-Reply-To: <20251231-qcs615-spin-2-v6-0-da87debf6883@oss.qualcomm.com> To: Rob Clark , Sean Paul , Konrad Dybcio , Dmitry Baryshkov , Abhinav Kumar , Marijn Suijten , David Airlie , Simona Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bjorn Andersson , Jessica Zhang , Gaurav Kohli Cc: Dan Carpenter , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Jie Zhang , Akhil P Oommen , Dmitry Baryshkov X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1767170740; l=2376; i=akhilpo@oss.qualcomm.com; s=20240726; h=from:subject:message-id; bh=OPiDnreeN1/VHEOQRtyu84fDdgcHq5MMvUjo9czgt40=; b=zhrU5zRuzb3+31hJUFJGdIbEHUzbwA2QKWKVFIos+tJc4cKdK/NOoZSXwyVuQHwdaIvRFjYR0 Sb7hB6qvMz9C27ymv1rO0JgLa6J1NSAGeETZ1CiGcZLOz8motfBIk89 X-Developer-Key: i=akhilpo@oss.qualcomm.com; a=ed25519; pk=lmVtttSHmAUYFnJsQHX80IIRmYmXA4+CzpGcWOOsfKA= X-Authority-Analysis: v=2.4 cv=dfONHHXe c=1 sm=1 tr=0 ts=6954e2c3 cx=c_pps a=m5Vt/hrsBiPMCU0y4gIsQw==:117 a=ZePRamnt/+rB5gQjfz0u9A==:17 a=IkcTkHD0fZMA:10 a=wP3pNCr1ah4A:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=EUspDBNiAAAA:8 a=bd0xcQFpMvvK09R9pDkA:9 a=QEXdDO2ut3YA:10 a=IoOABgeZipijB_acs4fv:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUxMjMxMDA3NSBTYWx0ZWRfX+j8+BQXQs1aP vX2hkxXgwwZZg4S+rWookmYA1f3SLP0j5W4bqo883TNIrkNu/DV2kjEP1oVGxMS81H12AohPMH2 00rEKAD8fYpJ0wMa+jEYXL2IwF7x7DstWngr83YyDUKiw6ZmnEgFO2Qi0pefTV9hhfvh+o9avmb pXMUbHomDFiNuGwu79Yp7IsQSib1+coHSUsrrEOTGs5I5OFanJ9pSaU0O7gSbJTexCu3HpKjdLI Dxw4lefcTI/UxXc8weCBO/heZk7JEZFGrBcFcseKFnbOVSIghEtUdsPhbHWjnRiUuoP93VKh3AF e1ELjnLEAxZzB0XJk+JmIcPheoHdfmdKub2EQeX7dWMI0gAvHqP5MWiG3R6+NGzx3wB+EWmATPI n9H8EjdelV7WPxJMAKgy7vbENT11pW9tDhHSCPbu2RNRsZiiyMaCLoihiEBXSlB2ZQal/0kx2tM V5F+JjcGvJa9N3m3LJg== X-Proofpoint-GUID: hFEcTf8B4ShWRjhxy-lFfjJEtGn0JcKc X-Proofpoint-ORIG-GUID: hFEcTf8B4ShWRjhxy-lFfjJEtGn0JcKc 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-12-31_02,2025-12-31_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 spamscore=0 clxscore=1015 phishscore=0 malwarescore=0 suspectscore=0 bulkscore=0 impostorscore=0 lowpriorityscore=0 adultscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2512120000 definitions=main-2512310075 Some GPUs like A612 doesn't use a named register range resource. This is because the reg-name property is discouraged when there is just a single resource. To address this, retrieve the 'gmu' register range by its index. It is always guaranteed to be at index 0. Signed-off-by: Akhil P Oommen Reviewed-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio --- drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gmu.c b/drivers/gpu/drm/msm/ad= reno/a6xx_gmu.c index 5903cd891b49..9662201cd2e9 100644 --- a/drivers/gpu/drm/msm/adreno/a6xx_gmu.c +++ b/drivers/gpu/drm/msm/adreno/a6xx_gmu.c @@ -2029,21 +2029,19 @@ static int cxpd_notifier_cb(struct notifier_block *= nb, return 0; } =20 -static void __iomem *a6xx_gmu_get_mmio(struct platform_device *pdev, - const char *name, resource_size_t *start) +static void __iomem *a6xx_gmu_get_mmio(struct platform_device *pdev, resou= rce_size_t *start) { + struct resource *res =3D platform_get_resource(pdev, IORESOURCE_MEM, 0); void __iomem *ret; - struct resource *res =3D platform_get_resource_byname(pdev, - IORESOURCE_MEM, name); =20 if (!res) { - DRM_DEV_ERROR(&pdev->dev, "Unable to find the %s registers\n", name); + DRM_DEV_ERROR(&pdev->dev, "Unable to find the gmu core registers\n"); return ERR_PTR(-EINVAL); } =20 ret =3D ioremap(res->start, resource_size(res)); if (!ret) { - DRM_DEV_ERROR(&pdev->dev, "Unable to map the %s registers\n", name); + DRM_DEV_ERROR(&pdev->dev, "Unable to map the gmu core registers\n"); return ERR_PTR(-EINVAL); } =20 @@ -2085,7 +2083,7 @@ int a6xx_gmu_wrapper_init(struct a6xx_gpu *a6xx_gpu, = struct device_node *node) gmu->nr_clocks =3D ret; =20 /* Map the GMU registers */ - gmu->mmio =3D a6xx_gmu_get_mmio(pdev, "gmu", &start); + gmu->mmio =3D a6xx_gmu_get_mmio(pdev, &start); if (IS_ERR(gmu->mmio)) { ret =3D PTR_ERR(gmu->mmio); goto err_mmio; @@ -2244,7 +2242,7 @@ int a6xx_gmu_init(struct a6xx_gpu *a6xx_gpu, struct d= evice_node *node) goto err_memory; =20 /* Map the GMU registers */ - gmu->mmio =3D a6xx_gmu_get_mmio(pdev, "gmu", &start); + gmu->mmio =3D a6xx_gmu_get_mmio(pdev, &start); if (IS_ERR(gmu->mmio)) { ret =3D PTR_ERR(gmu->mmio); goto err_memory; --=20 2.51.0