From 1543e317f1da31b75942316931e8f491a8920811 Mon Sep 17 00:00:00 2001 From: hc <hc@nodka.com> Date: Thu, 04 Jan 2024 10:08:02 +0000 Subject: [PATCH] disable FB --- kernel/drivers/gpu/arm/bifrost/mali_kbase_hwaccess_jm.h | 46 +++++++++++++++++++++++++++++++--------------- 1 files changed, 31 insertions(+), 15 deletions(-) diff --git a/kernel/drivers/gpu/arm/bifrost/mali_kbase_hwaccess_jm.h b/kernel/drivers/gpu/arm/bifrost/mali_kbase_hwaccess_jm.h index 8689647..ca77c19 100644 --- a/kernel/drivers/gpu/arm/bifrost/mali_kbase_hwaccess_jm.h +++ b/kernel/drivers/gpu/arm/bifrost/mali_kbase_hwaccess_jm.h @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ /* * - * (C) COPYRIGHT 2014-2021 ARM Limited. All rights reserved. + * (C) COPYRIGHT 2014-2022 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 @@ -97,8 +97,8 @@ * Return: true if context is now active, false otherwise (ie if context does * not have an address space assigned) */ -bool kbase_backend_use_ctx_sched(struct kbase_device *kbdev, - struct kbase_context *kctx, int js); +bool kbase_backend_use_ctx_sched(struct kbase_device *kbdev, struct kbase_context *kctx, + unsigned int js); /** * kbase_backend_release_ctx_irq - Release a context from the GPU. This will @@ -181,10 +181,9 @@ * @kbdev: Device pointer * @js: Job slot to inspect * - * Return : Atom currently at the head of slot @js, or NULL + * Return: Atom currently at the head of slot @js, or NULL */ -struct kbase_jd_atom *kbase_backend_inspect_tail(struct kbase_device *kbdev, - int js); +struct kbase_jd_atom *kbase_backend_inspect_tail(struct kbase_device *kbdev, unsigned int js); /** * kbase_backend_nr_atoms_on_slot() - Return the number of atoms currently on a @@ -192,9 +191,9 @@ * @kbdev: Device pointer * @js: Job slot to inspect * - * Return : Number of atoms currently on slot + * Return: Number of atoms currently on slot */ -int kbase_backend_nr_atoms_on_slot(struct kbase_device *kbdev, int js); +int kbase_backend_nr_atoms_on_slot(struct kbase_device *kbdev, unsigned int js); /** * kbase_backend_nr_atoms_submitted() - Return the number of atoms on a slot @@ -202,9 +201,9 @@ * @kbdev: Device pointer * @js: Job slot to inspect * - * Return : Number of atoms currently on slot @js that are currently on the GPU. + * Return: Number of atoms currently on slot @js that are currently on the GPU. */ -int kbase_backend_nr_atoms_submitted(struct kbase_device *kbdev, int js); +int kbase_backend_nr_atoms_submitted(struct kbase_device *kbdev, unsigned int js); /** * kbase_backend_ctx_count_changed() - Number of contexts ready to submit jobs @@ -231,12 +230,12 @@ * @kbdev: Device pointer * @js: Job slot to inspect * - * Return : Number of jobs that can be submitted. + * Return: Number of jobs that can be submitted. */ -int kbase_backend_slot_free(struct kbase_device *kbdev, int js); +int kbase_backend_slot_free(struct kbase_device *kbdev, unsigned int js); /** - * kbase_job_check_enter_disjoint - potentially leave disjoint state + * kbase_job_check_leave_disjoint - potentially leave disjoint state * @kbdev: kbase device * @target_katom: atom which is finishing * @@ -287,8 +286,8 @@ * Context: * The job slot lock must be held when calling this function. */ -void kbase_job_slot_hardstop(struct kbase_context *kctx, int js, - struct kbase_jd_atom *target_katom); +void kbase_job_slot_hardstop(struct kbase_context *kctx, unsigned int js, + struct kbase_jd_atom *target_katom); /** * kbase_gpu_atoms_submitted_any() - Inspect whether there are any atoms @@ -299,4 +298,21 @@ */ bool kbase_gpu_atoms_submitted_any(struct kbase_device *kbdev); +/** + * kbase_backend_slot_kctx_purge_locked - Perform a purge on the slot_rb tracked + * kctx + * + * @kbdev: Device pointer + * @kctx: The kbase context that needs to be purged from slot_rb[] + * + * For JM GPUs, the L1 read only caches may need a start_flush invalidation, + * potentially on all slots (even if the kctx was only using a single slot), + * following a context termination or address-space ID recycle. This function + * performs a clean-up purge on the given kctx which if it has been tracked by + * slot_rb[] objects. + * + * Caller must hold kbase_device->hwaccess_lock. + */ +void kbase_backend_slot_kctx_purge_locked(struct kbase_device *kbdev, struct kbase_context *kctx); + #endif /* _KBASE_HWACCESS_JM_H_ */ -- Gitblit v1.6.2