summaryrefslogtreecommitdiff
path: root/mali_kbase/platform
diff options
context:
space:
mode:
authorVamsidhar reddy Gaddam <gvamsi@google.com>2024-02-06 11:45:42 +0000
committerVamsidhar reddy Gaddam <gvamsi@google.com>2024-02-07 17:24:10 +0000
commit0781d08e1eb2fce0dc82582a41ecd183d75fad71 (patch)
treeba227cefdd74ebdb680ec0a81e94fdb5d5f7cdb4 /mali_kbase/platform
parent88eb15d9c46c4992d178ce83216f97b8fb939cfe (diff)
downloadgpu-0781d08e1eb2fce0dc82582a41ecd183d75fad71.tar.gz
Remove IFPO from KMD
IFPO feature has been unusued and only creates overhead for smooth driver updates. Bug: 324019470 Change-Id: Iab65e95b9ba21d74cc158557e3fa78d4478c9a71 Signed-off-by: Vamsidhar reddy Gaddam <gvamsi@google.com>
Diffstat (limited to 'mali_kbase/platform')
-rw-r--r--mali_kbase/platform/devicetree/mali_kbase_runtime_pm.c16
-rw-r--r--mali_kbase/platform/meson/mali_kbase_runtime_pm.c17
-rw-r--r--mali_kbase/platform/pixel/mali_kbase_config_platform.h3
-rw-r--r--mali_kbase/platform/pixel/pixel_gpu.c36
-rw-r--r--mali_kbase/platform/pixel/pixel_gpu_power.c94
-rw-r--r--mali_kbase/platform/pixel/pixel_gpu_sysfs.c54
6 files changed, 0 insertions, 220 deletions
diff --git a/mali_kbase/platform/devicetree/mali_kbase_runtime_pm.c b/mali_kbase/platform/devicetree/mali_kbase_runtime_pm.c
index 59ad094..7c92505 100644
--- a/mali_kbase/platform/devicetree/mali_kbase_runtime_pm.c
+++ b/mali_kbase/platform/devicetree/mali_kbase_runtime_pm.c
@@ -267,17 +267,6 @@ static void pm_callback_suspend(struct kbase_device *kbdev)
pm_callback_runtime_off(kbdev);
}
-#ifdef CONFIG_MALI_HOST_CONTROLS_SC_RAILS
-static void pm_callback_sc_rails_on(struct kbase_device *kbdev)
-{
- dev_dbg(kbdev->dev, "SC rails are on");
-}
-
-static void pm_callback_sc_rails_off(struct kbase_device *kbdev)
-{
- dev_dbg(kbdev->dev, "SC rails are off");
-}
-#endif
struct kbase_pm_callback_conf pm_callbacks = {
.power_on_callback = pm_callback_power_on,
@@ -303,9 +292,4 @@ struct kbase_pm_callback_conf pm_callbacks = {
.power_runtime_gpu_idle_callback = NULL,
.power_runtime_gpu_active_callback = NULL,
#endif
-
-#ifdef CONFIG_MALI_HOST_CONTROLS_SC_RAILS
- .power_on_sc_rails_callback = pm_callback_sc_rails_on,
- .power_off_sc_rails_callback = pm_callback_sc_rails_off,
-#endif
};
diff --git a/mali_kbase/platform/meson/mali_kbase_runtime_pm.c b/mali_kbase/platform/meson/mali_kbase_runtime_pm.c
index d3df393..8cb9354 100644
--- a/mali_kbase/platform/meson/mali_kbase_runtime_pm.c
+++ b/mali_kbase/platform/meson/mali_kbase_runtime_pm.c
@@ -245,18 +245,6 @@ static void pm_callback_suspend(struct kbase_device *kbdev)
pm_callback_runtime_off(kbdev);
}
-#ifdef CONFIG_MALI_HOST_CONTROLS_SC_RAILS
-static void pm_callback_sc_rails_on(struct kbase_device *kbdev)
-{
- dev_dbg(kbdev->dev, "SC rails are on");
-}
-
-static void pm_callback_sc_rails_off(struct kbase_device *kbdev)
-{
- dev_dbg(kbdev->dev, "SC rails are off");
-}
-#endif
-
struct kbase_pm_callback_conf pm_callbacks = {
.power_on_callback = pm_callback_power_on,
.power_off_callback = pm_callback_power_off,
@@ -282,9 +270,4 @@ struct kbase_pm_callback_conf pm_callbacks = {
.power_runtime_gpu_idle_callback = NULL,
.power_runtime_gpu_active_callback = NULL,
#endif
-
-#ifdef CONFIG_MALI_HOST_CONTROLS_SC_RAILS
- .power_on_sc_rails_callback = pm_callback_sc_rails_on,
- .power_off_sc_rails_callback = pm_callback_sc_rails_off,
-#endif
};
diff --git a/mali_kbase/platform/pixel/mali_kbase_config_platform.h b/mali_kbase/platform/pixel/mali_kbase_config_platform.h
index 57cec12..ef73c65 100644
--- a/mali_kbase/platform/pixel/mali_kbase_config_platform.h
+++ b/mali_kbase/platform/pixel/mali_kbase_config_platform.h
@@ -334,9 +334,6 @@ struct pixel_context {
struct bcl_device *bcl_dev;
#endif
struct pixel_rail_state_log *rail_state_log;
-#ifdef CONFIG_MALI_HOST_CONTROLS_SC_RAILS
- bool ifpo_enabled;
-#endif
} pm;
#ifdef CONFIG_MALI_PIXEL_GPU_SECURE_RENDERING
diff --git a/mali_kbase/platform/pixel/pixel_gpu.c b/mali_kbase/platform/pixel/pixel_gpu.c
index 0435f4a..7ecc156 100644
--- a/mali_kbase/platform/pixel/pixel_gpu.c
+++ b/mali_kbase/platform/pixel/pixel_gpu.c
@@ -43,10 +43,6 @@
*/
#define GPU_SMC_TZPC_OK 0
-#ifdef CONFIG_MALI_HOST_CONTROLS_SC_RAILS
-#define HOST_CONTROLS_SC_RAILS_CFG_ENTRY_NAME "Host controls SC rails"
-#endif
-
/**
* pixel_gpu_secure_mode_enable() - Enables secure mode for the GPU
*
@@ -130,42 +126,10 @@ struct protected_mode_ops pixel_protected_ops = {
#endif /* CONFIG_MALI_PIXEL_GPU_SECURE_RENDERING */
-#ifdef CONFIG_MALI_HOST_CONTROLS_SC_RAILS
-/**
- * gpu_pixel_enable_host_ctrl_sc_rails() - Enable the config in FW to support host based
- * control of SC power rails
- *
- * Look for the config entry that enables support in FW for the Host based
- * control of shader core power rails and set it before the initial boot
- * or reload of firmware.
- *
- * @kbdev: Kbase device structure
- *
- * Return: 0 if successful, negative error code on failure
- */
-static int gpu_pixel_enable_host_ctrl_sc_rails(struct kbase_device *kbdev)
-{
- u32 addr;
- int ec = kbase_csf_firmware_cfg_find_config_address(
- kbdev, HOST_CONTROLS_SC_RAILS_CFG_ENTRY_NAME, &addr);
-
- if (!ec) {
- kbase_csf_update_firmware_memory(kbdev, addr, 1);
- }
-
- return ec;
-}
-#endif
-
static int gpu_fw_cfg_init(struct kbase_device *kbdev) {
int ec = 0;
#if MALI_USE_CSF
-#ifdef CONFIG_MALI_HOST_CONTROLS_SC_RAILS
- ec = gpu_pixel_enable_host_ctrl_sc_rails(kbdev);
- if (ec)
- dev_warn(kbdev->dev, "pixel: failed to enable SC rail host-control");
-#endif
if (gpu_sscd_fw_log_init(kbdev, 0)) {
dev_warn(kbdev->dev, "pixel: failed to enable FW log");
}
diff --git a/mali_kbase/platform/pixel/pixel_gpu_power.c b/mali_kbase/platform/pixel/pixel_gpu_power.c
index 0853176..bc9ce92 100644
--- a/mali_kbase/platform/pixel/pixel_gpu_power.c
+++ b/mali_kbase/platform/pixel/pixel_gpu_power.c
@@ -510,92 +510,6 @@ static void gpu_pm_callback_power_runtime_term(struct kbase_device *kbdev)
#endif /* IS_ENABLED(KBASE_PM_RUNTIME) */
-#ifdef CONFIG_MALI_HOST_CONTROLS_SC_RAILS
-/**
- * gpu_pm_power_on_cores() - Powers on the GPU shader cores for
- * CONFIG_MALI_HOST_CONTROLS_SC_RAILS integrations.
- *
- * @kbdev: The &struct kbase_device for the GPU.
- *
- * Powers on the CORES domain for CONFIG_MALI_HOST_CONTROLS_SC_RAILS
- * integrations. Afterwards shaders must be powered and may be used by GPU.
- *
- * Context: Process context. Takes and releases PM lock.
- */
-static void gpu_pm_power_on_cores(struct kbase_device *kbdev) {
- struct pixel_context *pc = kbdev->platform_context;
-
- gpu_pm_rail_state_start_transition_lock(pc);
-
- if (pc->pm.state == GPU_POWER_LEVEL_GLOBAL && pc->pm.ifpo_enabled) {
- pm_runtime_get_sync(pc->pm.domain_devs[GPU_PM_DOMAIN_CORES]);
- pc->pm.state = GPU_POWER_LEVEL_STACKS;
-
-#ifdef CONFIG_MALI_MIDGARD_DVFS
- gpu_dvfs_event_power_on(kbdev);
-#endif
- }
-
- gpu_pm_rail_state_end_transition_unlock(pc);
-}
-
-/**
- * gpu_pm_power_off_cores() - Powers off the GPU shader cores for
- * CONFIG_MALI_HOST_CONTROLS_SC_RAILS integrations.
- *
- * @kbdev: The &struct kbase_device for the GPU.
- *
- * Powers off the CORES domain for CONFIG_MALI_HOST_CONTROLS_SC_RAILS
- * integrations. Afterwards shaders are not powered and may not be used by GPU.
- *
- * Context: Process context. Takes and releases PM lock.
- */
-static void gpu_pm_power_off_cores(struct kbase_device *kbdev) {
- struct pixel_context *pc = kbdev->platform_context;
-
- gpu_pm_rail_state_start_transition_lock(pc);
-
- if (pc->pm.state == GPU_POWER_LEVEL_STACKS && pc->pm.ifpo_enabled) {
- pm_runtime_put_sync(pc->pm.domain_devs[GPU_PM_DOMAIN_CORES]);
- pc->pm.state = GPU_POWER_LEVEL_GLOBAL;
-
-#ifdef CONFIG_MALI_MIDGARD_DVFS
- gpu_dvfs_event_power_off(kbdev);
-#endif
- }
-
- gpu_pm_rail_state_end_transition_unlock(pc);
-}
-
-/**
- * gpu_pm_callback_power_sc_rails_on() - Called by GPU when shaders are needed.
- *
- * @kbdev: The device that needs its shaders powered on.
- *
- * This callback is made when @dev needs shader cores powered on integrations
- * using CONFIG_MALI_HOST_CONTROLS_SC_RAILS.
- */
-static void gpu_pm_callback_power_sc_rails_on(struct kbase_device *kbdev) {
- dev_dbg(kbdev->dev, "%s\n", __func__);
-
- gpu_pm_power_on_cores(kbdev);
-}
-
-/**
- * gpu_pm_callback_power_sc_rails_off() - Called by GPU when shaders are idle.
- *
- * @kbdev: The device that needs its shaders powered on.
- *
- * This callback is made when @dev coud have its shader cores powered off on
- * integrations using CONFIG_MALI_HOST_CONTROLS_SC_RAILS.
- */
-static void gpu_pm_callback_power_sc_rails_off(struct kbase_device *kbdev) {
- dev_dbg(kbdev->dev, "%s\n", __func__);
-
- gpu_pm_power_off_cores(kbdev);
-}
-#endif /* CONFIG_MALI_HOST_CONTROLS_SC_RAILS */
-
static void gpu_pm_hw_reset(struct kbase_device *kbdev)
{
struct pixel_context *pc = kbdev->platform_context;
@@ -661,10 +575,6 @@ struct kbase_pm_callback_conf pm_callbacks = {
#endif /* KBASE_PM_RUNTIME */
.soft_reset_callback = NULL,
.hardware_reset_callback = gpu_pm_hw_reset,
-#ifdef CONFIG_MALI_HOST_CONTROLS_SC_RAILS
- .power_on_sc_rails_callback = gpu_pm_callback_power_sc_rails_on,
- .power_off_sc_rails_callback = gpu_pm_callback_power_sc_rails_off,
-#endif /* CONFIG_MALI_HOST_CONTROLS_SC_RAILS */
};
/**
@@ -745,10 +655,6 @@ int gpu_pm_init(struct kbase_device *kbdev)
}
}
-#ifdef CONFIG_MALI_HOST_CONTROLS_SC_RAILS
- pc->pm.ifpo_enabled = true;
-#endif
-
if (of_property_read_u32(np, "gpu_pm_autosuspend_delay", &pc->pm.autosuspend_delay)) {
pc->pm.use_autosuspend = false;
pc->pm.autosuspend_delay = 0;
diff --git a/mali_kbase/platform/pixel/pixel_gpu_sysfs.c b/mali_kbase/platform/pixel/pixel_gpu_sysfs.c
index f6164f9..a1c0e94 100644
--- a/mali_kbase/platform/pixel/pixel_gpu_sysfs.c
+++ b/mali_kbase/platform/pixel/pixel_gpu_sysfs.c
@@ -695,58 +695,6 @@ static ssize_t governor_store(struct device *dev, struct device_attribute *attr,
return ret;
}
-static ssize_t ifpo_show(struct device *dev, struct device_attribute *attr, char *buf)
-{
-#ifdef CONFIG_MALI_HOST_CONTROLS_SC_RAILS
- struct kbase_device *kbdev = dev->driver_data;
- struct pixel_context *pc = kbdev->platform_context;
- ssize_t ret = 0;
-
- if (!pc)
- return -ENODEV;
-
- mutex_lock(&pc->pm.lock);
- ret = scnprintf(buf, PAGE_SIZE, "%d\n", pc->pm.ifpo_enabled);
- mutex_unlock(&pc->pm.lock);
- return ret;
-#else
- return -ENOTSUPP;
-#endif
-}
-
-static ssize_t ifpo_store(struct device *dev, struct device_attribute *attr,
- const char *buf, size_t count)
-{
-#ifdef CONFIG_MALI_HOST_CONTROLS_SC_RAILS
- int ret;
- bool enabled;
- struct kbase_device *kbdev = dev->driver_data;
- struct pixel_context *pc = kbdev->platform_context;
- if (!pc)
- return -ENODEV;
-
- ret = strtobool(buf, &enabled);
- if (ret)
- return -EINVAL;
-
- mutex_lock(&kbdev->csf.scheduler.lock);
-
- if (!enabled) {
- turn_on_sc_power_rails(kbdev);
- }
-
- mutex_lock(&pc->pm.lock);
- pc->pm.ifpo_enabled = enabled;
- mutex_unlock(&pc->pm.lock);
- mutex_unlock(&kbdev->csf.scheduler.lock);
-
- return count;
-#else
- return -ENOTSUPP;
-#endif
-}
-
-
/* Define devfreq-like attributes */
DEVICE_ATTR_RO(available_frequencies);
DEVICE_ATTR_RO(cur_freq);
@@ -761,7 +709,6 @@ DEVICE_ATTR_RO(time_in_state);
DEVICE_ATTR_RO(trans_stat);
DEVICE_ATTR_RO(available_governors);
DEVICE_ATTR_RW(governor);
-DEVICE_ATTR_RW(ifpo);
/* Initialization code */
@@ -795,7 +742,6 @@ static struct {
{ "available_governors", &dev_attr_available_governors },
{ "governor", &dev_attr_governor },
{ "trigger_core_dump", &dev_attr_trigger_core_dump },
- { "ifpo", &dev_attr_ifpo }
};
/**