diff options
author | Sidath Senanayake <sidaths@google.com> | 2021-01-29 14:51:21 +0000 |
---|---|---|
committer | Sidath Senanayake <sidaths@google.com> | 2021-01-29 14:51:21 +0000 |
commit | 201c8bfb4637601363b6e9283f3bdc510711a226 (patch) | |
tree | afa8b543c81e78e5b82156be5d5266060c71e069 /mali_kbase/arbiter/mali_kbase_arbif.c | |
parent | 72f2457ff7355ff0389efe5bc9cec3365362d8c4 (diff) | |
download | gpu-201c8bfb4637601363b6e9283f3bdc510711a226.tar.gz |
Mali Valhall DDK r28p0 KMD
Provenance:
f61f43e2c (collaborate/EAC/v_r28p0)
VX504X08X-BU-00000-r28p0-01eac0 - Android DDK
VX504X08X-SW-99006-r28p0-01eac0 - Android Renderscript AOSP parts
VX504X08X-BU-60000-r28p0-01eac0 - Android Document Bundle
VX504X08X-DC-11001-r28p0-01eac0 - Valhall Android DDK Software Errata
Signed-off-by: Sidath Senanayake <sidaths@google.com>
Change-Id: Iafabf59869cc06a23d69668f6ae1a152cb86b7f3
Diffstat (limited to 'mali_kbase/arbiter/mali_kbase_arbif.c')
-rw-r--r-- | mali_kbase/arbiter/mali_kbase_arbif.c | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/mali_kbase/arbiter/mali_kbase_arbif.c b/mali_kbase/arbiter/mali_kbase_arbif.c index ddf1a0c..3bfc62d 100644 --- a/mali_kbase/arbiter/mali_kbase_arbif.c +++ b/mali_kbase/arbiter/mali_kbase_arbif.c @@ -34,6 +34,12 @@ #include <linux/of_platform.h> #include "mali_kbase_arbiter_interface.h" +/** + * on_gpu_stop() - sends KBASE_VM_GPU_STOP_EVT event on VM stop + * @dev: arbiter interface device handle + * + * call back function to signal a GPU STOP event from arbiter interface + */ static void on_gpu_stop(struct device *dev) { struct kbase_device *kbdev = dev_get_drvdata(dev); @@ -42,6 +48,12 @@ static void on_gpu_stop(struct device *dev) kbase_arbiter_pm_vm_event(kbdev, KBASE_VM_GPU_STOP_EVT); } +/** + * on_gpu_granted() - sends KBASE_VM_GPU_GRANTED_EVT event on GPU granted + * @dev: arbiter interface device handle + * + * call back function to signal a GPU GRANT event from arbiter interface + */ static void on_gpu_granted(struct device *dev) { struct kbase_device *kbdev = dev_get_drvdata(dev); @@ -50,6 +62,12 @@ static void on_gpu_granted(struct device *dev) kbase_arbiter_pm_vm_event(kbdev, KBASE_VM_GPU_GRANTED_EVT); } +/** + * on_gpu_lost() - sends KBASE_VM_GPU_LOST_EVT event on GPU granted + * @dev: arbiter interface device handle + * + * call back function to signal a GPU LOST event from arbiter interface + */ static void on_gpu_lost(struct device *dev) { struct kbase_device *kbdev = dev_get_drvdata(dev); @@ -57,6 +75,14 @@ static void on_gpu_lost(struct device *dev) kbase_arbiter_pm_vm_event(kbdev, KBASE_VM_GPU_LOST_EVT); } +/** + * kbase_arbif_init() - Kbase Arbiter interface initialisation. + * @kbdev: The kbase device structure for the device (must be a valid pointer) + * + * Initialise Kbase Arbiter interface and assign callback functions. + * + * Return: 0 on success else a Linux error code + */ int kbase_arbif_init(struct kbase_device *kbdev) { #ifdef CONFIG_OF @@ -119,6 +145,12 @@ int kbase_arbif_init(struct kbase_device *kbdev) return 0; } +/** + * kbase_arbif_destroy() - De-init Kbase arbiter interface + * @kbdev: The kbase device structure for the device (must be a valid pointer) + * + * De-initialise Kbase arbiter interface + */ void kbase_arbif_destroy(struct kbase_device *kbdev) { struct arbiter_if_dev *arb_if = kbdev->arb.arb_if; @@ -133,6 +165,12 @@ void kbase_arbif_destroy(struct kbase_device *kbdev) kbdev->arb.arb_dev = NULL; } +/** + * kbase_arbif_gpu_request() - Request GPU from + * @kbdev: The kbase device structure for the device (must be a valid pointer) + * + * call back function from arb interface to arbiter requesting GPU for VM + */ void kbase_arbif_gpu_request(struct kbase_device *kbdev) { struct arbiter_if_dev *arb_if = kbdev->arb.arb_if; @@ -143,6 +181,12 @@ void kbase_arbif_gpu_request(struct kbase_device *kbdev) } } +/** + * kbase_arbif_gpu_stopped() - send GPU stopped message to the arbiter + * @kbdev: The kbase device structure for the device (must be a valid pointer) + * @gpu_required: GPU request flag + * + */ void kbase_arbif_gpu_stopped(struct kbase_device *kbdev, u8 gpu_required) { struct arbiter_if_dev *arb_if = kbdev->arb.arb_if; @@ -154,6 +198,12 @@ void kbase_arbif_gpu_stopped(struct kbase_device *kbdev, u8 gpu_required) } } +/** + * kbase_arbif_gpu_active() - Sends a GPU_ACTIVE message to the Arbiter + * @kbdev: The kbase device structure for the device (must be a valid pointer) + * + * Informs the arbiter VM is active + */ void kbase_arbif_gpu_active(struct kbase_device *kbdev) { struct arbiter_if_dev *arb_if = kbdev->arb.arb_if; @@ -164,6 +214,12 @@ void kbase_arbif_gpu_active(struct kbase_device *kbdev) } } +/** + * kbase_arbif_gpu_idle() - Inform the arbiter that the VM has gone idle + * @kbdev: The kbase device structure for the device (must be a valid pointer) + * + * Informs the arbiter VM is idle + */ void kbase_arbif_gpu_idle(struct kbase_device *kbdev) { struct arbiter_if_dev *arb_if = kbdev->arb.arb_if; |