From e3e12f52b214121840b44c91de5b3e5af5d3eb84 Mon Sep 17 00:00:00 2001 From: hc <hc@nodka.com> Date: Mon, 06 Nov 2023 03:04:41 +0000 Subject: [PATCH] rk3568 rt init --- kernel/drivers/gpu/arm/mali400/mali/common/mali_osk.h | 47 ++++++++++------------------------------------- 1 files changed, 10 insertions(+), 37 deletions(-) diff --git a/kernel/drivers/gpu/arm/mali400/mali/common/mali_osk.h b/kernel/drivers/gpu/arm/mali400/mali/common/mali_osk.h index 9ade362..5a180e5 100755 --- a/kernel/drivers/gpu/arm/mali400/mali/common/mali_osk.h +++ b/kernel/drivers/gpu/arm/mali400/mali/common/mali_osk.h @@ -950,23 +950,24 @@ /** @brief Initialize a timer * - * Allocates resources for a new timer, and initializes them. This does not - * start the timer. - * - * @return a pointer to the allocated timer object, or NULL on failure. + * Initializes a given timer instance. + * This does not start the timer. + + * @param tim the timer to init. + * @param callback the callback that would be called when 'tim' times out. */ -_mali_osk_timer_t *_mali_osk_timer_init(_mali_osk_timer_callback_t callback); +void _mali_osk_timer_init(_mali_osk_timer_t *tim, _mali_osk_timer_callback_t callback); /** @brief Start a timer * * It is an error to start a timer without setting the callback via - * _mali_osk_timer_setcallback(). + * _mali_osk_timer_init(). * * It is an error to use this to start an already started timer. * * The timer will expire in \a ticks_to_expire ticks, at which point, the * callback function will be invoked with the callback-specific data, - * as registered by _mali_osk_timer_setcallback(). + * as registered by _mali_osk_timer_init(). * * @param tim the timer to start * @param ticks_to_expire the amount of time in ticks for the timer to run @@ -980,11 +981,11 @@ * stopped. If \a ticks_to_expire 0 the timer fires immediately. * * It is an error to modify a timer without setting the callback via - * _mali_osk_timer_setcallback(). + * _mali_osk_timer_init(). * * The timer will expire at \a ticks_to_expire from the time of the call, at * which point, the callback function will be invoked with the - * callback-specific data, as set by _mali_osk_timer_setcallback(). + * callback-specific data, as set by _mali_osk_timer_init(). * * @param tim the timer to modify, and start if necessary * @param ticks_to_expire the \em absolute time in ticks at which this timer @@ -1033,34 +1034,6 @@ * @return MALI_TRUE if time is active, MALI_FALSE if it is not active */ mali_bool _mali_osk_timer_pending(_mali_osk_timer_t *tim); - -/** @brief Set a timer's callback parameters. - * - * This must be called at least once before a timer is started/modified. - * - * After a timer has been stopped or expires, the callback remains set. This - * means that restarting the timer will call the same function with the same - * parameters on expiry. - * - * @param tim the timer to set callback on. - * @param callback Function to call when timer expires - * @param data Function-specific data to supply to the function on expiry. - */ -void _mali_osk_timer_setcallback(_mali_osk_timer_t *tim, _mali_osk_timer_callback_t callback, void *data); - -/** @brief Terminate a timer, and deallocate resources. - * - * The timer must first be stopped by calling _mali_osk_timer_del(). - * - * It is a programming error for _mali_osk_timer_term() to be called on: - * - timer that is currently running - * - a timer that is currently executing its callback. - * - * @param tim the timer to deallocate. - */ -void _mali_osk_timer_term(_mali_osk_timer_t *tim); -/** @} */ /* end group _mali_osk_timer */ - /** @defgroup _mali_osk_time OSK Time functions * -- Gitblit v1.6.2