summaryrefslogtreecommitdiff
path: root/mali_kbase/csf/mali_kbase_csf_kcpu.h
diff options
context:
space:
mode:
Diffstat (limited to 'mali_kbase/csf/mali_kbase_csf_kcpu.h')
-rw-r--r--mali_kbase/csf/mali_kbase_csf_kcpu.h30
1 files changed, 27 insertions, 3 deletions
diff --git a/mali_kbase/csf/mali_kbase_csf_kcpu.h b/mali_kbase/csf/mali_kbase_csf_kcpu.h
index a19847e..291509b 100644
--- a/mali_kbase/csf/mali_kbase_csf_kcpu.h
+++ b/mali_kbase/csf/mali_kbase_csf_kcpu.h
@@ -243,7 +243,19 @@ struct kbase_kcpu_command {
* @work: struct work_struct which contains a pointer to
* the function which handles processing of kcpu
* commands enqueued into a kcpu command queue;
- * part of kernel API for processing workqueues
+ * part of kernel API for processing workqueues.
+ * This would be used if the context is not
+ * prioritised, otherwise it would be handled by
+ * kbase_csf_scheduler_kthread().
+ * @high_prio_work: A counterpart to @work, this queue would be
+ * added to a list to be processed by
+ * kbase_csf_scheduler_kthread() if it is
+ * prioritised.
+ * @pending_kick: Indicates that kbase_csf_scheduler_kthread()
+ * should re-evaluate pending commands for this
+ * queue. This would be set to false when the work
+ * is done. This is used mainly for
+ * synchronisation with queue termination.
* @timeout_work: struct work_struct which contains a pointer to the
* function which handles post-timeout actions
* queue when a fence signal timeout occurs.
@@ -287,6 +299,8 @@ struct kbase_kcpu_command_queue {
struct kbase_context *kctx;
struct kbase_kcpu_command commands[KBASEP_KCPU_QUEUE_SIZE];
struct work_struct work;
+ struct list_head high_prio_work;
+ atomic_t pending_kick;
struct work_struct timeout_work;
u8 start_offset;
u8 id;
@@ -299,9 +313,7 @@ struct kbase_kcpu_command_queue {
bool command_started;
struct list_head jit_blocked;
bool has_error;
-#ifdef CONFIG_MALI_FENCE_DEBUG
struct timer_list fence_timeout;
-#endif /* CONFIG_MALI_FENCE_DEBUG */
#if IS_ENABLED(CONFIG_SYNC_FILE)
struct kbase_kcpu_dma_fence_meta *metadata;
#endif /* CONFIG_SYNC_FILE */
@@ -335,6 +347,18 @@ int kbase_csf_kcpu_queue_delete(struct kbase_context *kctx,
struct kbase_ioctl_kcpu_queue_delete *del);
/**
+ * kbase_csf_kcpu_queue_process - Proces pending KCPU queue commands
+ *
+ * @queue: The queue to process pending commands for
+ * @drain_queue: Whether to skip all blocking commands in the queue.
+ * This is expected to be set to true on queue
+ * termination.
+ *
+ * Return: 0 if successful or a negative error code on failure.
+ */
+void kbase_csf_kcpu_queue_process(struct kbase_kcpu_command_queue *queue, bool drain_queue);
+
+/**
* kbase_csf_kcpu_queue_enqueue - Enqueue a KCPU command into a KCPU command
* queue.
*