diff options
Diffstat (limited to 'mali_kbase/platform/pixel')
-rw-r--r-- | mali_kbase/platform/pixel/mali_kbase_config_platform.h | 6 | ||||
-rw-r--r-- | mali_kbase/platform/pixel/pixel_gpu_slc.c | 51 |
2 files changed, 5 insertions, 52 deletions
diff --git a/mali_kbase/platform/pixel/mali_kbase_config_platform.h b/mali_kbase/platform/pixel/mali_kbase_config_platform.h index 47b1318..06b76ea 100644 --- a/mali_kbase/platform/pixel/mali_kbase_config_platform.h +++ b/mali_kbase/platform/pixel/mali_kbase_config_platform.h @@ -428,14 +428,12 @@ struct pixel_context { /** * struct pixel_platform_data - Per kbase_context Pixel specific platform data * - * @kctx: Handle to the parent kctx - * @stats: Tracks the dvfs metrics for the UID associated with this context - * @slc_vote: Tracks whether this context is voting for slc + * @kctx: Handle to the parent kctx + * @stats: Tracks the dvfs metrics for the UID associated with this context */ struct pixel_platform_data { struct kbase_context *kctx; struct gpu_dvfs_metrics_uid_stats* stats; - int slc_vote; }; #endif /* _KBASE_CONFIG_PLATFORM_H_ */ diff --git a/mali_kbase/platform/pixel/pixel_gpu_slc.c b/mali_kbase/platform/pixel/pixel_gpu_slc.c index e8aae75..8e46be1 100644 --- a/mali_kbase/platform/pixel/pixel_gpu_slc.c +++ b/mali_kbase/platform/pixel/pixel_gpu_slc.c @@ -17,37 +17,6 @@ #include "mali_kbase_config_platform.h" #include "pixel_gpu_slc.h" -#include <uapi/gpu/arm/midgard/platform/pixel/pixel_memory_group_manager.h> - -/** - * enum slc_vote_state - Whether a context is voting for SLC - */ -enum slc_vote_state { - /** @IDLE: Idle, not voting for SLC */ - IDLE = 0, - /** @VOTING: Active, voting for SLC */ - VOTING = 1, -}; - -/** - * transition() - Try to transition from one value to another - * - * @v: Value to transition - * @old: Starting state to transition from - * @new: Destination state to transition to - * - * Return: Whether the transition was successful - */ -static bool transition(int *v, int old, int new) -{ - bool const cond = *v == old; - - if (cond) - *v = new; - - return cond; -} - /** * gpu_pixel_handle_buffer_liveness_update_ioctl() - See gpu_slc_liveness_update * @@ -88,11 +57,7 @@ int gpu_slc_kctx_init(struct kbase_context *kctx) */ void gpu_slc_kctx_term(struct kbase_context *kctx) { - struct pixel_platform_data *pd = kctx->platform_data; - - /* Contexts can be terminated without being idled first */ - if (transition(&pd->slc_vote, VOTING, IDLE)) - pixel_mgm_slc_dec_refcount(kctx->kbdev->mgm_dev); + (void)kctx; } /** @@ -102,12 +67,7 @@ void gpu_slc_kctx_term(struct kbase_context *kctx) */ void gpu_slc_kctx_active(struct kbase_context *kctx) { - struct pixel_platform_data *pd = kctx->platform_data; - - lockdep_assert_held(&kctx->kbdev->hwaccess_lock); - - if (transition(&pd->slc_vote, IDLE, VOTING)) - pixel_mgm_slc_inc_refcount(kctx->kbdev->mgm_dev); + (void)kctx; } /** @@ -117,12 +77,7 @@ void gpu_slc_kctx_active(struct kbase_context *kctx) */ void gpu_slc_kctx_idle(struct kbase_context *kctx) { - struct pixel_platform_data *pd = kctx->platform_data; - - lockdep_assert_held(&kctx->kbdev->hwaccess_lock); - - if (transition(&pd->slc_vote, VOTING, IDLE)) - pixel_mgm_slc_dec_refcount(kctx->kbdev->mgm_dev); + (void)kctx; } /** |