From patchwork Sat Jul 4 10:25:21 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: 11645067 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 0575F13B4 for ; Mon, 6 Jul 2020 07:20:15 +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 D6F622073E for ; Mon, 6 Jul 2020 07:20:14 +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="n7SAyMDo" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D6F622073E 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 7E78F6E317; Mon, 6 Jul 2020 07:19: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 D5EE589711 for ; Sat, 4 Jul 2020 10:25:43 +0000 (UTC) Received: by mail-wm1-x341.google.com with SMTP id g10so12384202wmc.1 for ; Sat, 04 Jul 2020 03:25:43 -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=bDNf3J71u1aUfcnNyg8gyy9KZOUzjLKhZpSmplNUzVU=; b=n7SAyMDoC8z9XGY9pGLfmg7j7xlUarueDRBmVPXx5wlzTW+NHKqXBu2H/pL+fr9uxB 3bchYayv83a1Be2PrwfgB1qtqk1SvDPy5asdP3CDEVyPFFKDWEcAk9uQz1NVU2zEIHXW 0o985UdlcDRlVZU7oON3XZpQMvJbk4S7h5C3cb1CQVhDvDyBxH19Qkvzt3079Gt/3q/2 i+jhxpJjTPtex472NFmZIGlnoFj2ZX27DF/ea4TnLT1UA8xyW57TiO1CklA1tE33dTVI iEdEQFVgKkRVyAiOyd1I44rEsdBRPEBB4ApHVIZwc1V7uRlkUA00x7krm7zU4B/D2LvQ vZnA== 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=bDNf3J71u1aUfcnNyg8gyy9KZOUzjLKhZpSmplNUzVU=; b=P77NHMnnylRBkWxiX9rf5CP9RRH4BHPY1C8Q1w9IOefaxgH1qGMq/m6Fjj2HNidVeo 3jL5wC1J8UyCU3NXNWWnbRMP1GnptayN5YGQ0Cehld/rx76E84LXEkwgYziEL/FpRWmx S9NQBMZOr1HtvzZJTrILg33mrlam2rpZrlZed3wZG7ohRlPmBfIDrhW4bfQK29tCUROR Ro6u/686HJuhcsiZlrllLlfOl5lnuBcrV+hApm4RmxzFCl3GlJ1q2U5G/F5qDAgjCfcy ROazjD1rIKYgd+G8Op2gGgrOpQ3tzWPxzjG06tST/eToMR5MnUZlgMc8AeOCDNEMfWOL f2rQ== X-Gm-Message-State: AOAM53233l2OypwhcV3vbn5rA68Sk9YYXC1+i/xMn55SLTqGeS6yC4TG bxBYt6xGhDAMizq9sOtuG48= X-Google-Smtp-Source: ABdhPJyzdD6tO+bRBuPcM+rAdj+oVuvZ4Y1HfXEtSxZXy/ZXO3TR+iENAw9yF6eoD42kE3wPnpRemg== X-Received: by 2002:a1c:6006:: with SMTP id u6mr39776781wmb.111.1593858342397; Sat, 04 Jul 2020 03:25:42 -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 g14sm16421428wrm.93.2020.07.04.03.25.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Jul 2020 03:25:41 -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 v2 00/14] Add regulator devfreq support to Panfrost Date: Sat, 4 Jul 2020 12:25:21 +0200 Message-Id: <20200704102535.189647-1-peron.clem@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Mailman-Approved-At: Mon, 06 Jul 2020 07:19:17 +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 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 | 165 ++++++++++++------ 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, 290 insertions(+), 109 deletions(-)