Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp1174024pxb; Fri, 21 Jan 2022 11:27:08 -0800 (PST) X-Google-Smtp-Source: ABdhPJx8i7N/BtR9VQB9VlAERjPyHXijVWpxU0vxMsMJ2UUk9qyyz3YndVEc3X9W5H8SEY6D6zDN X-Received: by 2002:a17:903:11c6:b0:149:a969:7825 with SMTP id q6-20020a17090311c600b00149a9697825mr5257852plh.33.1642793228191; Fri, 21 Jan 2022 11:27:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642793228; cv=none; d=google.com; s=arc-20160816; b=MIAOLNYyMROvQSmiFLMbRGwcBOAxgcz8ivYeTcm3QxXpmACuNIRrQritlCp9LJpfWx jcvDZNBZdwXIc3vfJj4ofteWgEk1dzm48ksaJB7ijCyPjNeFIalP1Do43ypyFZ2xgSQv 2y8m55LzU0AbadnfXyYXZsdhrWOLpyvmxqT/6I9dtUx6D31SB6n+nGRVVVR2R1PHTbYc yPu2Ewoa1wnsaJst5wbeg1UUkR1+Nv4Zv3PnTjrmZAxnv7P0jZbzUnFzCgbSwlSPr3Rs TrllP7iJymuV09acnXH/MHdHbJ4QcY54ljWC2cMPDXpe2POuOCxW7QZ0Flg4dstjq7LG v+kQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:dmarc-filter:sender:dkim-signature; bh=z0CF6GMuySFdCotlarkg0D02PhzzjoNqZJ5fMs0Cd3k=; b=KJw1k9nKvCKzjwP22W9UMym+BalCtVJr17cDzwOIP2P+bt0C5Jb9fzgDWDq5GuM1PX aHZNF32mA65O7LYoOogHyDDWRWVmdImMMJjuGRzpz1fLG2x/oRnsiycsM37IraKqOOw6 R0HwULzTV4qLabXzjSCU9slabDruLrEO257x2zaW7I2odO3yFOxJpFeM16Fe90LIJr9u EL8WEYVBdujWvTnnyMcOdGbuOC0ICBOjgngcxxWVltIbv6oMNcjVqWz46EPmTI5X7lgJ nWDxq330CIrjcLSbeESzg6uYU4ADDHlZrBRCc6/rSFVDYuVeJTPBjnUH1wVrEhfR+wGI Bb0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=mrSI+dgZ; 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=fail (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q199si7427834pgq.643.2022.01.21.11.26.55; Fri, 21 Jan 2022 11:27:08 -0800 (PST) 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=@mg.codeaurora.org header.s=smtp header.b=mrSI+dgZ; 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=fail (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1355792AbiASPWT (ORCPT + 99 others); Wed, 19 Jan 2022 10:22:19 -0500 Received: from m43-7.mailgun.net ([69.72.43.7]:60638 "EHLO m43-7.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1355685AbiASPVr (ORCPT ); Wed, 19 Jan 2022 10:21:47 -0500 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1642605706; h=References: In-Reply-To: Message-Id: Date: Subject: Cc: To: From: Sender; bh=z0CF6GMuySFdCotlarkg0D02PhzzjoNqZJ5fMs0Cd3k=; b=mrSI+dgZ/i9yXO+c8ZgzxZgNFvg2yGu/mXC4il5eN20q+w1uibhyy49InxHNrCRSdHIHKZx1 6Dg0amKuBGSe9QEuK3LwfG4/4v6+qvCZHbIJ5C+BPJnLt/6ElmP6D8eh9hTNmPVo782i6xXv V5PcrBVeGjeGsmlJMbZrCPSUyn8= X-Mailgun-Sending-Ip: 69.72.43.7 X-Mailgun-Sid: WyI0MWYwYSIsICJsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n04.prod.us-west-2.postgun.com with SMTP id 61e82c897e1ee9b1c184827e (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Wed, 19 Jan 2022 15:21:45 GMT Sender: quic_akhilpo=quicinc.com@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 65540C43616; Wed, 19 Jan 2022 15:21:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=ALL_TRUSTED,BAYES_00,SPF_FAIL autolearn=no autolearn_force=no version=3.4.0 Received: from hyd-lnxbld559.qualcomm.com (unknown [202.46.22.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: akhilpo) by smtp.codeaurora.org (Postfix) with ESMTPSA id 5FB3FC4361B; Wed, 19 Jan 2022 15:21:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 smtp.codeaurora.org 5FB3FC4361B Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=fail (p=none dis=none) header.from=quicinc.com Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=fail smtp.mailfrom=quicinc.com From: Akhil P Oommen To: freedreno , dri-devel@lists.freedesktop.org, linux-arm-msm@vger.kernel.org, Rob Clark , OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS , Dmitry Baryshkov Cc: Abhinav Kumar , Daniel Vetter , David Airlie , Jonathan Marek , Jordan Crouse , Sai Prakash Ranjan , Sean Paul , Stephen Boyd , linux-kernel@vger.kernel.org Subject: [PATCH v2 3/4] drm/msm/adreno: Expose speedbin to userspace Date: Wed, 19 Jan 2022 20:51:20 +0530 Message-Id: <20220119205012.v2.3.I86c32730e08cba9e5c83f02ec17885124d45fa56@changeid> X-Mailer: git-send-email 2.7.4 In-Reply-To: <20220119205012.v2.1.Ibac66e1e0e565313bc28f192e6c94cb508f205eb@changeid> References: <20220119205012.v2.1.Ibac66e1e0e565313bc28f192e6c94cb508f205eb@changeid> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Expose speedbin through MSM_PARAM_CHIP_ID parameter to help userspace identify the sku. Signed-off-by: Akhil P Oommen --- Changes in v2: - Use SKU in chipid PARAM only in new targets (Rob) drivers/gpu/drm/msm/adreno/adreno_gpu.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/msm/adreno/adreno_gpu.c b/drivers/gpu/drm/msm/adreno/adreno_gpu.c index f33cfa4..807d9ff 100644 --- a/drivers/gpu/drm/msm/adreno/adreno_gpu.c +++ b/drivers/gpu/drm/msm/adreno/adreno_gpu.c @@ -242,10 +242,12 @@ int adreno_get_param(struct msm_gpu *gpu, uint32_t param, uint64_t *value) *value = !adreno_is_a650_family(adreno_gpu) ? 0x100000 : 0; return 0; case MSM_PARAM_CHIP_ID: - *value = adreno_gpu->rev.patchid | - (adreno_gpu->rev.minor << 8) | - (adreno_gpu->rev.major << 16) | - (adreno_gpu->rev.core << 24); + *value = (uint64_t) adreno_gpu->rev.patchid | + (uint64_t) (adreno_gpu->rev.minor << 8) | + (uint64_t) (adreno_gpu->rev.major << 16) | + (uint64_t) (adreno_gpu->rev.core << 24); + if (!adreno_gpu->info->revn) + *value |= ((uint64_t) adreno_gpu->rev.sku) << 32; return 0; case MSM_PARAM_MAX_FREQ: *value = adreno_gpu->base.fast_rate; -- 2.7.4