From patchwork Fri Jul 10 09:53:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= X-Patchwork-Id: 11661801 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3FA821510 for ; Tue, 14 Jul 2020 07:06:05 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1DA852076D for ; Tue, 14 Jul 2020 07:06:05 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ejILNa5r" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1DA852076D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 138B76E930; Tue, 14 Jul 2020 07:02:52 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm1-x342.google.com (mail-wm1-x342.google.com [IPv6:2a00:1450:4864:20::342]) by gabe.freedesktop.org (Postfix) with ESMTPS id CD23D6EBBD for ; Fri, 10 Jul 2020 09:54:13 +0000 (UTC) Received: by mail-wm1-x342.google.com with SMTP id 17so5262504wmo.1 for ; Fri, 10 Jul 2020 02:54:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=uS74RW3R7oVrVUcdeGz+IwEJ/hodNEH2pQb2ItCjHlw=; b=ejILNa5rnxbthqxA80AceNynfoEltSRLhAzv3sLbCnMZ3ljvh7YG1dB3RObjmrMZB0 Ybjqg1o+Y/+eMN7Vf24D9gGIJpgdEw+TFrvoDAazs/6Coh5Jps3SyomJ3lzbnBh9lyax nG821Fpjz5ip2XIC7uXG5jccFddLtu6mJf8kf5pvRPndMhvu4ksp58uFqDhMRhoDaQcF GEmiLMiQkFMlVW7t1iAvXORhIzwFsU7/NgF0Lx39EaJFJkaqQ22KxIIWerrLHemTpf7y hrKNIVRKjOGjRKgUFUdV7SPxZFkaPhDGTTNjKSP0n0OPp01RKahEH5DXfjhieLQ4d9RY eqfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=uS74RW3R7oVrVUcdeGz+IwEJ/hodNEH2pQb2ItCjHlw=; b=W8Iaj0+HtiKZaLzC1WQegeajPfjXzwg8ShVeWadp0H92O/oCcdrjNlmipQnBRF/xiE n8dxiygNsPAW8OJYzci2PbASU4GSLfrmydryXeZa+v/hYR4WgwTOHyeYx6H/gQl2C1/z D9sIi/oidpzCHZJUpvQx9ZW4ibssQ/EqOOEqLJlO4h80n7H4Ze6JKXnJMf16A5dBhv7t R3i0pcFarcRob6jLGPz2U7H8PjfUtA+9wvKmzGbDsRqW5CuO/gOmLjW0Csv/D72CWxHa nmMk9SFGy+/S6LnnhYEyEK2Y51hS852FHlbe4Y1jbI+JF1Rkp4M4j0VzTIfF8PoVVoFv f3jQ== X-Gm-Message-State: AOAM5318Cl5SorSvXAPAYhs7c1fLM/GwKKXitkDcrj/4ZMmtjaiHLth0 LpGWo9AYfpQ20a9Zj6xbecNRTbW6AhU= X-Google-Smtp-Source: ABdhPJzrC/ZiUbGKpJ84xvjFBKwLntuX+nYt1kRH1Pkpr10cGiOjqiIDkFm8v2CTnAcrKHwkKQMaCA== X-Received: by 2002:a7b:cc91:: with SMTP id p17mr4620435wma.90.1594374852364; Fri, 10 Jul 2020 02:54:12 -0700 (PDT) Received: from clement-Latitude-7490.numericable.fr (213-245-241-245.rev.numericable.fr. [213.245.241.245]) by smtp.gmail.com with ESMTPSA id u23sm10176092wru.94.2020.07.10.02.54.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Jul 2020 02:54:11 -0700 (PDT) From: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= To: Rob Herring , Tomeu Vizoso , Steven Price , Alyssa Rosenzweig , Viresh Kumar , Nishanth Menon , Stephen Boyd , Maxime Ripard , Chen-Yu Tsai Subject: [PATCH v5 00/14] Add regulator devfreq support to Panfrost Date: Fri, 10 Jul 2020 11:53:55 +0200 Message-Id: <20200710095409.407087-1-peron.clem@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Mailman-Approved-At: Tue, 14 Jul 2020 07:02:08 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Hi, This serie cleans and adds regulator support to Panfrost devfreq. This is mostly based on comment for the freshly introduced lima devfreq. We need to add regulator support because on Allwinner the GPU OPP table defines both frequencies and voltages. First patches [01-07] should not change the actual behavior and introduce a proper panfrost_devfreq struct. Regards, Clément Changes since v4: - Fix missed a pfdev to &pfdev->devfreq during rebase Changes since v3: - Collect Steven Price reviewed-by tags - Rebase on next/master (next-20200709) Changes since v2: - Collect Alyssa Rosenzweig reviewed-by tags - Fix opp_set_regulator before adding opp_table (introduce in v2) - Call err_fini in case opp_add_table failed Changes since v1: - Collect Steven Price reviewed-by tags - Fix spinlock comment - Drop OPP clock-name patch - Drop device_property_test patch - Add rename error labels patch Clément Péron (14): drm/panfrost: avoid static declaration drm/panfrost: clean headers in devfreq drm/panfrost: don't use pfdevfreq.busy_count to know if hw is idle drm/panfrost: introduce panfrost_devfreq struct drm/panfrost: use spinlock instead of atomic drm/panfrost: properly handle error in probe drm/panfrost: rename error labels in device_init drm/panfrost: move devfreq_init()/fini() in device drm/panfrost: dynamically alloc regulators drm/panfrost: add regulators to devfreq arm64: defconfig: Enable devfreq cooling device arm64: dts: allwinner: h6: Add cooling map for GPU [DO NOT MERGE] arm64: dts: allwinner: h6: Add GPU OPP table [DO NOT MERGE] arm64: dts: allwinner: force GPU regulator to be always .../dts/allwinner/sun50i-h6-beelink-gs1.dts | 1 + arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 102 ++++++++++ arch/arm64/configs/defconfig | 1 + drivers/gpu/drm/panfrost/panfrost_devfreq.c | 175 ++++++++++++------ drivers/gpu/drm/panfrost/panfrost_devfreq.h | 30 ++- drivers/gpu/drm/panfrost/panfrost_device.c | 61 +++--- drivers/gpu/drm/panfrost/panfrost_device.h | 14 +- drivers/gpu/drm/panfrost/panfrost_drv.c | 15 +- drivers/gpu/drm/panfrost/panfrost_job.c | 10 +- 9 files changed, 296 insertions(+), 113 deletions(-)