From f70575805708cabdedea7498aaa3f710fde4d920 Mon Sep 17 00:00:00 2001 From: hc <hc@nodka.com> Date: Wed, 31 Jan 2024 03:29:01 +0000 Subject: [PATCH] add lvds1024*800 --- kernel/drivers/gpu/arm/bifrost/mali_kbase_config.h | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++++----- 1 files changed, 53 insertions(+), 5 deletions(-) diff --git a/kernel/drivers/gpu/arm/bifrost/mali_kbase_config.h b/kernel/drivers/gpu/arm/bifrost/mali_kbase_config.h index e7eb334..ecfdb28 100644 --- a/kernel/drivers/gpu/arm/bifrost/mali_kbase_config.h +++ b/kernel/drivers/gpu/arm/bifrost/mali_kbase_config.h @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ /* * - * (C) COPYRIGHT 2010-2017, 2019-2021 ARM Limited. All rights reserved. + * (C) COPYRIGHT 2010-2017, 2019-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 @@ -170,6 +170,12 @@ * the clocks to the GPU, or to completely power down the GPU. * The platform specific private pointer kbase_device::platform_context can be accessed and modified in here. It is the * platform \em callbacks responsibility to initialize and terminate this pointer if used (see @ref kbase_platform_funcs_conf). + * + * If runtime PM is enabled and @power_runtime_gpu_idle_callback is used + * then this callback should power off the GPU (or switch off the clocks + * to GPU) immediately. If @power_runtime_gpu_idle_callback is not used, + * then this callback can set the autosuspend timeout (if desired) and + * let the GPU be powered down later. */ void (*power_off_callback)(struct kbase_device *kbdev); @@ -240,8 +246,6 @@ * * For linux this callback will be called by the kernel runtime_suspend callback. * Note: for linux the kernel must have CONFIG_PM_RUNTIME enabled to use this feature. - * - * @return 0 on success, else OS error code. */ void (*power_runtime_off_callback)(struct kbase_device *kbdev); @@ -249,6 +253,8 @@ * * For linux this callback will be called by the kernel runtime_resume callback. * Note: for linux the kernel must have CONFIG_PM_RUNTIME enabled to use this feature. + * + * @return 0 on success, else OS error code. */ int (*power_runtime_on_callback)(struct kbase_device *kbdev); @@ -289,6 +295,49 @@ * be raised. On error, return the corresponding OS error code. */ int (*soft_reset_callback)(struct kbase_device *kbdev); + + /* + * Optional callback invoked after GPU becomes idle, not supported on + * JM GPUs. + * + * This callback will be invoked by the Kbase when GPU becomes idle. + * For JM GPUs or when runtime PM is disabled, Kbase will not invoke + * this callback and @power_off_callback will be invoked directly. + * + * This callback is supposed to decrement the runtime PM core reference + * count to zero and trigger the auto-suspend timer, which implies that + * @power_off_callback shouldn't initiate the runtime suspend. + * + * GPU registers still remain accessible until @power_off_callback gets + * invoked later on the expiry of auto-suspend timer. + * + * Note: The Linux kernel must have CONFIG_PM_RUNTIME enabled to use + * this feature. + */ + void (*power_runtime_gpu_idle_callback)(struct kbase_device *kbdev); + + /* + * Optional callback invoked to change the runtime PM core state to + * active. + * + * This callback will be invoked by Kbase when GPU needs to be + * reactivated, but only if @power_runtime_gpu_idle_callback was invoked + * previously. So both @power_runtime_gpu_idle_callback and this + * callback needs to be implemented at the same time. + * + * Kbase will invoke @power_on_callback first before invoking this + * callback if the GPU was powered down previously, otherwise directly. + * + * This callback is supposed to increment the runtime PM core reference + * count to 1, which implies that @power_on_callback shouldn't initiate + * the runtime resume. The runtime resume may not happen synchronously + * to avoid a potential deadlock due to the runtime suspend happening + * simultaneously from some other thread. + * + * Note: The Linux kernel must have CONFIG_PM_RUNTIME enabled to use + * this feature. + */ + void (*power_runtime_gpu_active_callback)(struct kbase_device *kbdev); }; /* struct kbase_gpu_clk_notifier_data - Data for clock rate change notifier. @@ -406,7 +455,7 @@ /** * kbase_get_platform_config - Gets the pointer to platform config. * - * @return Pointer to the platform config + * Return: Pointer to the platform config */ struct kbase_platform_config *kbase_get_platform_config(void); @@ -515,7 +564,6 @@ #ifndef CONFIG_OF /** * kbase_platform_register - Register a platform device for the GPU - * * This can be used to register a platform device on systems where device tree * is not enabled and the platform initialisation code in the kernel doesn't * create the GPU device. Where possible device tree should be used instead. -- Gitblit v1.6.2