mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 17:25:35 +03:00
gpu: host1x: move actmon specific code under CONFIG_PM_DEVFREQ
Move actmon.c file under CONFIG_PM_DEVFREQ and stub the functions when it is not enabled. Jira HOSTX-5885 Change-Id: I8e6f86c617061587e4034a184f9a7d82a41a4a03 Signed-off-by: Santosh BS <santoshb@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3297630 Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com> GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
@@ -10,8 +10,8 @@ host1x-y = \
|
||||
channel.o \
|
||||
job.o \
|
||||
debug.o \
|
||||
fence.o \
|
||||
actmon.o
|
||||
fence.o
|
||||
|
||||
|
||||
ifneq ($(filter y, $(CONFIG_ARCH_TEGRA_2x_SOC) $(CONFIG_ARCH_TEGRA_3x_SOC)),)
|
||||
host1x-y += hw/host1x01.o
|
||||
@@ -25,8 +25,7 @@ host1x-$(CONFIG_ARCH_TEGRA_234_SOC) += hw/host1x08.o
|
||||
host1x-$(CONFIG_ARCH_TEGRA_264_SOC) += hw/host1x09.o
|
||||
|
||||
host1x-$(CONFIG_DRM_TEGRA_HAVE_DISPLAY) += mipi.o
|
||||
|
||||
host1x-$(CONFIG_IOMMU_API) += \
|
||||
context.o
|
||||
host1x-$(CONFIG_PM_DEVFREQ) += actmon.o
|
||||
host1x-$(CONFIG_IOMMU_API) += context.o
|
||||
|
||||
obj-m := host1x.o
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/*
|
||||
* Tegra host1x Actmon
|
||||
*
|
||||
* Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* Copyright (c) 2023-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
*/
|
||||
|
||||
#ifndef HOST1X_ACTMON_H
|
||||
@@ -44,6 +44,12 @@ struct host1x_actmon {
|
||||
|
||||
struct host1x;
|
||||
|
||||
#ifdef CONFIG_PM_DEVFREQ
|
||||
void host1x_actmon_handle_interrupt(struct host1x *host, int classid);
|
||||
#else
|
||||
static inline void host1x_actmon_handle_interrupt(struct host1x *host, int classid)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -581,6 +581,7 @@ static inline void host1x_memory_context_unmap(struct host1x_context_mapping *m)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PM_DEVFREQ
|
||||
int host1x_actmon_read_avg_count(struct host1x_client *client);
|
||||
int host1x_actmon_register(struct host1x_client *client);
|
||||
void host1x_actmon_unregister(struct host1x_client *client);
|
||||
@@ -597,5 +598,49 @@ void host1x_actmon_update_active_wmark(struct host1x_client *client,
|
||||
u32 consec_lower_wmark,
|
||||
bool upper_wmark_enabled,
|
||||
bool lower_wmark_enabled);
|
||||
#else
|
||||
static inline int host1x_actmon_read_avg_count(struct host1x_client *client)
|
||||
{
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
static inline int host1x_actmon_register(struct host1x_client *client)
|
||||
{
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
static inline void host1x_actmon_unregister(struct host1x_client *client)
|
||||
{
|
||||
}
|
||||
|
||||
static inline void host1x_actmon_enable(struct host1x_client *client)
|
||||
{
|
||||
}
|
||||
|
||||
static inline void host1x_actmon_disable(struct host1x_client *client)
|
||||
{
|
||||
}
|
||||
|
||||
static inline void host1x_actmon_update_client_rate(struct host1x_client *client,
|
||||
unsigned long rate,
|
||||
u32 *weight)
|
||||
{
|
||||
}
|
||||
|
||||
static inline void host1x_actmon_read_active_norm(struct host1x_client *client, unsigned long *usage)
|
||||
{
|
||||
*usage = 0;
|
||||
}
|
||||
|
||||
static inline void host1x_actmon_update_active_wmark(struct host1x_client *client,
|
||||
u32 avg_upper_wmark,
|
||||
u32 avg_lower_wmark,
|
||||
u32 consec_upper_wmark,
|
||||
u32 consec_lower_wmark,
|
||||
bool upper_wmark_enabled,
|
||||
bool lower_wmark_enabled)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user