From mboxrd@z Thu Jan 1 00:00:00 1970 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 0ADED1922EF for ; Mon, 23 Dec 2024 14:50:50 +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=1734965452; cv=none; b=UGpEO87PKrih+hxd0kKJAZZQkS06X8YL72nz8bXiQp+0C0S3Rh9Vx1U/jBzOVZfx9+YskLgfPzSt+9Z51MwubHcjOOZ+oajEHwNs7nVuS5/Xr+pZRpzExz7WQV81IkZCgzmJT+SeHNcO1HxZ1uLH3RNAUy3WvW/BARarguM70aM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734965452; c=relaxed/simple; bh=CTpIvzqv1Iux7dmQXBmiXR7I5I54WRI9a24L33FPH/8=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=AzsxR68ghpWoTE9z/g6AKdz1DkWW8gtUFpZO4cccpN7faoLAse+307EdIVRA41sO2NOvcblDI/2bx4FH/xCUOa+xUvVDbZrI0P5/rijCVK5wcfIl8DQGuclFZ7qSN53hkA4nkw0zirXd6wxwyJF0OzqRtjX+SFdN5IN+IymEfls= 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=lDB4n/CS; 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="lDB4n/CS" Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 4BNCapCP004208 for ; Mon, 23 Dec 2024 14:50:50 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= wlZkphqXmIbiFKi1/5KSMJBOSiSfd/Tur2EcPwMtMKQ=; b=lDB4n/CS/aFu6dFR 9gMEG5MKfcaCAFzjbChnRFIbNxweJJIxaoHlx5f7ezjEo4AlSmnh29xq3B/nEJI/ SizRGRzgMQTmqdOClkfewFd9A1RXAyo8sUKU93oQ+BOskDPyOEuQNj7ttQHOKN94 U4kgNlYX05exMtTP1q2008DUNe0lIJZ4xb+gAHdeNsackpDBXeg8uMYTYl1EeN29 +8LCRtPlfRIY/k/hw5i+v/vgYjg5pchDS7y7oLnUdzNNxYi/CZ502RbRWBFUF7YK Oq153/D0gyEvOPgmqS6fNbhAaaUD1sNHwRzaDBcTSuxsCp6Y01822D/PXvJ8hw0B VXpYqA== 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 43q8168bkk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Mon, 23 Dec 2024 14:50:49 +0000 (GMT) Received: by mail-qk1-f197.google.com with SMTP id af79cd13be357-7b6e43ed084so58041885a.0 for ; Mon, 23 Dec 2024 06:50:49 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734965449; x=1735570249; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=wlZkphqXmIbiFKi1/5KSMJBOSiSfd/Tur2EcPwMtMKQ=; b=nbHsQZfRtqLdcBuBKA05kYRUibjsbUnVT/gGVt9E6FXAh0MC9ADgMSCudhpJZWziaN UK2F4ldpvur83as02pWxJukg+flQaRpH8Y89E3Eso2CeQeKDL2rV53BOurzQTO76Ixcj AZvh6evZhl3jLAOxskmzwT4i2Uhc50tNuPFtWGfA/pgh1TOMziPXM6aIZnzfZowtsqh1 qoQTEA+94qWwT8bWV4PScdvnmq3DdhPA4EHvTvxEFMug8UZF0TxyekFbdUQm4rkspR8n SeLgxIBPKxzyz5CLxCYXntCwCuyzuK+z3kxLBfF6e+l9NWWkhqUoRFMSPYenSEDqQlv2 sM7w== X-Forwarded-Encrypted: i=1; AJvYcCUzPWYGtUyhZebSKb6Ze1+bb0Q6dCfNmmCW4S0cWlLzNZzKIe1BZ1HWVOy3dSDdUbcS0Bn39zVvYQWHG+8=@vger.kernel.org X-Gm-Message-State: AOJu0YwzxE6gaBd2RrIVDrl/Tnw8UDmlz3gRbKhC10qEpyFLZezMbKoi rQPW+DHtfykQ6v7xy+psZ76FlgR87qCxRYVJCfyU8TDQlFD/GKHPipbbLjdiYwLfH4MDKmlJjdz uqMJPcHoN/mQxHrraEAjsIBsJL9CvyvzyBG/nwqJWoRtxLnNXedeSYS4gg+uLGTk= X-Gm-Gg: ASbGncuX7RI7iPsd1+cR1UD7Af4DTUcN5JZ404rnUDzdh8RGNwVfW2rXEI0efRhPhtN ZUj7PdupKEpXX+rc6eR+A4EcUDElXJOqntrT/Xv8AplkXbE5vgtRWxXtkWwzjlF8mXuSEn6fyaJ Jei4dp2tAQC59Qog8H0NIiIvE9ysIIt+2XLWzeYblZGyl3EpgVrapZNE5RV8qZoTLbK3xQtulY2 MP6zpGMCUsSTgm+5c9gOjYCetm2UOtngXeaFdaKXXZb+1e43aNsuCRrnQov2vKIC1b6euqRclp1 QUr57SUVyiPvo4s6P9E+/snNO1qjewZI4fw= X-Received: by 2002:ac8:7c56:0:b0:467:6379:8d2f with SMTP id d75a77b69052e-46a4a9a3aa9mr86518651cf.15.1734965449077; Mon, 23 Dec 2024 06:50:49 -0800 (PST) X-Google-Smtp-Source: AGHT+IFg4F+nk4GXpc7g8L8mccQtbkn90gLkr0vPXtwNZH0T3hETGOnOws+UGYXkZ5e+hEAM71UD/w== X-Received: by 2002:ac8:7c56:0:b0:467:6379:8d2f with SMTP id d75a77b69052e-46a4a9a3aa9mr86518361cf.15.1734965448708; Mon, 23 Dec 2024 06:50:48 -0800 (PST) Received: from [192.168.65.90] (078088045245.garwolin.vectranet.pl. [78.88.45.245]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-aac0e830abfsm535310166b.20.2024.12.23.06.50.46 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 23 Dec 2024 06:50:48 -0800 (PST) Message-ID: Date: Mon, 23 Dec 2024 15:50:46 +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 v6 4/7] drm/msm: adreno: find bandwidth index of OPP and set it along freq index To: Neil Armstrong , Rob Clark , Sean Paul , Konrad Dybcio , Abhinav Kumar , Dmitry Baryshkov , Marijn Suijten , David Airlie , Simona Vetter , Bjorn Andersson , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Akhil P Oommen Cc: linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org References: <20241217-topic-sm8x50-gpu-bw-vote-v6-0-1adaf97e7310@linaro.org> <20241217-topic-sm8x50-gpu-bw-vote-v6-4-1adaf97e7310@linaro.org> Content-Language: en-US From: Konrad Dybcio In-Reply-To: <20241217-topic-sm8x50-gpu-bw-vote-v6-4-1adaf97e7310@linaro.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Proofpoint-ORIG-GUID: RW7zmJfLaPi3iEZUb1WXiEdQglJtLTuW X-Proofpoint-GUID: RW7zmJfLaPi3iEZUb1WXiEdQglJtLTuW X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.60.29 definitions=2024-09-06_09,2024-09-06_01,2024-09-02_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 spamscore=0 suspectscore=0 malwarescore=0 lowpriorityscore=0 bulkscore=0 adultscore=0 clxscore=1015 mlxscore=0 priorityscore=1501 mlxlogscore=999 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2411120000 definitions=main-2412230133 On 17.12.2024 3:51 PM, Neil Armstrong wrote: > The Adreno GPU Management Unit (GMU) can also scale the DDR Bandwidth > along the Frequency and Power Domain level, until now we left the OPP > core scale the OPP bandwidth via the interconnect path. > > In order to enable bandwidth voting via the GPU Management > Unit (GMU), when an opp is set by devfreq we also look for > the corresponding bandwidth index in the previously generated > bw_table and pass this value along the frequency index to the GMU. > > The GMU also takes another vote called AB which is a 16bit quantized > value of the floor bandwidth against the maximum supported bandwidth. > > The AB is calculated with a default 25% of the bandwidth like the > downstream implementation too inform the GMU firmware the minimal > quantity of bandwidth we require for this OPP. Only pass the AB > vote starting from A750 GPUs. > > Since we now vote for all resources via the GMU, setting the OPP > is no more needed, so we can completely skip calling > dev_pm_opp_set_opp() in this situation. > > Reviewed-by: Dmitry Baryshkov > Reviewed-by: Akhil P Oommen > Signed-off-by: Neil Armstrong > --- Reviewed-by: Konrad Dybcio Konrad > > +#define AB_VOTE_MASK GENMASK(31, 16) > +#define MAX_AB_VOTE (FIELD_MAX(AB_VOTE_MASK) - 1) I'm just not 1000% sure about this -1 here Konrad