diff options
author | Jack Diver <diverj@google.com> | 2024-03-13 16:33:34 +0000 |
---|---|---|
committer | Jack Diver <diverj@google.com> | 2024-03-14 10:13:35 +0000 |
commit | a96467622576b7f1318c55c61a862554ff6ebce9 (patch) | |
tree | 0b15dc3751ac9f8f90c9beb03789c1fe8f3f8ffd /mali_kbase | |
parent | 1dd0e69d4683cade5e1d53356d4663a3657a7a6c (diff) | |
download | gpu-a96467622576b7f1318c55c61a862554ff6ebce9.tar.gz |
[DO NOT MERGE ANYWHERE] Revert "mali_pixel: Implement SLC partition ref counting"
Revert submission 2753879-gpu-slcv2-gs201
Reason for revert: Prebuild did not land before cutoff
Reverted changes: /q/submissionid:2753879-gpu-slcv2-gs201
Bug: 329447972
Change-Id: I13716375afbe5be1ae04eb059ed24e8780e503cd
Diffstat (limited to 'mali_kbase')
-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; } /** |