Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp6186054pxv; Thu, 29 Jul 2021 08:27:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwSXOFFz10GGtadjU54p1Ouglrt+9wU/OsJcV8UDSkbg55fy+L0SZ6bNsuLb/BP1vgOT3zL X-Received: by 2002:a05:6638:449:: with SMTP id r9mr49473jap.137.1627572464615; Thu, 29 Jul 2021 08:27:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627572464; cv=none; d=google.com; s=arc-20160816; b=buxMrsYC3SGD+jabI43P6tNVMJ5MC0bOcQ3cxF3UKE+Q1mBlgEZ4TD0+sBOY4phjLO 9y+YCh/4Glyo75dpFfEsZey5s6Y4zT92dA2cQDG8bbbl0Y5p5ESHPIICOM4dz+mQUYUJ u3CVtw3osrOLP7/hnuXcbo0AJgca8qGyW5p2fD2K0LbLb/XAdpc4w3wqaM1wPRakMmrj pvLrqaZjz9DyiD+nyBdBrLEa6IFyO/ffOYEN5+SnpjpAsvc9ZIjzKsTLEtP2abwyqKRm 2e8MrhwmKAkdcsf1R2uJrwtlQiD2DGrDjlQEAetLdm6JmzSwBF1cgYokSDqCu3QMazKZ HcVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=rBpQQ4PrkRZY0WtM7KbjU/FjfELe0vopn+N+lTuqMUk=; b=ypCXR7r0BOhg8W7A0EpUjfG5lqIJZrRoPh7cQVi9y2c5DD/dF5Q2kbXgC1xz8+xFM7 f0VLQTk+sZoM5ThwMQvqr+hWBXjAVs+ZMrKmZf5wn2Mg9U9fnuUKnfXklfQYJsosiKX7 Q1N+P68/eu++ErL8QNF7rmM2zdmeVqBEFZag6DzZZgV1vyWfOm3kObmaXkkcUpfDqqtE Q42kZD3VRFl4nBfE0C+dmS5e0nTfMI4e3dU4dJjPdOjFKAeMitqTxy3H9LEHOn5Az16F HfO0P3bKGsxj88eZxgHsFHoKbjiJ21WEUCHTqwInTkNujCu7Qigg8em2zOL+l3R3EnFg NMRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Dr+kc8ks; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d2si4205258iow.58.2021.07.29.08.27.31; Thu, 29 Jul 2021 08:27:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Dr+kc8ks; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237992AbhG2PZB (ORCPT + 99 others); Thu, 29 Jul 2021 11:25:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46480 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238020AbhG2PXV (ORCPT ); Thu, 29 Jul 2021 11:23:21 -0400 Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 281B4C0613D3; Thu, 29 Jul 2021 08:23:17 -0700 (PDT) Received: by mail-wm1-x332.google.com with SMTP id l4-20020a05600c1d04b02902506f89ad2dso5975353wms.1; Thu, 29 Jul 2021 08:23:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=rBpQQ4PrkRZY0WtM7KbjU/FjfELe0vopn+N+lTuqMUk=; b=Dr+kc8ks6iyXT9LWSb5Du3HdAHPz7RDalBOKm0Og6v/tOp9R0FVfTLQLEb6YjgcFAZ OODEOtCXWQbWffIcrKm4DBgFkXgZzYwHrt+TnvY8sHMYbODXN5+AC287YYQ1Ml2myFyc lrSos/ncgWbQkBjX/3rJpjjDb/w6OxPEEKcNHNnikoGDo+nLRGD2Lw+wleq+XK+7sWBw xn+dBHPBJMl5k0iAstt3pf8RPQLevB6s/P7bjl/Cxbw+u1yMBrE24gQMmZmmeVacKJeS a5VfkAXtDy6sJ6hPFJv0pet+bPSamucYCLdgJS/zhsmD74VZ85w4fHPzJiF4Ge1OKqbA dyDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=rBpQQ4PrkRZY0WtM7KbjU/FjfELe0vopn+N+lTuqMUk=; b=AC/GqKdxpMX74r0opqPEx49hHRW1AKZL3PWeD6PCGT42KhhUyt2hHkFNBf1Hg26AdX /OrOEaZjqbR5Tz42pXdXCzXv/BpfkHYYM2E3rZmH81ivBd8gc+o4bPBpu3t+Jw9Q/Ijt ITYOSUWntHJK6mj9eOBlA+eWiN7Yqt5xzQ1IH79W5Rbuh/NsFNNGuc/ef5AIi755Gy6o jg1JOkNkkHkwZjxBWgFS86DfrMsP43J15lOIu7K0z9NCGpmjgsX+6tFG95VgEx61Y5ZL 9tloEcabfJzHBJywkFqGKFr7mC2+4OhN/yvi1NnJUh6ieH6x6VbnsUSRptMnFc+RXslN Ax5A== X-Gm-Message-State: AOAM530qMHgLVVSzaaAJrERTs4c5hOVgv9rYEQofvZGWEEzL9A24zMcC zbm2/8/V8ACdJj7W8B44BoBegxNSRRyo79hEXs8= X-Received: by 2002:a05:600c:4401:: with SMTP id u1mr15603401wmn.49.1627572195705; Thu, 29 Jul 2021 08:23:15 -0700 (PDT) MIME-Version: 1.0 References: <20210729200230.v2.1.I110b87677ef16d97397fb7c81c07a16e1f5d211e@changeid> <20210729200230.v2.2.I286ef007fcadd9e6ee3b2c0ad948f990735f9610@changeid> In-Reply-To: <20210729200230.v2.2.I286ef007fcadd9e6ee3b2c0ad948f990735f9610@changeid> From: Rob Clark Date: Thu, 29 Jul 2021 08:27:25 -0700 Message-ID: Subject: Re: [PATCH v2 2/3] drm/msm/a6xx: Use rev to identify SKU To: Akhil P Oommen Cc: freedreno , dri-devel , linux-arm-msm , Jordan Crouse , Matthias Kaehlcke , Jonathan Marek , Douglas Anderson , Daniel Vetter , David Airlie , Sai Prakash Ranjan , Sean Paul , Sharat Masetty , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 29, 2021 at 7:33 AM Akhil P Oommen wrote: > > Use rev instead of revn to identify the SKU. This is in > preparation to the introduction of 7c3 gpu which won't have a > revn. > > Signed-off-by: Akhil P Oommen > --- > > (no changes since v1) > > drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 11 +++++------ > 1 file changed, 5 insertions(+), 6 deletions(-) > > diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c > index 183b9f9..0da1a66 100644 > --- a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c > +++ b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c > @@ -1675,11 +1675,11 @@ static u32 a618_get_speed_bin(u32 fuse) > return UINT_MAX; > } > > -static u32 fuse_to_supp_hw(struct device *dev, u32 revn, u32 fuse) > +static u32 fuse_to_supp_hw(struct device *dev, struct adreno_rev rev, u32 fuse) > { > u32 val = UINT_MAX; > > - if (revn == 618) > + if (adreno_cmp_rev(ADRENO_REV(6, 1, 8, ANY_ID), rev)) Looks like adreno_cmp_rev() ended up in patch 3/3 when it should have been in this patch.. But I guess we could also move this into adreno_is_a618() and use that here BR, -R > val = a618_get_speed_bin(fuse); > > if (val == UINT_MAX) { > @@ -1692,8 +1692,7 @@ static u32 fuse_to_supp_hw(struct device *dev, u32 revn, u32 fuse) > return (1 << val); > } > > -static int a6xx_set_supported_hw(struct device *dev, struct a6xx_gpu *a6xx_gpu, > - u32 revn) > +static int a6xx_set_supported_hw(struct device *dev, struct adreno_rev rev) > { > u32 supp_hw = UINT_MAX; > u16 speedbin; > @@ -1714,7 +1713,7 @@ static int a6xx_set_supported_hw(struct device *dev, struct a6xx_gpu *a6xx_gpu, > } > speedbin = le16_to_cpu(speedbin); > > - supp_hw = fuse_to_supp_hw(dev, revn, speedbin); > + supp_hw = fuse_to_supp_hw(dev, rev, speedbin); > > done: > ret = devm_pm_opp_set_supported_hw(dev, &supp_hw, 1); > @@ -1785,7 +1784,7 @@ struct msm_gpu *a6xx_gpu_init(struct drm_device *dev) > > a6xx_llc_slices_init(pdev, a6xx_gpu); > > - ret = a6xx_set_supported_hw(&pdev->dev, a6xx_gpu, info->revn); > + ret = a6xx_set_supported_hw(&pdev->dev, config->rev); > if (ret) { > a6xx_destroy(&(a6xx_gpu->base.base)); > return ERR_PTR(ret); > -- > QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member > of Code Aurora Forum, hosted by The Linux Foundation. >