From 08f87f769b595151be1afeff53e144f543faa614 Mon Sep 17 00:00:00 2001
From: hc <hc@nodka.com>
Date: Wed, 06 Dec 2023 09:51:13 +0000
Subject: [PATCH] add dts config

---
 kernel/drivers/gpu/arm/bifrost/mali_kbase_pm.h |   79 +++++++++++++++++++++++----------------
 1 files changed, 46 insertions(+), 33 deletions(-)

diff --git a/kernel/drivers/gpu/arm/bifrost/mali_kbase_pm.h b/kernel/drivers/gpu/arm/bifrost/mali_kbase_pm.h
index 980a8d1..4bb90a4 100644
--- a/kernel/drivers/gpu/arm/bifrost/mali_kbase_pm.h
+++ b/kernel/drivers/gpu/arm/bifrost/mali_kbase_pm.h
@@ -1,7 +1,7 @@
 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  *
- * (C) COPYRIGHT 2010-2021 ARM Limited. All rights reserved.
+ * (C) COPYRIGHT 2010-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
@@ -20,7 +20,7 @@
  */
 
 /**
- * Power management API definitions
+ * DOC: Power management API definitions
  */
 
 #ifndef _KBASE_PM_H_
@@ -39,29 +39,32 @@
 #define PM_NO_RESET          0x04
 #endif
 
-/** Initialize the power management framework.
+/**
+ * kbase_pm_init - Initialize the power management framework.
+ *
+ * @kbdev: The kbase device structure for the device
+ *              (must be a valid pointer)
  *
  * Must be called before any other power management function
  *
- * @param kbdev The kbase device structure for the device
- *              (must be a valid pointer)
- *
- * @return 0 if the power management framework was successfully initialized.
+ * Return: 0 if the power management framework was successfully initialized.
  */
 int kbase_pm_init(struct kbase_device *kbdev);
 
-/** Power up GPU after all modules have been initialized and interrupt handlers installed.
+/**
+ * kbase_pm_powerup - Power up GPU after all modules have been initialized
+ *                    and interrupt handlers installed.
  *
- * @param kbdev     The kbase device structure for the device (must be a valid pointer)
+ * @kbdev:     The kbase device structure for the device (must be a valid pointer)
+ * @flags:     Flags to pass on to kbase_pm_init_hw
  *
- * @param flags     Flags to pass on to kbase_pm_init_hw
- *
- * @return 0 if powerup was successful.
+ * Return: 0 if powerup was successful.
  */
 int kbase_pm_powerup(struct kbase_device *kbdev, unsigned int flags);
 
 /**
- * Halt the power management framework.
+ * kbase_pm_halt - Halt the power management framework.
+ *
  * @kbdev: The kbase device structure for the device (must be a valid pointer)
  *
  * Should ensure that no new interrupts are generated,
@@ -71,16 +74,20 @@
  */
 void kbase_pm_halt(struct kbase_device *kbdev);
 
-/** Terminate the power management framework.
+/**
+ * kbase_pm_term - Terminate the power management framework.
+ *
+ * @kbdev:     The kbase device structure for the device (must be a valid pointer)
  *
  * No power management functions may be called after this
  * (except @ref kbase_pm_init)
- *
- * @param kbdev     The kbase device structure for the device (must be a valid pointer)
  */
 void kbase_pm_term(struct kbase_device *kbdev);
 
-/** Increment the count of active contexts.
+/**
+ * kbase_pm_context_active - Increment the count of active contexts.
+ *
+ * @kbdev:     The kbase device structure for the device (must be a valid pointer)
  *
  * This function should be called when a context is about to submit a job.
  * It informs the active power policy that the GPU is going to be in use shortly
@@ -94,8 +101,6 @@
  * @note a Suspend is only visible to Kernel threads; user-space threads in a
  * syscall cannot witness a suspend, because they are frozen before the suspend
  * begins.
- *
- * @param kbdev     The kbase device structure for the device (must be a valid pointer)
  */
 void kbase_pm_context_active(struct kbase_device *kbdev);
 
@@ -123,7 +128,11 @@
 #endif /* CONFIG_MALI_ARBITER_SUPPORT */
 };
 
-/** Suspend 'safe' variant of kbase_pm_context_active()
+/**
+ * kbase_pm_context_active_handle_suspend - Suspend 'safe' variant of kbase_pm_context_active()
+ *
+ * @kbdev:     The kbase device structure for the device (must be a valid pointer)
+ * @suspend_handler: The handler code for how to handle a suspend that might occur
  *
  * If a suspend is in progress, this allows for various different ways of
  * handling the suspend. Refer to @ref enum kbase_pm_suspend_handler for details.
@@ -133,20 +142,18 @@
  * indicates a failure, the caller must abort whatever operation it was
  * attempting, and potentially queue it up for after the OS has resumed.
  *
- * @param kbdev     The kbase device structure for the device (must be a valid pointer)
- * @param suspend_handler The handler code for how to handle a suspend that might occur
- * @return zero     Indicates success
- * @return non-zero Indicates failure due to the system being suspending/suspended.
+ * Return: 0 on success, non-zero othrewise.
  */
 int kbase_pm_context_active_handle_suspend(struct kbase_device *kbdev, enum kbase_pm_suspend_handler suspend_handler);
 
-/** Decrement the reference count of active contexts.
+/**
+ * kbase_pm_context_idle - Decrement the reference count of active contexts.
+ *
+ * @kbdev:     The kbase device structure for the device (must be a valid pointer)
  *
  * This function should be called when a context becomes idle.
  * After this call the GPU may be turned off by the power policy so the calling
  * code should ensure that it does not access the GPU's registers.
- *
- * @param kbdev     The kbase device structure for the device (must be a valid pointer)
  */
 void kbase_pm_context_idle(struct kbase_device *kbdev);
 
@@ -155,8 +162,9 @@
  */
 
 /**
- * Suspend the GPU and prevent any further register accesses to it from Kernel
- * threads.
+ * kbase_pm_suspend - Suspend the GPU and prevent any further register accesses
+ *                    to it from Kernel threads.
+ *
  * @kbdev: The kbase device structure for the device (must be a valid pointer)
  *
  * This is called in response to an OS suspend event, and calls into the various
@@ -165,12 +173,15 @@
  * @note the mechanisms used here rely on all user-space threads being frozen
  * by the OS before we suspend. Otherwise, an IOCTL could occur that powers up
  * the GPU e.g. via atom submission.
+ *
+ * Return: 0 on success.
  */
-void kbase_pm_suspend(struct kbase_device *kbdev);
+int kbase_pm_suspend(struct kbase_device *kbdev);
 
 /**
- * Resume the GPU, allow register accesses to it, and resume running atoms on
- * the GPU.
+ * kbase_pm_resume - Resume the GPU, allow register accesses to it,
+ *                   and resume running atoms on the GPU.
+ *
  * @kbdev: The kbase device structure for the device (must be a valid pointer)
  *
  * This is called in response to an OS resume event, and calls into the various
@@ -207,8 +218,10 @@
  * @note the mechanisms used here rely on all user-space threads being frozen
  * by the OS before we suspend. Otherwise, an IOCTL could occur that powers up
  * the GPU e.g. via atom submission.
+ *
+ * Return: 0 on success.
  */
-void kbase_pm_driver_suspend(struct kbase_device *kbdev);
+int kbase_pm_driver_suspend(struct kbase_device *kbdev);
 
 /**
  * kbase_pm_driver_resume() - Put GPU and driver in resume

--
Gitblit v1.6.2