diff options
Diffstat (limited to 'drivers/media/video/samsung/mali/common/mali_kernel_core.h')
-rw-r--r-- | drivers/media/video/samsung/mali/common/mali_kernel_core.h | 127 |
1 files changed, 16 insertions, 111 deletions
diff --git a/drivers/media/video/samsung/mali/common/mali_kernel_core.h b/drivers/media/video/samsung/mali/common/mali_kernel_core.h index 715c1cd..d424c48 100644 --- a/drivers/media/video/samsung/mali/common/mali_kernel_core.h +++ b/drivers/media/video/samsung/mali/common/mali_kernel_core.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010 ARM Limited. All rights reserved. + * Copyright (C) 2010-2012 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 Foundation, and any use by you of this program is subject to the terms of such GNU licence. @@ -13,122 +13,27 @@ #include "mali_osk.h" -#if USING_MALI_PMM -#include "mali_ukk.h" -#include "mali_pmm.h" -#include "mali_pmm_system.h" -#endif +extern int mali_hang_check_interval; +extern int mali_max_job_runtime; -_mali_osk_errcode_t mali_kernel_constructor( void ); -void mali_kernel_destructor( void ); +typedef enum +{ + _MALI_PRODUCT_ID_UNKNOWN, + _MALI_PRODUCT_ID_MALI200, + _MALI_PRODUCT_ID_MALI300, + _MALI_PRODUCT_ID_MALI400, + _MALI_PRODUCT_ID_MALI450, +} _mali_product_id_t; -/** - * @brief Tranlate CPU physical to Mali physical addresses. - * - * This function is used to convert CPU physical addresses to Mali Physical - * addresses, such that _mali_ukk_map_external_mem may be used to map them - * into Mali. This will be used by _mali_ukk_va_to_mali_pa. - * - * This function only supports physically contiguous regions. - * - * A default implementation is provided, which uses a registered MEM_VALIDATION - * resource to do a static translation. Only an address range which will lie - * in the range specified by MEM_VALIDATION will be successfully translated. - * - * If a more complex, or non-static translation is required, then the - * implementor has the following options: - * - Rewrite this function to provide such a translation - * - Integrate the provider of the memory with UMP. - * - * @param[in,out] phys_base pointer to the page-aligned base address of the - * physical range to be translated - * - * @param[in] size size of the address range to be translated, which must be a - * multiple of the physical page size. - * - * @return on success, _MALI_OSK_ERR_OK and *phys_base is translated. If the - * cpu physical address range is not in the valid range, then a suitable - * _mali_osk_errcode_t error. - * - */ -_mali_osk_errcode_t mali_kernel_core_translate_cpu_to_mali_phys_range( u32 *phys_base, u32 size ); - - -/** - * @brief Validate a Mali physical address range. - * - * This function is used to ensure that an address range passed to - * _mali_ukk_map_external_mem is allowed to be mapped into Mali. - * - * This function only supports physically contiguous regions. - * - * A default implementation is provided, which uses a registered MEM_VALIDATION - * resource to do a static translation. Only an address range which will lie - * in the range specified by MEM_VALIDATION will be successfully validated. - * - * If a more complex, or non-static validation is required, then the - * implementor has the following options: - * - Rewrite this function to provide such a validation - * - Integrate the provider of the memory with UMP. - * - * @param phys_base page-aligned base address of the Mali physical range to be - * validated. - * - * @param size size of the address range to be validated, which must be a - * multiple of the physical page size. - * - * @return _MALI_OSK_ERR_OK if the Mali physical range is valid. Otherwise, a - * suitable _mali_osk_errcode_t error. - * - */ -_mali_osk_errcode_t mali_kernel_core_validate_mali_phys_range( u32 phys_base, u32 size ); +_mali_osk_errcode_t mali_initialize_subsystems(void); -#if USING_MALI_PMM -/** - * @brief Signal a power up on a Mali core. - * - * This function flags a core as powered up. - * For PP and GP cores it calls functions that move the core from a power off - * queue into the idle queue ready to run jobs. It also tries to schedule any - * pending jobs to run on it. - * - * This function will fail if the core is not powered off - either running or - * already idle. - * - * @param core The PMM core id to power up. - * @param queue_only When MALI_TRUE only re-queue the core - do not reset. - * - * @return _MALI_OSK_ERR_OK if the core has been powered up. Otherwise a - * suitable _mali_osk_errcode_t error. - */ -_mali_osk_errcode_t mali_core_signal_power_up( mali_pmm_core_id core, mali_bool queue_only ); - -/** - * @brief Signal a power down on a Mali core. - * - * This function flags a core as powered down. - * For PP and GP cores it calls functions that move the core from an idle - * queue into the power off queue. - * - * This function will fail if the core is not idle - either running or - * already powered down. - * - * @param core The PMM core id to power up. - * @param immediate_only Do not set the core to pending power down if it can't - * power down immediately - * - * @return _MALI_OSK_ERR_OK if the core has been powered up. Otherwise a - * suitable _mali_osk_errcode_t error. - */ -_mali_osk_errcode_t mali_core_signal_power_down( mali_pmm_core_id core, mali_bool immediate_only ); +void mali_terminate_subsystems(void); -#endif +void mali_kernel_core_wakeup(void); -/** - * Flag to indicate whether or not mali_benchmark is turned on. - */ -extern int mali_benchmark; +_mali_product_id_t mali_kernel_core_get_product_id(void); +u32 _mali_kernel_core_dump_state(char* buf, u32 size); #endif /* __MALI_KERNEL_CORE_H__ */ |