summaryrefslogtreecommitdiff
path: root/mali_kbase/platform
diff options
context:
space:
mode:
authorDebarshi Dutta <debarshid@google.com>2023-06-02 13:36:22 +0000
committerDebarshi Dutta <debarshid@google.com>2023-07-12 18:55:15 +0000
commit20fff721667a227b3d6decf9dbc3798476390302 (patch)
treefba7129be28198dc2af1fb34fe0ec3a9ec0ce572 /mali_kbase/platform
parent9e12ba5986f91fa0192b1ab55fafcea5e9b37094 (diff)
downloadgpu-20fff721667a227b3d6decf9dbc3798476390302.tar.gz
Merge upstream DDK R43P0 KMD
Merge DDK version R43P0 from upstream branch Provenance: 48a9c7e25986318c8475bc245de51e7bec2606e8 (ipdelivery/EAC/v_r43p0) VX504X08X-BU-00000-r43p0-01eac0 - Valhall Android DDK VX504X08X-BU-60000-r43p0-01eac0 - Valhall Android Document Bundle VX504X08X-DC-11001-r43p0-01eac0 - Valhall Android DDK Software Errata VX504X08X-SW-99006-r43p0-01eac0 - Valhall Android Renderscript AOSP parts Bug 278174418 Commit-Topic: R43P0_KMD Signed-off-by: Debarshi Dutta <debarshid@google.com> Change-Id: I84fb19e7ce5f28e735d44a4993d51bd985aac80b
Diffstat (limited to 'mali_kbase/platform')
-rw-r--r--mali_kbase/platform/devicetree/Kbuild1
-rw-r--r--mali_kbase/platform/devicetree/mali_kbase_config_platform.c43
-rw-r--r--mali_kbase/platform/devicetree/mali_kbase_config_platform.h3
-rw-r--r--mali_kbase/platform/devicetree/mali_kbase_runtime_pm.c6
-rw-r--r--mali_kbase/platform/meson/mali_kbase_runtime_pm.c27
5 files changed, 28 insertions, 52 deletions
diff --git a/mali_kbase/platform/devicetree/Kbuild b/mali_kbase/platform/devicetree/Kbuild
index 5eeccfa..995c4cd 100644
--- a/mali_kbase/platform/devicetree/Kbuild
+++ b/mali_kbase/platform/devicetree/Kbuild
@@ -20,6 +20,5 @@
mali_kbase-y += \
platform/$(MALI_PLATFORM_DIR)/mali_kbase_config_devicetree.o \
- platform/$(MALI_PLATFORM_DIR)/mali_kbase_config_platform.o \
platform/$(MALI_PLATFORM_DIR)/mali_kbase_runtime_pm.o \
platform/$(MALI_PLATFORM_DIR)/mali_kbase_clk_rate_trace.o
diff --git a/mali_kbase/platform/devicetree/mali_kbase_config_platform.c b/mali_kbase/platform/devicetree/mali_kbase_config_platform.c
deleted file mode 100644
index 2eebed0..0000000
--- a/mali_kbase/platform/devicetree/mali_kbase_config_platform.c
+++ /dev/null
@@ -1,43 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
-/*
- *
- * (C) COPYRIGHT 2021-2022 ARM Limited. All rights reserved.
- *
- * This program is free software and is provided to you under the terms of the
- * GNU General Public License version 2 as published by the Free Software
- * Foundation, and any use by you of this program is subject to the terms
- * of such GNU license.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, you can access it online at
- * http://www.gnu.org/licenses/gpl-2.0.html.
- *
- */
-
-#include <mali_kbase.h>
-#include <mali_kbase_defs.h>
-#include <mali_kbase_config.h>
-#include "mali_kbase_config_platform.h"
-#include <device/mali_kbase_device.h>
-#include <mali_kbase_hwaccess_time.h>
-#include <gpu/mali_kbase_gpu_regmap.h>
-
-#include <linux/kthread.h>
-#include <linux/timer.h>
-#include <linux/jiffies.h>
-#include <linux/wait.h>
-#include <linux/delay.h>
-#include <linux/gcd.h>
-#include <asm/arch_timer.h>
-
-struct kbase_platform_funcs_conf platform_funcs = {
- .platform_init_func = NULL,
- .platform_term_func = NULL,
- .platform_late_init_func = NULL,
- .platform_late_term_func = NULL,
-};
diff --git a/mali_kbase/platform/devicetree/mali_kbase_config_platform.h b/mali_kbase/platform/devicetree/mali_kbase_config_platform.h
index 743885f..584a721 100644
--- a/mali_kbase/platform/devicetree/mali_kbase_config_platform.h
+++ b/mali_kbase/platform/devicetree/mali_kbase_config_platform.h
@@ -33,13 +33,12 @@
* Attached value: pointer to @ref kbase_platform_funcs_conf
* Default value: See @ref kbase_platform_funcs_conf
*/
-#define PLATFORM_FUNCS (&platform_funcs)
+#define PLATFORM_FUNCS (NULL)
#define CLK_RATE_TRACE_OPS (&clk_rate_trace_ops)
extern struct kbase_pm_callback_conf pm_callbacks;
extern struct kbase_clk_rate_trace_op_conf clk_rate_trace_ops;
-extern struct kbase_platform_funcs_conf platform_funcs;
/**
* AUTO_SUSPEND_DELAY - Autosuspend delay
*
diff --git a/mali_kbase/platform/devicetree/mali_kbase_runtime_pm.c b/mali_kbase/platform/devicetree/mali_kbase_runtime_pm.c
index ff1d902..a019229 100644
--- a/mali_kbase/platform/devicetree/mali_kbase_runtime_pm.c
+++ b/mali_kbase/platform/devicetree/mali_kbase_runtime_pm.c
@@ -29,7 +29,6 @@
#include "mali_kbase_config_platform.h"
-
static void enable_gpu_power_control(struct kbase_device *kbdev)
{
unsigned int i;
@@ -82,8 +81,7 @@ static int pm_callback_power_on(struct kbase_device *kbdev)
int error;
unsigned long flags;
- dev_dbg(kbdev->dev, "%s %p\n", __func__,
- (void *)kbdev->dev->pm_domain);
+ dev_dbg(kbdev->dev, "%s %pK\n", __func__, (void *)kbdev->dev->pm_domain);
spin_lock_irqsave(&kbdev->hwaccess_lock, flags);
WARN_ON(kbdev->pm.backend.gpu_powered);
@@ -314,5 +312,3 @@ struct kbase_pm_callback_conf pm_callbacks = {
.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 c00cbcb..a9b380c 100644
--- a/mali_kbase/platform/meson/mali_kbase_runtime_pm.c
+++ b/mali_kbase/platform/meson/mali_kbase_runtime_pm.c
@@ -149,7 +149,7 @@ static int pm_callback_power_on(struct kbase_device *kbdev)
int ret = 1; /* Assume GPU has been powered off */
int error;
- dev_dbg(kbdev->dev, "%s %p\n", __func__, (void *)kbdev->dev->pm_domain);
+ dev_dbg(kbdev->dev, "%s %pK\n", __func__, (void *)kbdev->dev->pm_domain);
#ifdef KBASE_PM_RUNTIME
error = pm_runtime_get_sync(kbdev->dev);
@@ -245,6 +245,18 @@ 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,
@@ -262,4 +274,17 @@ struct kbase_pm_callback_conf pm_callbacks = {
.power_runtime_on_callback = NULL,
.power_runtime_off_callback = NULL,
#endif /* KBASE_PM_RUNTIME */
+
+#if MALI_USE_CSF && defined(KBASE_PM_RUNTIME)
+ .power_runtime_gpu_idle_callback = pm_callback_runtime_gpu_idle,
+ .power_runtime_gpu_active_callback = pm_callback_runtime_gpu_active,
+#else
+ .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
};