My Project
Functions
mali_kbase_hwaccess_pm.h File Reference
#include <mali_midg_regmap.h>
#include <linux/atomic.h>
#include <mali_kbase_pm_defs.h>

Go to the source code of this file.

Functions

int kbase_hwaccess_pm_init (struct kbase_device *kbdev)
 
void kbase_hwaccess_pm_term (struct kbase_device *kbdev)
 
int kbase_hwaccess_pm_powerup (struct kbase_device *kbdev, unsigned int flags)
 
void kbase_hwaccess_pm_halt (struct kbase_device *kbdev)
 
void kbase_hwaccess_pm_suspend (struct kbase_device *kbdev)
 
void kbase_hwaccess_pm_resume (struct kbase_device *kbdev)
 
void kbase_hwaccess_pm_gpu_active (struct kbase_device *kbdev)
 
void kbase_hwaccess_pm_gpu_idle (struct kbase_device *kbdev)
 
void kbase_pm_set_debug_core_mask (struct kbase_device *kbdev, u64 new_core_mask_js0, u64 new_core_mask_js1, u64 new_core_mask_js2)
 
const struct kbase_pm_ca_policy * kbase_pm_ca_get_policy (struct kbase_device *kbdev)
 
void kbase_pm_ca_set_policy (struct kbase_device *kbdev, const struct kbase_pm_ca_policy *policy)
 
int kbase_pm_ca_list_policies (const struct kbase_pm_ca_policy *const **policies)
 
const struct kbase_pm_policy * kbase_pm_get_policy (struct kbase_device *kbdev)
 
void kbase_pm_set_policy (struct kbase_device *kbdev, const struct kbase_pm_policy *policy)
 
int kbase_pm_list_policies (const struct kbase_pm_policy *const **policies)
 

Detailed Description

HW access power manager common APIs

Function Documentation

◆ kbase_hwaccess_pm_gpu_active()

void kbase_hwaccess_pm_gpu_active ( struct kbase_device kbdev)

Perform any required actions for activating the GPU. Called when the first context goes active.

Parameters
kbdevThe kbase device structure for the device (must be a valid pointer)

◆ kbase_hwaccess_pm_gpu_idle()

void kbase_hwaccess_pm_gpu_idle ( struct kbase_device kbdev)

Perform any required actions for idling the GPU. Called when the last context goes idle.

Parameters
kbdevThe kbase device structure for the device (must be a valid pointer)

◆ kbase_hwaccess_pm_halt()

void kbase_hwaccess_pm_halt ( struct kbase_device kbdev)

Halt the power management framework.

Should ensure that no new interrupts are generated, but allow any currently running interrupt handlers to complete successfully. The GPU is forced off by the time this function returns, regardless of whether or not the active power policy asks for the GPU to be powered off.

Parameters
kbdevThe kbase device structure for the device (must be a valid pointer)

◆ kbase_hwaccess_pm_init()

int kbase_hwaccess_pm_init ( struct kbase_device kbdev)

Initialize the power management framework.

Must be called before any other power management function

Parameters
kbdevThe kbase device structure for the device (must be a valid pointer)
Returns
0 if the power management framework was successfully initialized.

◆ kbase_hwaccess_pm_powerup()

int kbase_hwaccess_pm_powerup ( struct kbase_device kbdev,
unsigned int  flags 
)

kbase_hwaccess_pm_powerup - Power up the GPU. : The kbase device structure for the device (must be a valid pointer) : Flags to pass on to kbase_pm_init_hw

Power up GPU after all modules have been initialized and interrupt handlers installed.

Return: 0 if powerup was successful.

◆ kbase_hwaccess_pm_resume()

void kbase_hwaccess_pm_resume ( struct kbase_device kbdev)

Perform any backend-specific actions to resume the GPU from a suspend

Parameters
kbdevThe kbase device structure for the device (must be a valid pointer)

◆ kbase_hwaccess_pm_suspend()

void kbase_hwaccess_pm_suspend ( struct kbase_device kbdev)

Perform any backend-specific actions to suspend the GPU

Parameters
kbdevThe kbase device structure for the device (must be a valid pointer)

◆ kbase_hwaccess_pm_term()

void kbase_hwaccess_pm_term ( struct kbase_device kbdev)

Terminate the power management framework.

No power management functions may be called after this (except kbase_pm_init)

Parameters
kbdevThe kbase device structure for the device (must be a valid pointer)

◆ kbase_pm_ca_get_policy()

const struct kbase_pm_ca_policy* kbase_pm_ca_get_policy ( struct kbase_device kbdev)

Get the current policy.

Returns the policy that is currently active.

Parameters
kbdevThe kbase device structure for the device (must be a valid pointer)
Returns
The current policy

◆ kbase_pm_ca_list_policies()

int kbase_pm_ca_list_policies ( const struct kbase_pm_ca_policy *const **  policies)

Retrieve a static list of the available policies.

Parameters
[out]policiesAn array pointer to take the list of policies. This may be NULL. The contents of this array must not be modified.
Returns
The number of policies

◆ kbase_pm_ca_set_policy()

void kbase_pm_ca_set_policy ( struct kbase_device kbdev,
const struct kbase_pm_ca_policy *  policy 
)

Change the policy to the one specified.

Parameters
kbdevThe kbase device structure for the device (must be a valid pointer)
policyThe policy to change to (valid pointer returned from kbase_pm_ca_list_policies)

◆ kbase_pm_get_policy()

const struct kbase_pm_policy* kbase_pm_get_policy ( struct kbase_device kbdev)

Get the current policy.

Returns the policy that is currently active.

Parameters
kbdevThe kbase device structure for the device (must be a valid pointer)
Returns
The current policy

◆ kbase_pm_list_policies()

int kbase_pm_list_policies ( const struct kbase_pm_policy *const **  policies)

Retrieve a static list of the available policies.

Parameters
[out]policiesAn array pointer to take the list of policies. This may be NULL. The contents of this array must not be modified.
Returns
The number of policies

◆ kbase_pm_set_debug_core_mask()

void kbase_pm_set_debug_core_mask ( struct kbase_device kbdev,
u64  new_core_mask_js0,
u64  new_core_mask_js1,
u64  new_core_mask_js2 
)

Set the debug core mask.

This determines which cores the power manager is allowed to use.

Parameters
kbdevThe kbase device structure for the device (must be a valid pointer)
new_core_mask_js0The core mask to use for job slot 0
new_core_mask_js0The core mask to use for job slot 1
new_core_mask_js0The core mask to use for job slot 2

◆ kbase_pm_set_policy()

void kbase_pm_set_policy ( struct kbase_device kbdev,
const struct kbase_pm_policy *  policy 
)

Change the policy to the one specified.

Parameters
kbdevThe kbase device structure for the device (must be a valid pointer)
policyThe policy to change to (valid pointer returned from kbase_pm_list_policies)