From patchwork Sun Jan 12 00:16:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Blumenstingl X-Patchwork-Id: 11329179 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 7BBCF109A for ; Sun, 12 Jan 2020 12:37: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 5967E214AF for ; Sun, 12 Jan 2020 12:37:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=googlemail.com header.i=@googlemail.com header.b="uZapQ+by" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5967E214AF Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=googlemail.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 023A26E50B; Sun, 12 Jan 2020 12:36:24 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) by gabe.freedesktop.org (Postfix) with ESMTPS id 975BA6E4AB for ; Sun, 12 Jan 2020 00:16:45 +0000 (UTC) Received: by mail-wr1-x441.google.com with SMTP id d16so5173094wre.10 for ; Sat, 11 Jan 2020 16:16:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=AjUv0l8hskCQu/sfhTW+zT+JFalMEnxaLpHc5wjsSrk=; b=uZapQ+by1rty3HyhlkQGQkL4kSQRFma4TxmcNEsHnvBp7pkpTBMBX3vgVUMG3/IClu IdHTMtYLKZeVzzvg+Qfdyi/l7s5XskJDnMxZRuZsGRBMoTHlDD+YnLEQHQ5eS3CFXphI HIDuL1wMXLwd/+ib2+jlhodUqkboDBpYVhCZ5GkTDadamEcaOfwQJfCx6JGEM9subtBS xfJqEWOS4NkPl+/XTRZ0RgtsvZMJu96IjLswacwCUb09BNsTfFjIpPpEW6Fjh+gXEaQ5 2Sm1qgWUR++mXkO7AZvhOE5GSRKeOomTQo9+/4P8ZcgDTlCPaCdNAgc4uKiDO5BU5VQB r3Rg== 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=AjUv0l8hskCQu/sfhTW+zT+JFalMEnxaLpHc5wjsSrk=; b=CEny4OoSeIo+unw5fH33FPmyvFp3H51ez/pt7H0AVRB2U414QBIJkIfzZIiQYT7cSe YpopNPAZuswpiFnRGeoqygd3YUxduZ2quCflSj6M+ftxe4aX8+8W4+WbCfP8bK1qvzx6 pb7VNph7KaAVtKZxX1VN+gGz67pzzufM0qFkqsuzqYoNbLySRcANvhKvjNnjQwxNxojq Y1I2eI2hDxQthdrcgqXZwfv5pGiNKnF0fHKjqs9DzmTs4i7I+lCvUBRLEPigzDyWGmIo K1JebmpOBgEHB5VLjm4tzmACAsz/gpG2W32/+UnTK0IIgMkYa3uIVqx4MxeQBzvN7SDF vRaw== X-Gm-Message-State: APjAAAWesl2SfzllCCMAWYygfYQscxhIjj7Q2+yqQ3trSK4OYPU/7RLn 50DqTVrq+2RrTXQAK2fXQZxsVGO/ X-Google-Smtp-Source: APXvYqwxgbwC6cX6oTmsyFU5iWJhMbjSDPZ+lTlZ+fPIHUdsXfTc9BQoIDqOEKQOSfKrzV9ga6hutw== X-Received: by 2002:a5d:44cd:: with SMTP id z13mr10795278wrr.104.1578788203919; Sat, 11 Jan 2020 16:16:43 -0800 (PST) Received: from localhost.localdomain (p200300F1373A1900428D5CFFFEB99DB8.dip0.t-ipconnect.de. [2003:f1:373a:1900:428d:5cff:feb9:9db8]) by smtp.googlemail.com with ESMTPSA id h66sm8575535wme.41.2020.01.11.16.16.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 Jan 2020 16:16:43 -0800 (PST) From: Martin Blumenstingl To: dri-devel@lists.freedesktop.org, alyssa@rosenzweig.io, steven.price@arm.com, tomeu.vizoso@collabora.com, robh@kernel.org Subject: [PATCH RFT v2 0/3] devfreq fixes for panfrost Date: Sun, 12 Jan 2020 01:16:20 +0100 Message-Id: <20200112001623.2121227-1-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.24.1 MIME-Version: 1.0 X-Mailman-Approved-At: Sun, 12 Jan 2020 12:36:09 +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: airlied@linux.ie, linux-kernel@vger.kernel.org, Martin Blumenstingl , linux-rockchip@lists.infradead.org, sudeep.holla@arm.com, linux-amlogic@lists.infradead.org, robin.murphy@arm.com Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" These are a bunch of devfreq fixes for panfrost that came up in a discussion with Robin Murphy during the code-review of the lima devfreq patches: [0] I am only able to test patch #1 properly because the only boards with panfrost GPU that I have are using an Amlogic SoC. We don't have support for the OPP tables or dynamic clock changes there yet. So patches #2 and #3 are compile-tested only. Changes since v1 at [1] - added Steven's Reviewed-by to patch #2 (thank you!) - only use dev_pm_opp_put_regulators() to clean up in panfrost_devfreq_init() if regulators_opp_table is not NULL to fix a potential crash inside dev_pm_opp_put_regulators() as spotted by Steven Price (thank you!). While here, I also switched to "goto err" pattern to avoid lines with more than 80 characters. Known discussion topics (I have no way to test either of these, so I am looking for help here): - Steven Price reported the following message on his firefly (RK3288) board: "debugfs: Directory 'ffa30000.gpu-mali' with parent 'vdd_gpu' already present!" - Robin Murphy suggested that patch #1 may not work once the OPP table for the GPU comes from SCMI [0] https://patchwork.freedesktop.org/patch/346898/ [1] https://patchwork.freedesktop.org/series/71744/ Martin Blumenstingl (3): drm/panfrost: enable devfreq based the "operating-points-v2" property drm/panfrost: call dev_pm_opp_of_remove_table() in all error-paths drm/panfrost: Use the mali-supply regulator for control again drivers/gpu/drm/panfrost/panfrost_devfreq.c | 44 +++++++++++++++++---- drivers/gpu/drm/panfrost/panfrost_device.h | 1 + 2 files changed, 37 insertions(+), 8 deletions(-)