Message ID | 20231102142643.75288-1-angelogioacchino.delregno@collabora.com |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:8f47:0:b0:403:3b70:6f57 with SMTP id j7csp393602vqu; Thu, 2 Nov 2023 07:27:31 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG8bVp1Evi1N9kJJq53ki5YOt8csKEyG2alxd4521JgpQ4bhJJMQEdRTRUX1DYm8epkrTct X-Received: by 2002:a05:6a21:789c:b0:13a:59b1:c884 with SMTP id bf28-20020a056a21789c00b0013a59b1c884mr23424975pzc.40.1698935251441; Thu, 02 Nov 2023 07:27:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698935251; cv=none; d=google.com; s=arc-20160816; b=dnF3gIT0FsqWiNE3iGG+zPzDDMc9HQ38VBHpH4O7PtL3VSHK1QR/ioGoYeLM5kghLh 0bJDEq65Jgq+0XsgQj/DlebDDoC8ttQJaZEi/cESx4VhQntAjCrAJsZhbqrH6qH0As8p c9AqTVr/R6q+AA40OD2lmvC5HZJmx5KKrtBaJcdZ/0C3p/khtzS5G5vt5xvp9US5uvB2 K1IHRHniC11rzw3Pd06ctCGVwY+hvGV/gkfOyXCKpZW6f/fY0Ry3GuVY2NzRpn3Vr4+Y VtrDtZ1nUIVvwxkI7eh/K3JBuRQNnEMbypBHSsDAn3j1ZwnY3uQ2o+JIWmInnWLpURyJ 2e7Q== 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=uFC51jUCiD+TfZMcsWXvJdi/DpbRnawkhKRH/otTWVc=; fh=tAWvjMAEmVD3R8FzmIRYzQIb+yW9J+gWZJ2R8deHkVw=; b=00gOEefnQ8zN0GXfEGsRb2fRgVQwy6rPek9URhHV0u08DbJcSB11lKU6X6wLqfM+rU OOTLtREJHH7yLuVaqTWG3Xg5VepgVEFoVHJZ5nJ7zmuhh30xf44Lkld0qhooVlog5n24 ho6KNsw6W2YVY/5w4QnZmGSryazddnoQ7I1kdYgGxhXTff+K4DJI44CWQxoahgn0zY/Y HPusXmQwH9v+5zahuxa6eibrcswMktW2MSDZhaf5QLrW9ItUnhpoX4euqHrbdkBPhLIc KF2A/PKtzqk3alKlXvGiBZAt37Q8j+e757/S0cUnc3C9gUXIqFjStbvQRy9NsL/LqJzA tvTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=nf9vCH+T; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id x4-20020aa78f04000000b0069d1639f09esi3448372pfr.190.2023.11.02.07.27.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Nov 2023 07:27:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=nf9vCH+T; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id AFCAC816F07B; Thu, 2 Nov 2023 07:27:21 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376808AbjKBO07 (ORCPT <rfc822;lhua1029@gmail.com> + 36 others); Thu, 2 Nov 2023 10:26:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51914 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1376805AbjKBO06 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 2 Nov 2023 10:26:58 -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 A085F182 for <linux-kernel@vger.kernel.org>; Thu, 2 Nov 2023 07:26:52 -0700 (PDT) Received: from IcarusMOD.eternityproject.eu (cola.collaboradmins.com [195.201.22.229]) (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 78F676607033; Thu, 2 Nov 2023 14:26:50 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1698935211; bh=9GMhC2yt36ap/zAAo8V+ZL0ifbAtyw1ee9xuPYWYQSk=; h=From:To:Cc:Subject:Date:From; b=nf9vCH+Ti918+P754lcH9ER+SxHxpuLwR8ATKXU1r0qYJpQ2/1B/ManBRSLWy7AUP rb94j73ufD/HUcy9zjN4BW9DXPD4cJ6p1Sv27WcJcN0xG/X1r/gXZZFJLJaYJ+DSN2 JKn4AYyHwS+MjhIZNrGTE5iTJ0wJCrztPe64xLRL2UL/wFEd4Gvt2/bdwErFItArHV n142SD/SrlHroE9CPTacgL+b3MPS1SyJ9DWsjM2kAlaHj7V0w/kEo7x24J39PeQH5p PiGwWsnpZzzgfm7tZFouMkzR+0g8XZ04foYp9w30kMwNhy7NdvypDPp4aN/yMvDwGI gebKvdFCxrYpw== From: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> To: boris.brezillon@collabora.com Cc: robh@kernel.org, steven.price@arm.com, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com, daniel@ffwll.ch, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, wenst@chromium.org, AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>, kernel@collabora.com Subject: [PATCH v2 0/6] drm/panfrost: Turn off clocks and regulators in PM Date: Thu, 2 Nov 2023 15:26:37 +0100 Message-ID: <20231102142643.75288-1-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Thu, 02 Nov 2023 07:27:21 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1781462730041675013 X-GMAIL-MSGID: 1781462730041675013 |
Series |
drm/panfrost: Turn off clocks and regulators in PM
|
|
Message
AngeloGioacchino Del Regno
Nov. 2, 2023, 2:26 p.m. UTC
Changes in v2: - Added hard reset GPU recovery - Tightened polling time for soft reset and power on - New execution time measurements after poweroff fix (see [1]) [1]: https://lore.kernel.org/all/20231102141507.73481-1-angelogioacchino.delregno@collabora.com/ At least MediaTek platforms are able to get the GPU clocks and regulators completely off during system suspend, allowing to save a bit of power. Panfrost is used on more than just MediaTek SoCs and the benefits of this can be variable across different SoC models and/or different SoCs from different manufacturers: this means that just adding this ability for all could result in unexpected issues and breakages on untested SoCs. For the aforemenetioned reasons, turning off the clocks and/or regulators was implemented inside of a capabilities barrier that shall be enabled on a per-SoC basis (in the panfrost_compatible platform data) after testing of both benefits and feasibility. In this series, I am adding the ability to switch on/off clocks and regulators and enabling that on all MediaTek platforms, as I was able to successfully test that on multiple Chromebooks featuring different MediaTek SoCs; specifically, I've manually tested on MT8186, MT8192 and MT8195, while MT8183 got tested only by KernelCI. Cheers! AngeloGioacchino Del Regno (6): drm/panfrost: Perform hard reset to recover GPU if soft reset fails drm/panfrost: Tighten polling for soft reset and power on drm/panfrost: Implement ability to turn on/off GPU clocks in suspend drm/panfrost: Set clocks on/off during system sleep on MediaTek SoCs drm/panfrost: Implement ability to turn on/off regulators in suspend drm/panfrost: Set regulators on/off during system sleep on MediaTek SoCs drivers/gpu/drm/panfrost/panfrost_device.c | 78 ++++++++++++++++++++-- drivers/gpu/drm/panfrost/panfrost_device.h | 13 ++++ drivers/gpu/drm/panfrost/panfrost_drv.c | 3 + drivers/gpu/drm/panfrost/panfrost_gpu.c | 22 +++--- drivers/gpu/drm/panfrost/panfrost_regs.h | 1 + 5 files changed, 105 insertions(+), 12 deletions(-)