From mboxrd@z Thu Jan 1 00:00:00 1970 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 692802F9D94 for ; Wed, 12 Nov 2025 10:37:34 +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=1762943855; cv=none; b=ShzRb97OC7aWpj/RRxjNFBotJ33IlBlyV+7KwXy0nANVYKAbljrLnzTByEdXCQPAC9aYdrMKmZFbSUTqX06Nkxr46+vtw39MziruMEdNLclYeGvPnuuhUZTmUVly5OojUwpmSYIX4kBKmtoeJ9gcJKCNYxDmeBBWz/A6/8Hus3A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762943855; c=relaxed/simple; bh=dx6zm7iYDFsu+uW4HxvS1RA6sCHD+I68rch7mq06/pw=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=CFFCRWcmVtMhmR3qWMiVXTfwiJe+RJosfh0z0u6kE39Ubi0fO+sKl/zvTCiu9VTIwfdbviQ7fMO2JeiULOayNvC6L99bq9QoFC6lSimZuXcmuUAY2IjtROMdpa0acqTy+MryNJfX0wqQ3BrJDegWqFTwqr6wmBTSgQCBkvxjGqU= 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=p0Oz30K3; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=VEE83gR6; 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="p0Oz30K3"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="VEE83gR6" 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 5AC9CaP8510083 for ; Wed, 12 Nov 2025 10:37:33 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= yEvEVaysBiDJvqu7zSpO/ven4wuPjiUA9FzLjPjO1Lk=; b=p0Oz30K3ZkEWwuzp iqiim70ICP+vQQno+zYJnXP3FiLNW/NqOujPtIY2anc++sqN5gaDBPycS0NGFyFX dpaoAHlUUwgvFGRmEFlte6Q8mA+lKrD9UJkcg1RWWZA4pZpilpZt69WCHX9kZaoz 3iG3mxKT/mv/TWO1givhucRFRitwKYp92KbL6yeP7RnsGST1HSYK6DeJ8D2z78pf fLH8OFRFwugXCRlNnTYSgmUaLMsZMHKuIBbKB7GCEQEYfqshTC+LviPVOOA7SKdX CXobtf7q7JlojXQJW4Mn8oAhLcQ+baKjrmDIsLWcCpZC6lJXo78vrDERvDKQ13HS /bV64Q== Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4acqdggbkx-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Wed, 12 Nov 2025 10:37:33 +0000 (GMT) Received: by mail-qk1-f197.google.com with SMTP id af79cd13be357-8b10c2ea0b5so29414085a.0 for ; Wed, 12 Nov 2025 02:37:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1762943852; x=1763548652; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=yEvEVaysBiDJvqu7zSpO/ven4wuPjiUA9FzLjPjO1Lk=; b=VEE83gR6V7jtim28gTs/PCIFOLUi9MFEcCGi4zuC1QmE/TgAjPAAbv3G5b0Y74LPJ+ dCGSwTwi0JD16zsuuRmg1js1utJv379J5aYUF1IVOC8+4j94O1NvH/NqQDs4hvh9ODwy UTArToPX9DjwV4bGi3mJ3UtQBqv6tv+CYkqCQGmaTLVSI88jwGgKqU9nvO3B7Bnw5Kp6 ppu1P8wYMe084IIucPGuYKr7v/hhouW9mBeUUNWInBE/5w+zJFppt2JbkwhBYQqGbBmi eDEbAz/+/Dn2gN0tWC7v7J5KF0pr2KZqFd2xr4vfX94yJZe2APTjQ7SGmuRmL7lOWnZl UH2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1762943852; x=1763548652; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=yEvEVaysBiDJvqu7zSpO/ven4wuPjiUA9FzLjPjO1Lk=; b=LZnyn+ZlekDk5wGXAqyaHbnQSz3Hv8ACSHqgfXNpg2dyaV624NCxCdCPDVfWQVYMGL B3zWBA8oChcc5o6C6DUTa7szRhPmaVCp/gUGxSULrLEfUqX2SQXJj2I18EhzAI7H4RvP vfSOvmGe5J5L4ETtBUTGbicUK8lmFZjuZ9weyiN4v6zKEtL1ZU/2JWt2/ezfqipNqUh8 hCNiU+LEJK0J0XsgdsdRgBAuemz1TObLoLZv65CV1doN7hp5ISUD1hfA+D3UD+1TXv3v LsuwzHbcND81zQzhJqkvuZYGydunHgbwv7xMvHTIqWUhqPOoMYO/QM5zK8g3R3K1trtH TD4Q== X-Forwarded-Encrypted: i=1; AJvYcCWUd8Zb2GKiKMH3IxtaAh4EpqyLxxMXA+NqMDIbHyKaNJuUbuDKzGzBmIsm+W09bj8SDFuhmSnofGECWbE=@vger.kernel.org X-Gm-Message-State: AOJu0YxzBnVtFiCCq2LvGYB1M8+A5TMPcdg9yx9wuouaADpuNs4S/eGG 16nYftlvLSTp/1NdaAvvcYqfqa4ak/116Z2c5t3V4yVdhwGOvcwBE96wFqns6eslF9LEMCn7pYP WGYEdESXdWUyVSxwdX4QyqKVI4vtmTqN9Tb07Q6qM50hIteuiQtY3QvNdXpAnU6FeTsU= X-Gm-Gg: ASbGncsuvJEqEwJQ1PJ+m6TAFGLCH8QoR54nmgsB7SgC3a/Q25mqif4NmVfRlk9Lq3N TxGCNey6bSNnVw4NHT9ZNszP9pBA831MX6NyUee8TRXXC3rIFKIfl0C0wv1kPYEpnLwSv2Y7S5m vaicuHtBWu6d/wK4XuGw/hKuFf1VeT0tYZDBeLn/IswjuvziabKMD0Jnq6eIzRy5mGfAgXV8f2P QqPb9h9T0mMkzz/c8o5cszEHrMnLU6fLlsXh9COj1WnqVky4YEQQC52gOMjY2Pd6f5AL/aztaTS ynNd+N9TEyB2e/kvDqbLe208tn9dYycgdjIed658uW2++o2CJSK7wGtnDAKBvXFfJpUJiUtJIZL GEmWZxWxcoPK7jPjZNZX0h92cfEuGoA/O0c+Wy3PSFj2JoGJ7VRpIRf0+ X-Received: by 2002:a05:620a:c44:b0:8a2:eb35:8df9 with SMTP id af79cd13be357-8b29b96bfacmr174329385a.11.1762943852369; Wed, 12 Nov 2025 02:37:32 -0800 (PST) X-Google-Smtp-Source: AGHT+IHnodYPH8G4uSHNNb8nQWE1cE1kx1PmZfPb6CE/gBIDzIV9Um7jRFbvxAfRziignE7KgxTdXA== X-Received: by 2002:a05:620a:c44:b0:8a2:eb35:8df9 with SMTP id af79cd13be357-8b29b96bfacmr174327385a.11.1762943851866; Wed, 12 Nov 2025 02:37:31 -0800 (PST) Received: from [192.168.119.202] (078088045245.garwolin.vectranet.pl. [78.88.45.245]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-b72bfa0f37csm1559184066b.64.2025.11.12.02.37.28 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 12 Nov 2025 02:37:31 -0800 (PST) Message-ID: Date: Wed, 12 Nov 2025 11:37:27 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 16/21] drm/msm/adreno: Do CX GBIF config before GMU start To: Akhil P Oommen , 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 References: <20251110-kaana-gpu-support-v2-0-bef18acd5e94@oss.qualcomm.com> <20251110-kaana-gpu-support-v2-16-bef18acd5e94@oss.qualcomm.com> Content-Language: en-US From: Konrad Dybcio In-Reply-To: <20251110-kaana-gpu-support-v2-16-bef18acd5e94@oss.qualcomm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Authority-Analysis: v=2.4 cv=dtrWylg4 c=1 sm=1 tr=0 ts=6914636d cx=c_pps a=50t2pK5VMbmlHzFWWp8p/g==:117 a=FpWmc02/iXfjRdCD7H54yg==:17 a=IkcTkHD0fZMA:10 a=6UeiqGixMTsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=EUspDBNiAAAA:8 a=XltbfQAJAwjtl7jyp1EA:9 a=QEXdDO2ut3YA:10 a=IoWCM6iH3mJn3m4BftBB:22 X-Proofpoint-GUID: peFV_n2yxEoXgFZLz17wwIuWhdQH_rqs X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUxMTEyMDA4NSBTYWx0ZWRfX0k5ADQ49jKQx snEJcc+BqHMMY9MD8f9lucvHSKE4Eob7heUuaYDA0eeK5ZKFloV2JbvNUdb91IZfJ5xEKcAyL7J w1XYuvr3hoS+baU1rcht5pgAdGJ+ZGFzzsZLagjdhFINmNAOnV3XWV/++M1IJhaCd4rD8ifKzw+ l08Bv1baC47pi7lS5fZOl0KgtyPNY4GzZZBC+DBo0e7jr+5di4CN7A+LnuZdEwZUGkohNocLGMN AXgVTOses23AqrzGtmZhJxONoAvzO5PtzTM+1WvLb25kmnTm6fn7vfYA9RaGT2mZ6o7EK6u718o f0qfb3SlGWnRfMNGHU8eagwR5MU66JHjViDJBQz4VXyFasgmHuSQmVIR+5yyCIYJvaTwfqblCCq 2L8BC1TbD4s1bykqGCK1sZSq+naErQ== X-Proofpoint-ORIG-GUID: peFV_n2yxEoXgFZLz17wwIuWhdQH_rqs 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-12_03,2025-11-11_03,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 lowpriorityscore=0 phishscore=0 clxscore=1015 adultscore=0 impostorscore=0 spamscore=0 suspectscore=0 malwarescore=0 bulkscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2510240001 definitions=main-2511120085 On 11/10/25 5:37 PM, Akhil P Oommen wrote: > GMU lies on the CX domain and accesses CX GBIF. So do CX GBIF > configurations before GMU wakes up. This was not a problem so far, but > A840 GPU is very sensitive to this requirement. Also, move these > registers to the catalog. > > Signed-off-by: Akhil P Oommen > --- [...] > + /* For A7x and newer, do the CX GBIF configurations before GMU wake up */ > + for (int i = 0; (gbif_cx && gbif_cx[i].offset); i++) > + gpu_write(gpu, gbif_cx[i].offset, gbif_cx[i].value); We haven't been doing this a lot in the GPU driver, but adding a .num_entries-like field is both more memory efficient and less error-prone > + > + /* For A7x and newer, do the CX GBIF configurations before GMU wake up */ duplicate comment > + if (adreno_is_a8xx(adreno_gpu)) { > + gpu_write(gpu, REG_A8XX_GBIF_CX_CONFIG, 0x20023000); > + gmu_write(gmu, REG_A6XX_GMU_MRC_GBIF_QOS_CTRL, 0x33); Either set this prio value here, or in a8xx_gpu.c > + } > + > /* Set up the lowest idle level on the GMU */ > a6xx_gmu_power_config(gmu); > > diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c > index 029f7bd25baf..66771958edb2 100644 > --- a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c > +++ b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c > @@ -1265,17 +1265,20 @@ static int hw_init(struct msm_gpu *gpu) > /* enable hardware clockgating */ > a6xx_set_hwcg(gpu, true); > > - /* VBIF/GBIF start*/ > - if (adreno_is_a610_family(adreno_gpu) || > - adreno_is_a640_family(adreno_gpu) || > - adreno_is_a650_family(adreno_gpu) || > - adreno_is_a7xx(adreno_gpu)) { > + /* For gmuwrapper implementations, do the VBIF/GBIF CX configuration here */ > + if (adreno_is_a610_family(adreno_gpu)) { > gpu_write(gpu, REG_A6XX_GBIF_QSB_SIDE0, 0x00071620); a640/650 family GPUs didn't receive a .gbif_cx addition in the catalog to match > gpu_write(gpu, REG_A6XX_GBIF_QSB_SIDE1, 0x00071620); > gpu_write(gpu, REG_A6XX_GBIF_QSB_SIDE2, 0x00071620); > gpu_write(gpu, REG_A6XX_GBIF_QSB_SIDE3, 0x00071620); > - gpu_write(gpu, REG_A6XX_RBBM_GBIF_CLIENT_QOS_CNTL, > - adreno_is_a7xx(adreno_gpu) ? 0x2120212 : 0x3); > + } > + > + if (adreno_is_a610_family(adreno_gpu) || > + adreno_is_a640_family(adreno_gpu) || > + adreno_is_a650_family(adreno_gpu)) { > + gpu_write(gpu, REG_A6XX_RBBM_GBIF_CLIENT_QOS_CNTL, 0x3); > + } else if (adreno_is_a7xx(adreno_gpu)) { > + gpu_write(gpu, REG_A6XX_RBBM_GBIF_CLIENT_QOS_CNTL, 0x2120212); > } else { > gpu_write(gpu, REG_A6XX_RBBM_VBIF_CLIENT_QOS_CNTL, 0x3); Downstream seems to set QOS_CNTL at the same time as QSB_SIDEn for these targets > } > diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu.h b/drivers/gpu/drm/msm/adreno/a6xx_gpu.h > index 031ca0e4b689..cf700f7de09b 100644 > --- a/drivers/gpu/drm/msm/adreno/a6xx_gpu.h > +++ b/drivers/gpu/drm/msm/adreno/a6xx_gpu.h > @@ -46,6 +46,7 @@ struct a6xx_info { > const struct adreno_protect *protect; > const struct adreno_reglist_list *pwrup_reglist; > const struct adreno_reglist_list *ifpc_reglist; > + const struct adreno_reglist *gbif_cx; > const struct adreno_reglist_pipe *nonctxt_reglist; > u32 gmu_chipid; > u32 gmu_cgc_mode; > diff --git a/drivers/gpu/drm/msm/adreno/a8xx_gpu.c b/drivers/gpu/drm/msm/adreno/a8xx_gpu.c > index 2ef69161f1d0..ad140b0d641d 100644 > --- a/drivers/gpu/drm/msm/adreno/a8xx_gpu.c > +++ b/drivers/gpu/drm/msm/adreno/a8xx_gpu.c > @@ -500,6 +500,9 @@ static int hw_init(struct msm_gpu *gpu) > > gpu_write(gpu, REG_A6XX_RBBM_SECVID_TSB_CNTL, 0); > > + /* Increase priority of GMU traffic over GPU traffic */ > + gmu_write(gmu, REG_A6XX_GMU_MRC_GBIF_QOS_CTRL, 0x33); Kgsl (later) added this for A740 too - would it be beneficial to enable unconditionally on gen7+? Konrad