From patchwork Thu Mar 23 09:08:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 7085 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:604a:0:0:0:0:0 with SMTP id j10csp2805643wrt; Thu, 23 Mar 2023 02:24:24 -0700 (PDT) Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=UoiSqZAJ X-Google-Smtp-Source: AK7set/uG4kv0sJ1kthKitGO7d/aYfM1pYgiEGeJIfqGMxGc5bdHNE18qPjFhUZDNq69MT2HQKDX X-Received: by 2002:a17:90a:bc85:b0:232:fa13:4453 with SMTP id x5-20020a17090abc8500b00232fa134453mr7180756pjr.13.1679563464677; Thu, 23 Mar 2023 02:24:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679563464; cv=none; d=google.com; s=arc-20160816; b=DK6YyT2zyBVX9e/Ws/dIUPH2CEWWWVAjplUAMsZsdu62LcApxkWc/5sSwE6PiCeKpA UvY1F3DJraf2DE0VNO9RCr2efJmbSMLW68JIhom4Brp1P1M5THNjkn9S6jfhYRxMn/M/ K0SQ0fOLGVj13j8LfUNTvrAKtz5XItsr+Q83Fw3KtKGCnWE6YYd+41XHElUfRteh8K5W O4ScktKnHrBJNv6aFVJVC2suJP5phuL1mVqmD9qBnsx6HfoSos8Fa+NxXXGnufxh9j0U bVK5yERmA+9yQl7ggYggrRp5FXNsraGcs+lBD7qYfHl7MC3TLSp1FonlTAYCCWUTxd2r 3+NA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=LHQGAgtMAIqjV43ml4nZpSHG/TpUVrA5p1TAVDzkd3o=; b=XxFEJpiD20x/jto5/qOh6EjZUy+c6awbqZQSKfLoJePsefINdPBb8/d5S1TEUQRHMg X1GcDzwAaof4UkQ+fRvsAIf/hMOYvgdPy3OGhMJg5jD2DG1T/hf/A/TKuYW8C4vswXns DNjkwIaZGfHOFdxm5Fe9nlWfeBcfkzEPy9h2M4y0ue8HEqZZWP5zB3A2jkMyPp/1DMQD u0INecQS/3SBJYILKere8st5jKNXTXEnvt70ujes9kvWps9QFpsKHIk0rXGz4Jw9B9l5 9kJUt+L9jli5Fz2nheqFSquqDcSehpzdOA+ZQnyTNZyiST2PfQKIw9SARAavuXTWsd1p rBtw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=UoiSqZAJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mm23-20020a17090b359700b00233ca49c5a7si1391650pjb.17.2023.03.23.02.24.12; Thu, 23 Mar 2023 02:24:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=UoiSqZAJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230004AbjCWJJb (ORCPT + 99 others); Thu, 23 Mar 2023 05:09:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54452 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230436AbjCWJJR (ORCPT ); Thu, 23 Mar 2023 05:09:17 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 82F201C304; Thu, 23 Mar 2023 02:08:30 -0700 (PDT) Received: from IcarusMOD.eternityproject.eu (2-237-20-237.ip236.fastwebnet.it [2.237.20.237]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kholk11) by madras.collabora.co.uk (Postfix) with ESMTPSA id 7BEF066030B7; Thu, 23 Mar 2023 09:08:28 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1679562509; bh=FrNqR4ku0iKICaEUucsD1iDyufd8gS7yQCcBq8NLjCk=; h=From:To:Cc:Subject:Date:From; b=UoiSqZAJ+OsBLSjFthKrc7M9zBYhSaip5DgHe5wwELvBcjsM32KCPOrA7w212f/zV BlHbVbKrvnqe//C/9LuPRrKo93J7AFcRskLwwtej/qr9N4VoFL4yUTIwiG94YmPiXz u/1Hl805zVAVQ50Sttvq/9Ygojol5mFGMl9TNSPDpKTPJ129MGO+eYGCMbst4gX9wU iCQRoUmBOpVW9+ff9ch3fszXBGR3rJ1OACE9joDeyGwgG7KVJa5Cz5M22dScnF+6mH Pf+SDZWvLy1eq5txEGN17CAiCU0f8i5UlMQZuFmtV62lCgnruFJQOmLVllcLCmagLi VmOZlujSTW9ig== From: AngeloGioacchino Del Regno To: airlied@gmail.com Cc: daniel@ffwll.ch, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, wenst@chromium.org, steven.price@arm.com, alyssa.rosenzweig@collabora.com, robh@kernel.org, dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@collabora.com, AngeloGioacchino Del Regno Subject: [PATCH v1 RESEND 0/2] Panfrost: GPU Speed-binning support via OPP Date: Thu, 23 Mar 2023 10:08:20 +0100 Message-Id: <20230323090822.61766-1-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.40.0 MIME-Version: 1.0 X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,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 lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761148070797908009?= X-GMAIL-MSGID: =?utf-8?q?1761149939112140802?= The OPP framework supports binning through the 'opp-supported-hw' devicetree property and some of the SoCs that are using Panfrost, namely ... MediaTek, are actually binned. This is especially seen in MT8186, but some other models do actually support the same. This series adds basic binning support by simply checking (and reading) speed-bin from NVMEM (eFuse arrays, usually) and *if and only if* that is provided, adds the read value with devm_pm_opp_set_supported_hw(). This code expects to receive a value that is compatible with how the supported_hw checks work in OPP and it should never contain any kind of platform (or SoC) specific code, since Panfrost is a driver for a GPU that may be tied to different SoCs... and this is what this series provides. Cheers! AngeloGioacchino Del Regno (2): dt-bindings: gpu: mali-bifrost: Document nvmem for speedbin support drm/panfrost: Add basic support for speed binning .../bindings/gpu/arm,mali-bifrost.yaml | 7 +++++ drivers/gpu/drm/panfrost/panfrost_devfreq.c | 30 +++++++++++++++++++ 2 files changed, 37 insertions(+)