From patchwork Fri Jul 10 09:25:34 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: 11661593 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 74B5413B6 for ; Tue, 14 Jul 2020 07:02:58 +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 52E60221ED for ; Tue, 14 Jul 2020 07:02:58 +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="UYk1cfsi" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 52E60221ED 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 BC1356E8ED; Tue, 14 Jul 2020 07:02:30 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm1-x341.google.com (mail-wm1-x341.google.com [IPv6:2a00:1450:4864:20::341]) by gabe.freedesktop.org (Postfix) with ESMTPS id BA3A96E082 for ; Fri, 10 Jul 2020 09:25:53 +0000 (UTC) Received: by mail-wm1-x341.google.com with SMTP id l2so5175287wmf.0 for ; Fri, 10 Jul 2020 02:25:53 -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=SkCUMnau7wnh370CWTBdQrZya4Pn73aX8uOog7kVa2E=; b=UYk1cfsifyvuGjnTw8dAHN4r78tIvcbD3PqzKIc+DeXtTlhlCvLN5VRA8MRoYzGoHR IK4lmrCyR3uRX/nbRMvBM7/uMwKF8qtAjOov7YcLERv8zHxk6ng+1NxInm92+SJ6Akqa ojkE2EFETlJl+LwwP3FefzD/qTWHp7MxtBmG2TQeIPzfSy/FyygYlSdGYJgnkuYPYad/ yIYysbpCmV3rG3OHifCECL4mG6YWxczbVNA00WW8NZIiHlBXSxmyuwxh4ac9ZKfTzXTb bkZjHGkP27D9ywFcOR/pcp7dr+5NOm9QgJ5qN/alyfRvjN8mB0aY2UqbrY8dQ2sOGld1 IONw== 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=SkCUMnau7wnh370CWTBdQrZya4Pn73aX8uOog7kVa2E=; b=j5veh4sYzW3vaJA907niNcJnYDEpoNNgTviwoAIczav2r/JDBKqVGgfJSqAVEipt88 k6/PWo0BCMBxAiRZl2qZpHaVu2eRbFwhZoZaWqJkeN+WEShEnujZFIRLZCIm2I+DGbPn w65tMcWMPFeENeEoQAhWoNcWw/HXBLxtaxcXyZoS0Wz4SvG3Vg/sWL4YJRBJTKlFCWCn Ocmfuj3D1M79fBXRyEtZiOhWAJPNVgGvSQfzPt3Qi3sYKf64T4KqXOr60Lf/qZx7YD/C /kHdtCja5WAyqjOe5Q4O0rA8oDRJ8vx7CGgoTuovIdnbLSq9Ir9/o4C+HQYOt+jgrGSP xnig== X-Gm-Message-State: AOAM530GRFltuo7RBkEDJ+kz9k8bMWieJPvYQ7U4JyWBgIUZgONu9aa8 tHyPfKe6lUfRxmyA/Q425Ss= X-Google-Smtp-Source: ABdhPJykwFKqd3Ulm4muDnruAlm7cK5WE0WlSGnkadjFhkFQp/pGh88FXxmcyBKPb7h52m9nMhehww== X-Received: by 2002:a1c:23d0:: with SMTP id j199mr4520599wmj.12.1594373152253; Fri, 10 Jul 2020 02:25:52 -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 h23sm8179559wmb.3.2020.07.10.02.25.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Jul 2020 02:25:51 -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 v4 00/14] Add regulator devfreq support to Panfrost Date: Fri, 10 Jul 2020 11:25:34 +0200 Message-Id: <20200710092548.316054-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 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 | 8 +- 9 files changed, 295 insertions(+), 112 deletions(-)