Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp2725491rdg; Mon, 16 Oct 2023 12:53:14 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHb40VgRl7HzfblwHXN1N86SbnU0w2LT2LuuG0p5YQS4jerr3uQGKO0w7JNIHMIRwBY//mG X-Received: by 2002:a05:6a20:e10f:b0:173:f3ee:6e77 with SMTP id kr15-20020a056a20e10f00b00173f3ee6e77mr72364pzb.8.1697485994048; Mon, 16 Oct 2023 12:53:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697485994; cv=none; d=google.com; s=arc-20160816; b=n9tUGo73rdrBvOVqGXzMlfZKkW3VVJ/Xuh/k41mSsUuk0nn4aRj9mjfEjJU/5LAhHT fs0Dhmpn6tAwgKQYgzEbJAsCbJ1p/cSpxeadl7EgPjKY+H0z0dORFBo3hdFRW4jb/JuD y1i9yUT4Jo4APX9x75fB1TLgvPpdeYT/4f3i/WQfBAtKAs2Idms2SkqTF2omU31y/KXQ XSt/+5mnCqQzuEXVMAmMt6R4P/l5IEFp66/zcy1WMNaWBzh1/JJGJfiptvQ/pGzJKJj+ Nh69S1i+frqLs36uWCkuNafL8DQAPzXf2lQOLrR5OjCYKE92N0ozpkC4puUshilNZueV ycVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=CSfTVt3cN4X2d6P5ijagINIHmjZ2J0w7LRo2wDpzxQs=; fh=VKLZnvUaLRN/aiyV/zd0/IG5wivChj9XVyPKwK+eWNI=; b=ynG7q0Ey1CuzuhGEnpuRuLQPMdv05Vsq3eeGwtbqIKNvbvAKQSfsc8DXLZHt/thH6N 3dUHbO8ygxGZK5arDMirMDlBjegQC/9CYJX3GpOzNbdOwHOj0k+UhjLdQ0mvNcX5OhrN B7kQVnfLNoJEVNOkHW/6sA8w+SVluNJ8FNAwzQt4xMd9BWXnRreZMBXe92G/eacji0C/ PuuSCGJ/FFEEYdOOO1sLP1UxJqY3hybR/EJ9/r+ntD1yAxs9USryW/LrSgbeIXtJLka0 tpgCBp4g6EHy8gnG013XjPpdYihAw3riR7tq9+h6B2k4BRJtyKie2FT2Z4+rxfMrqtvl WFfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=hP2cbTWo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id i4-20020a170902eb4400b001c9e3c866casi41357pli.19.2023.10.16.12.53.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Oct 2023 12:53:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=hP2cbTWo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 64F1E80A416B; Mon, 16 Oct 2023 12:53:11 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233886AbjJPTw7 (ORCPT + 99 others); Mon, 16 Oct 2023 15:52:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35980 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233853AbjJPTw5 (ORCPT ); Mon, 16 Oct 2023 15:52:57 -0400 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EE7ABF2; Mon, 16 Oct 2023 12:52:54 -0700 (PDT) Received: from pps.filterd (m0279870.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 39GIQZef032666; Mon, 16 Oct 2023 19:52:38 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=qcppdkim1; bh=CSfTVt3cN4X2d6P5ijagINIHmjZ2J0w7LRo2wDpzxQs=; b=hP2cbTWoVW5mnUzjTn0W+hbejfwFE7oN5vjANqS8Bsv3mGspvyEA4DjkQyqWk1ogSPbV 2cOQcDPe+fAkejoG4dszfzDPU/EYo0fA8XTRYoVg90ExIdiCGul9GsZvcj784r50Gs3i 3Dsgn/K0br+V2/qo5yIclVE8UzTXP/O2UJQbcekUnLiNQUkRjtvM8+Gi97Z0y6RKaL2z WkXVBY5mYGLXcw7m245K8NVT+L48mgHXjZbdNKD+6wxu9qtEa0SZjwmiTxFA6nbCMBZh mJIDhJ33gHBp/wQ5orB3E3PLLERWekC3qoWQh9WNLO4da4z7CgrUGv76JwJg2A+CYWTW og== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3tsaf0r7sd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 16 Oct 2023 19:52:38 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA03.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 39GJqbns006120 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 16 Oct 2023 19:52:37 GMT Received: from akhilpo-linux.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.39; Mon, 16 Oct 2023 12:52:30 -0700 Date: Tue, 17 Oct 2023 01:22:27 +0530 From: Akhil P Oommen To: Konrad Dybcio CC: Rob Clark , Abhinav Kumar , Dmitry Baryshkov , Sean Paul , David Airlie , Daniel Vetter , , Andy Gross , Bjorn Andersson , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Stephen Boyd , Marijn Suijten , Luca Weiss , "Rob Clark" , , , , , Subject: Re: [PATCH 1/7] drm/msm/a6xx: Fix unknown speedbin case Message-ID: References: <20230926-topic-a643-v1-0-7af6937ac0a3@linaro.org> <20230926-topic-a643-v1-1-7af6937ac0a3@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20230926-topic-a643-v1-1-7af6937ac0a3@linaro.org> X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: -A8NT9JnHrPrI5PwlHH6CjgHuQP9ALY4 X-Proofpoint-ORIG-GUID: -A8NT9JnHrPrI5PwlHH6CjgHuQP9ALY4 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.980,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-10-16_10,2023-10-12_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1011 suspectscore=0 priorityscore=1501 bulkscore=0 adultscore=0 mlxlogscore=999 malwarescore=0 mlxscore=0 impostorscore=0 spamscore=0 lowpriorityscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2309180000 definitions=main-2310160173 X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Mon, 16 Oct 2023 12:53:11 -0700 (PDT) On Tue, Sep 26, 2023 at 08:24:36PM +0200, Konrad Dybcio wrote: > > When opp-supported-hw is present under an OPP node, but no form of > opp_set_supported_hw() has been called, that OPP is ignored by the API > and marked as unsupported. > > Before Commit c928a05e4415 ("drm/msm/adreno: Move speedbin mapping to > device table"), an unknown speedbin would result in marking all OPPs > as available, but it's better to avoid potentially overclocking the > silicon - the GMU will simply refuse to power up the chip. > > Currently, the Adreno speedbin code does just that (AND returns an > invalid error, (int)UINT_MAX). Fix that by defaulting to speedbin 0 > (which is conveniently always bound to fuseval == 0). Wish we documented somewhere that we should reserve BIT(0) for fuse val=0 always and assume that would be the super SKU. Reviewed-by: Akhil P Oommen -Akhil > > Fixes: c928a05e4415 ("drm/msm/adreno: Move speedbin mapping to device table") > Signed-off-by: Konrad Dybcio > --- > drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c > index d4e85e24002f..522ca7fe6762 100644 > --- a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c > +++ b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c > @@ -2237,7 +2237,7 @@ static int a6xx_set_supported_hw(struct device *dev, const struct adreno_info *i > DRM_DEV_ERROR(dev, > "missing support for speed-bin: %u. Some OPPs may not be supported by hardware\n", > speedbin); > - return UINT_MAX; > + supp_hw = BIT(0); /* Default */ > } > > ret = devm_pm_opp_set_supported_hw(dev, &supp_hw, 1); > > -- > 2.42.0 >