Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp2376358rdb; Mon, 12 Feb 2024 02:51:49 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWfPMntqC3H5MsQspOALb83Jntg00nLfD7VGaYvWtGT0kQFidl59RvZTXfaTFeq8Fe7SeGQGbK+tGWUhtv/BQ7MEoQxwkZ9GiCeLibC6w== X-Google-Smtp-Source: AGHT+IFDGcIz4BaPm1oLooj5JXD/jyu7gIqG/dankIFhWujoHGy0v17LVCPYGsvyb0nFy5VJj9FC X-Received: by 2002:a81:5c06:0:b0:5ff:7cca:a434 with SMTP id q6-20020a815c06000000b005ff7ccaa434mr4414777ywb.51.1707735107821; Mon, 12 Feb 2024 02:51:47 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707735107; cv=pass; d=google.com; s=arc-20160816; b=CDVudNpRMh75WShWKCFoCdulFhHFf47MD695nPQ5Ee0eq2PB8KkX34+8YRTeweRPEN eaEpjE5dbFJt5PAr2kQzzoUKwKbyq5iiCEJiA9LQ0EudGRH6RLIH0rBQAz5ZvC0RvvL3 dAWbinpPZETAfY8qaET5bGgiqoHZLpspbJk5+AqKs46QBg4f2w4wfwwH8vaMUFml6/93 1LcmkqDzY77LrLzfIVhnBI3K+glw0o11wTlW//sg+JFiJmBFKJpoe/vHuQL/uxn3E1S7 sctAx4qU6Vcc5hiXGJylL/bHj40+E9vl3ac0MpS1E1fDEwMBQhWwKAmrx+AYK2Ll0eA0 bBNQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=q1QBZwTVdWuMyu/B+/xwznlESDGZfR140XLprl5iQ1M=; fh=di2dj/0w+Jl2Q2xHvBCCyhePiFeCAD6V7z8TqvT/d5s=; b=LIcVXBAKrOp2ntNMo7hNUz5qV34Cl73XBH2Wj9dIVfuEwO2X3oLL25qOIffTVCXFvL kkFGHjHGtBHC3g6ctJtPxb0B3VBeV7jgYe+HlxIRi0O07EXk6EK+YC6NkOtbGPbKO7wQ NUSJCQv8cGJVhr6Jri1cYyFS4y34LlBOOZJpCTE+Zc4aI6R38ZGSMuXw1IDs03fOIlr7 vZi9fpq1qne4NuChNzhgaC5k1n6D4cVqFocfh/GA4Ak+lSy5S/UjBYsIAZDRk5h0WEwX vlPLaMnjDLYbI0WA2sFMdYyzO/xKOoAxrbqWP88CZy5qfHsJ4/ftC0dOAaE92lPrFoXD 4v7w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CV+PBQfX; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-61370-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-61370-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org X-Forwarded-Encrypted: i=2; AJvYcCUinFsZ0fjLPDU2dRtZyuPH6ptCYvXV6lXkBFtMxVCHT7AYxAP/lzIg26MjgC7NtMuRblgqWWnwIrv2oM95rS0Yx+ibGVgBgP9YlLo9Ag== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id d8-20020a05620a240800b00785c09fa35asi6001224qkn.761.2024.02.12.02.51.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Feb 2024 02:51:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-61370-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CV+PBQfX; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-61370-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-61370-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 2A4091C235AE for ; Mon, 12 Feb 2024 10:51:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 109BE39843; Mon, 12 Feb 2024 10:46:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="CV+PBQfX" Received: from mail-ej1-f54.google.com (mail-ej1-f54.google.com [209.85.218.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 23FEA39FE5 for ; Mon, 12 Feb 2024 10:46:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.54 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707734781; cv=none; b=R5BOxVkCIochkwB4A7K34VkrqoYY0BCA0qi8pZVmKn7RLAzw14VK9L6pIpHmby1J+WYJCqR7Rd/9ibERx6HpLvgvEGU65dLhZb/l+fvgkIVA98Cbi9WNmeCELgwLl5vd+kpKWzIWF9LlPVGm0dQINX3orFMAVLp7pWhPU9duQbQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707734781; c=relaxed/simple; bh=fnaDeTgMz2/uVnKFVasJe7ruBBIoDSdVC37+5zyiZhc=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=XdbebdP1UUpvaBczZfM9wtZi3LNwtzhTJcl3C3/3U85b2qcwQbkNPII3mgyjfbwhaYRT+Hg1SKQe/bE2R+QWVDXi0hQCCshGK2iYZGmW+aOHNrNFsmnJKi4f5kps9UI0E28wHJ2pb8E9KsWCzPgzkyptwSs31DaPWVRa4m6qWUA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=CV+PBQfX; arc=none smtp.client-ip=209.85.218.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-ej1-f54.google.com with SMTP id a640c23a62f3a-a3c309236c1so193078766b.2 for ; Mon, 12 Feb 2024 02:46:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707734778; x=1708339578; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=q1QBZwTVdWuMyu/B+/xwznlESDGZfR140XLprl5iQ1M=; b=CV+PBQfXbf9lxJ/EYfzi4os30qZQeqqKlbXcNkwbpfiCBVoAssEeSPGKU4Pth8lQIk k0XHp6dTwX9Lv3IvQbm+i9LY0SXgszi6IatgaddNNas8xLVZuXrw98UoanPDrpV79OEr bd6ZcrLGBNFjx0d1K4fcrhnJrZuPjhyTTuQMcm+imwCW/m7PYHZGUQeR0NhyMBV3W3TE LCy63lhl37rhKwrlHG38/J+ACe36fHSLk0lDqA/ahS+ZtFsSivry9YXqS6oQGeY4JWCJ einxnP9+Gw05aEZCLPul7PDiKFhH34daJvf06zUeogS/dihpAJbo4K4gmbDykviCARyq funA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707734778; x=1708339578; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=q1QBZwTVdWuMyu/B+/xwznlESDGZfR140XLprl5iQ1M=; b=QvbMQWd73u/n65FUl5LYgZQeIj8mrjEirkCtaf/j32FEqdPzNVQvOIN1z6vQyu6JZi qyRO6ApDPtdodcp1qBwdY3Bv2vsIkIwOyCESqcrI9wb7+FLawVXlmR0KaNuK6LbrPZdJ fcyLH7lRLAggFXLHH+sz+nKl1yhAfMfmhzX4AvUbJVz7sb18KcZENTdSbWbOCxN9Fu85 9wySBNpL888A15vw9Kb5yYeOEaaS1ICXuR6IHx/rduYI82P8JZGlfTShv8AAs0RPEq7O ZsGxsR8KCn9wkSiYlD5LUFwMVoXfIjGDM9RhZ9qy2DMu24398PCfnrVBUuStTQsLruQF /QSA== X-Forwarded-Encrypted: i=1; AJvYcCX3OjUv6tgOeh0v85otAZQVeXeb5Md6CMGtw7IrMGOvwZwVJEZ+WYRmVAj1ufRwB9C/AkME5z72PxX0Y/XLYUMG0cNy5f6uk4MKcNrH X-Gm-Message-State: AOJu0YygEnCNHDg7NRThdtudxquY/qUinMSWdJh0Y7YL1OS5L2HUeFXd guMLXdJfMuqMxGIHEEjyDlmKnxWcmH8bzLekgv2gzxBlNIHaYE1QYTjawCITG1U= X-Received: by 2002:a17:906:f80d:b0:a3c:a75e:7e3a with SMTP id kh13-20020a170906f80d00b00a3ca75e7e3amr1239304ejb.47.1707734778242; Mon, 12 Feb 2024 02:46:18 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCXRkgvsOgQDe7v5rAf/j/cGyiCixW9YFFhwkbuXr5VwKH/B6syvBXSDq8ImuLUVd92psJdlqV28dLSbPr9b2jM4mhdI23OxpEQAgIlNahJx1UcTZGGXPSttgSK8zD5B13M5YXdgxBhAg5iQx35l7F9RyNc2JURvrNwD+//VCrOSLdZlzl+QdCNSEdDAfevMRR+wOXfTwr7SSUKGuDc734+GEog5g8KOXES+z2YLDgv6i6SxOBv4zk0V+vlcJyFg9vJExPmY0Wwgv/keRSYvvmPAZ7LbUWqZuN88TbAE2Qy5XLaG3riT2iH2hW3t/pGgd7yffS1Elxw+xTO8AfbYvrkAhjLVBQ+1g6JpPnDRrq3H+b+3sYlrqYDLRIjNuGjJhnVoraACEk4rNoFCFEE0emW8jHwQu38IJtS4i8EHI9eC3n2ofw2o5F0WXgLvgbnUXmApjoFdFXCiMd6Lp/XQ2bhTTZ/meUQShd8J8lbYu0o1/iLZNtogf4zmtPZlokMOy7TxvUsMEAt/bLhqktfM5Buu07EXEg0TVoA904jyUXj56LctpenNlptgz5Df7U/VJFjtIh841+Z0I8iAPoSOf70x2wZuBYJtmuebS5MnxR4O73YTT24fh0x6sI7/KdxjXVsEwdPyy68nncCjG/QAjuYlJQZcvPQygbCiw0fLTG2aAOGShq2C9kQbyKA+5HJ2xcs1njkjTgABq72x5aki7ROj0EVb6rOKrZahk6iSJc4iowWh8/F7an9F7tRK6trbU+56Nbrc5vMLPwfLTwwf6iHM2cN8DyhOr4B10Kdk+bA46FVeR3xsSU+jC1Jr Received: from [192.168.192.135] (037008245233.garwolin.vectranet.pl. [37.8.245.233]) by smtp.gmail.com with ESMTPSA id l26-20020a1709061c5a00b00a3891fb4c0esm73964ejg.107.2024.02.12.02.46.16 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 12 Feb 2024 02:46:17 -0800 (PST) Message-ID: Date: Mon, 12 Feb 2024 11:46:15 +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 3/5] drm: msm: add support for A750 GPU Content-Language: en-US To: Neil Armstrong , Rob Clark , Abhinav Kumar , Dmitry Baryshkov , Sean Paul , Marijn Suijten , David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Will Deacon , Robin Murphy , Joerg Roedel , Bjorn Andersson Cc: linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, iommu@lists.linux.dev References: <20240212-topic-sm8650-gpu-v1-0-708a40b747b5@linaro.org> <20240212-topic-sm8650-gpu-v1-3-708a40b747b5@linaro.org> From: Konrad Dybcio Autocrypt: addr=konrad.dybcio@linaro.org; keydata= xsFNBF9ALYUBEADWAhxdTBWrwAgDQQzc1O/bJ5O7b6cXYxwbBd9xKP7MICh5YA0DcCjJSOum BB/OmIWU6X+LZW6P88ZmHe+KeyABLMP5s1tJNK1j4ntT7mECcWZDzafPWF4F6m4WJOG27kTJ HGWdmtO+RvadOVi6CoUDqALsmfS3MUG5Pj2Ne9+0jRg4hEnB92AyF9rW2G3qisFcwPgvatt7 TXD5E38mLyOPOUyXNj9XpDbt1hNwKQfiidmPh5e7VNAWRnW1iCMMoKqzM1Anzq7e5Afyeifz zRcQPLaqrPjnKqZGL2BKQSZDh6NkI5ZLRhhHQf61fkWcUpTp1oDC6jWVfT7hwRVIQLrrNj9G MpPzrlN4YuAqKeIer1FMt8cq64ifgTzxHzXsMcUdclzq2LTk2RXaPl6Jg/IXWqUClJHbamSk t1bfif3SnmhA6TiNvEpDKPiT3IDs42THU6ygslrBxyROQPWLI9IL1y8S6RtEh8H+NZQWZNzm UQ3imZirlPjxZtvz1BtnnBWS06e7x/UEAguj7VHCuymVgpl2Za17d1j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gFiEEU24if9oCL2zd AAQVR4cBcg5dfFgFAmQ5bvICGwwACgkQR4cBcg5dfFju1Q//Xta1ShwL0MLSC1KL1lXGXeRM 8arzfyiB5wJ9tb9U/nZvhhdfilEDLe0jKJY0RJErbdRHsalwQCrtq/1ewQpMpsRxXzAjgfRN jc4tgxRWmI+aVTzSRpywNahzZBT695hMz81cVZJoZzaV0KaMTlSnBkrviPz1nIGHYCHJxF9r cIu0GSIyUjZ/7xslxdvjpLth16H27JCWDzDqIQMtg61063gNyEyWgt1qRSaK14JIH/DoYRfn jfFQSC8bffFjat7BQGFz4ZpRavkMUFuDirn5Tf28oc5ebe2cIHp4/kajTx/7JOxWZ80U70mA cBgEeYSrYYnX+UJsSxpzLc/0sT1eRJDEhI4XIQM4ClIzpsCIN5HnVF76UQXh3a9zpwh3dk8i bhN/URmCOTH+LHNJYN/MxY8wuukq877DWB7k86pBs5IDLAXmW8v3gIDWyIcgYqb2v8QO2Mqx YMqL7UZxVLul4/JbllsQB8F/fNI8AfttmAQL9cwo6C8yDTXKdho920W4WUR9k8NT/OBqWSyk bGqMHex48FVZhexNPYOd58EY9/7mL5u0sJmo+jTeb4JBgIbFPJCFyng4HwbniWgQJZ1WqaUC nas9J77uICis2WH7N8Bs9jy0wQYezNzqS+FxoNXmDQg2jetX8en4bO2Di7Pmx0jXA4TOb9TM izWDgYvmBE8= In-Reply-To: <20240212-topic-sm8650-gpu-v1-3-708a40b747b5@linaro.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 12.02.2024 11:37, Neil Armstrong wrote: > Add support for the A750 GPU found on the SM8650 platform > > Unlike the the very close A740 GPU on the SM8550 SoC, the A750 GPU > doesn't have an HWCFG block but a separate register set. > > The missing registers are added in the a6xx.xml.h file that would > require a subsequent sync and the non-existent hwcfg is handled > in a6xx_set_hwcg(). These should also be submitted to mesa to make sure the next header sync doesn't wipe them [...] > --- a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c > +++ b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c > @@ -958,10 +958,11 @@ static void a6xx_set_hwcg(struct msm_gpu *gpu, bool state) > struct a6xx_gpu *a6xx_gpu = to_a6xx_gpu(adreno_gpu); > struct a6xx_gmu *gmu = &a6xx_gpu->gmu; > const struct adreno_reglist *reg; > + bool skip_programming = !(adreno_gpu->info->hwcg || adreno_is_a7xx(adreno_gpu)); is_a750? > unsigned int i; > u32 val, clock_cntl_on, cgc_mode; > > - if (!adreno_gpu->info->hwcg) > + if (skip_programming) > return; > > if (adreno_is_a630(adreno_gpu)) > @@ -982,6 +983,25 @@ static void a6xx_set_hwcg(struct msm_gpu *gpu, bool state) > state ? 0x5555 : 0); > } > > + if (!adreno_gpu->info->hwcg) { I don't think this block of code is reachable now, no? Maybe remove the skip_programming and if_a750 here? > + gpu_write(gpu, REG_A7XX_RBBM_CLOCK_CNTL_GLOBAL, 1); > + gpu_write(gpu, REG_A7XX_RBBM_CGC_GLOBAL_LOAD_CMD, state ? 1 : 0); > + > + if (state) { > + gpu_write(gpu, REG_A7XX_RBBM_CGC_P2S_TRIG_CMD, 1); > + > + if (gpu_poll_timeout(gpu, REG_A7XX_RBBM_CGC_P2S_STATUS, val, > + val & BIT(0), 1, 10)) { We should define that bit name (the err suggests it's REG_A7XX_RBBM_GCC_P2S_STATUS_TXDONE or so) [...] > +static inline int adreno_is_a750(struct adreno_gpu *gpu) > +{ > + return gpu->info->chip_ids[0] == 0x43051401; > +} > + > /* Placeholder to make future diffs smaller */ Please also remove this comment now that it's invalid Konrad