My Project
Public Attributes | List of all members
kbase_pm_callback_conf Struct Reference

Public Attributes

void(* power_off_callback )(struct kbase_device *kbdev)
 
int(* power_on_callback )(struct kbase_device *kbdev)
 
void(* power_suspend_callback )(struct kbase_device *kbdev)
 
void(* power_resume_callback )(struct kbase_device *kbdev)
 
int(* power_runtime_init_callback )(struct kbase_device *kbdev)
 
void(* power_runtime_term_callback )(struct kbase_device *kbdev)
 
void(* power_runtime_off_callback )(struct kbase_device *kbdev)
 
int(* power_runtime_on_callback )(struct kbase_device *kbdev)
 
int(* power_runtime_idle_callback )(struct kbase_device *kbdev)
 

Member Data Documentation

◆ power_off_callback

void(* kbase_pm_callback_conf::power_off_callback) (struct kbase_device *kbdev)

Callback for when the GPU is idle and the power to it can be switched off.

The system integrator can decide whether to either do nothing, just switch off 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 callbacks responsibility to initialize and terminate this pointer if used (see kbase_platform_funcs_conf).

◆ power_on_callback

int(* kbase_pm_callback_conf::power_on_callback) (struct kbase_device *kbdev)

Callback for when the GPU is about to become active and power must be supplied.

This function must not return until the GPU is powered and clocked sufficiently for register access to succeed. The return value specifies whether the GPU was powered down since the call to power_off_callback. If the GPU state has been lost then this function must return 1, otherwise it should return 0. The platform specific private pointer kbase_device::platform_context can be accessed and modified in here. It is the platform callbacks responsibility to initialize and terminate this pointer if used (see kbase_platform_funcs_conf).

The return value of the first call to this function is ignored.

Returns
1 if the GPU state may have been lost, 0 otherwise.

◆ power_resume_callback

void(* kbase_pm_callback_conf::power_resume_callback) (struct kbase_device *kbdev)

Callback for when the system is resuming from a suspend and GPU power must be switched on.

Note that if this callback is present, then this may be called without a following call to power_on_callback. Therefore this callback must be able to take any action that might otherwise happen in power_on_callback.

The platform specific private pointer kbase_device::platform_context can be accessed and modified in here. It is the platform callbacks responsibility to initialize and terminate this pointer if used (see kbase_platform_funcs_conf).

◆ power_runtime_init_callback

int(* kbase_pm_callback_conf::power_runtime_init_callback) (struct kbase_device *kbdev)

Callback for handling runtime power management initialization.

The runtime power management callbacks power_runtime_off_callback and power_runtime_on_callback will become active from calls made to the OS from within this function. The runtime calls can be triggered by calls from power_off_callback and power_on_callback. Note: for linux the kernel must have CONFIG_PM_RUNTIME enabled to use this feature.

Returns
0 on success, else int error code.

◆ power_runtime_off_callback

void(* kbase_pm_callback_conf::power_runtime_off_callback) (struct kbase_device *kbdev)

Callback for runtime power-off power management callback

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.

Returns
0 on success, else OS error code.

◆ power_runtime_on_callback

int(* kbase_pm_callback_conf::power_runtime_on_callback) (struct kbase_device *kbdev)

Callback for runtime power-on power management callback

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.

◆ power_runtime_term_callback

void(* kbase_pm_callback_conf::power_runtime_term_callback) (struct kbase_device *kbdev)

Callback for handling runtime power management termination.

The runtime power management callbacks power_runtime_off_callback and power_runtime_on_callback should no longer be called by the OS on completion of this function. Note: for linux the kernel must have CONFIG_PM_RUNTIME enabled to use this feature.

◆ power_suspend_callback

void(* kbase_pm_callback_conf::power_suspend_callback) (struct kbase_device *kbdev)

Callback for when the system is requesting a suspend and GPU power must be switched off.

Note that if this callback is present, then this may be called without a preceding call to power_off_callback. Therefore this callback must be able to take any action that might otherwise happen in power_off_callback.

The platform specific private pointer kbase_device::platform_context can be accessed and modified in here. It is the platform callbacks responsibility to initialize and terminate this pointer if used (see kbase_platform_funcs_conf).


The documentation for this struct was generated from the following file: