From: Rob Clark <robdclark@gmail.com>
To: linux-pm@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org,
Krzysztof Kozlowski <krzk@kernel.org>,
Rob Clark <robdclark@chromium.org>,
MyungJoo Ham <myungjoo.ham@samsung.com>,
Kyungmin Park <kyungmin.park@samsung.com>,
Chanwoo Choi <cw00.choi@samsung.com>,
Chia-I Wu <olvaffe@gmail.com>,
linux-kernel@vger.kernel.org (open list)
Subject: [PATCH] PM / devfreq: Fix build issues with devfreq disabled
Date: Mon, 23 Jan 2023 07:37:45 -0800 [thread overview]
Message-ID: <20230123153745.3185032-1-robdclark@gmail.com> (raw)
From: Rob Clark <robdclark@chromium.org>
The existing no-op shims for when PM_DEVFREQ (or an individual governor)
only do half the job. The governor specific config/tuning structs need
to be available to avoid compile errors in drivers using devfreq.
Fixes: 6563f60f14cb ("drm/msm/gpu: Add devfreq tuning debugfs")
Signed-off-by: Rob Clark <robdclark@chromium.org>
---
Assuming this doesn't conflict with anything else landing via another
tree, an a-b to land this via drm/msm-next would let us un-break builds.
(And also start removing "select DEVFREQ_GOV_SIMPLE_ONDEMAND"s added in
various places to try to work around this issue.)
include/linux/devfreq.h | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/include/linux/devfreq.h b/include/linux/devfreq.h
index 4dc7cda4fd46..7fd704bb8f3d 100644
--- a/include/linux/devfreq.h
+++ b/include/linux/devfreq.h
@@ -273,8 +273,8 @@ void devm_devfreq_unregister_notifier(struct device *dev,
struct devfreq *devfreq_get_devfreq_by_node(struct device_node *node);
struct devfreq *devfreq_get_devfreq_by_phandle(struct device *dev,
const char *phandle_name, int index);
+#endif /* CONFIG_PM_DEVFREQ */
-#if IS_ENABLED(CONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND)
/**
* struct devfreq_simple_ondemand_data - ``void *data`` fed to struct devfreq
* and devfreq_add_device
@@ -292,9 +292,7 @@ struct devfreq_simple_ondemand_data {
unsigned int upthreshold;
unsigned int downdifferential;
};
-#endif
-#if IS_ENABLED(CONFIG_DEVFREQ_GOV_PASSIVE)
enum devfreq_parent_dev_type {
DEVFREQ_PARENT_DEV,
CPUFREQ_PARENT_DEV,
@@ -337,9 +335,8 @@ struct devfreq_passive_data {
struct notifier_block nb;
struct list_head cpu_data_list;
};
-#endif
-#else /* !CONFIG_PM_DEVFREQ */
+#if !defined(CONFIG_PM_DEVFREQ)
static inline struct devfreq *devfreq_add_device(struct device *dev,
struct devfreq_dev_profile *profile,
const char *governor_name,
--
2.38.1
next reply other threads:[~2023-01-23 15:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-23 15:37 Rob Clark [this message]
[not found] ` <CGME20230123153745epcas1p17e57cf83ed371e86258139473befc615@epcms1p1>
2023-01-25 4:04 ` MyungJoo Ham
2023-01-25 4:31 ` Rob Clark
[not found] ` <CGME20230123153745epcas1p17e57cf83ed371e86258139473befc615@epcms1p3>
2023-01-25 5:46 ` MyungJoo Ham
2023-01-27 3:08 ` Rob Clark
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230123153745.3185032-1-robdclark@gmail.com \
--to=robdclark@gmail.com \
--cc=cw00.choi@samsung.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=krzk@kernel.org \
--cc=kyungmin.park@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=myungjoo.ham@samsung.com \
--cc=olvaffe@gmail.com \
--cc=robdclark@chromium.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®