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/tl/backend/mali_kbase_timeline_csf.c | 33 ++++++++++++++++++++++++++-------
1 files changed, 26 insertions(+), 7 deletions(-)
diff --git a/kernel/drivers/gpu/arm/bifrost/tl/backend/mali_kbase_timeline_csf.c b/kernel/drivers/gpu/arm/bifrost/tl/backend/mali_kbase_timeline_csf.c
index a2868da..a6062f1 100644
--- a/kernel/drivers/gpu/arm/bifrost/tl/backend/mali_kbase_timeline_csf.c
+++ b/kernel/drivers/gpu/arm/bifrost/tl/backend/mali_kbase_timeline_csf.c
@@ -25,6 +25,8 @@
#include <mali_kbase.h>
+#define GPU_FEATURES_CROSS_STREAM_SYNC_MASK (1ull << 3ull)
+
void kbase_create_timeline_objects(struct kbase_device *kbdev)
{
unsigned int as_nr;
@@ -33,6 +35,21 @@
struct kbase_timeline *timeline = kbdev->timeline;
struct kbase_tlstream *summary =
&kbdev->timeline->streams[TL_STREAM_TYPE_OBJ_SUMMARY];
+ u32 const kbdev_has_cross_stream_sync =
+ (kbdev->gpu_props.props.raw_props.gpu_features &
+ GPU_FEATURES_CROSS_STREAM_SYNC_MASK) ?
+ 1 :
+ 0;
+ u32 const arch_maj = (kbdev->gpu_props.props.raw_props.gpu_id &
+ GPU_ID2_ARCH_MAJOR) >>
+ GPU_ID2_ARCH_MAJOR_SHIFT;
+ u32 const num_sb_entries = arch_maj >= 11 ? 16 : 8;
+ u32 const supports_gpu_sleep =
+#ifdef KBASE_PM_RUNTIME
+ kbdev->pm.backend.gpu_sleep_supported;
+#else
+ false;
+#endif /* KBASE_PM_RUNTIME */
/* Summarize the Address Space objects. */
for (as_nr = 0; as_nr < kbdev->nr_hw_address_spaces; as_nr++)
@@ -51,10 +68,11 @@
kbdev);
/* Trace the creation of a new kbase device and set its properties. */
- __kbase_tlstream_tl_kbase_new_device(summary,
- kbdev->gpu_props.props.raw_props.gpu_id,
- kbdev->gpu_props.num_cores, kbdev->csf.global_iface.group_num,
- kbdev->nr_hw_address_spaces);
+ __kbase_tlstream_tl_kbase_new_device(summary, kbdev->gpu_props.props.raw_props.gpu_id,
+ kbdev->gpu_props.num_cores,
+ kbdev->csf.global_iface.group_num,
+ kbdev->nr_hw_address_spaces, num_sb_entries,
+ kbdev_has_cross_stream_sync, supports_gpu_sleep);
/* Lock the context list, to ensure no changes to the list are made
* while we're summarizing the contexts and their contents.
@@ -74,9 +92,10 @@
kbdev->csf.scheduler.csg_slots[slot_i].resident_group;
if (group)
- __kbase_tlstream_tl_kbase_device_program_csg(summary,
+ __kbase_tlstream_tl_kbase_device_program_csg(
+ summary,
kbdev->gpu_props.props.raw_props.gpu_id,
- group->handle, slot_i);
+ group->kctx->id, group->handle, slot_i, 0);
}
/* Reset body stream buffers while holding the kctx lock.
@@ -145,7 +164,7 @@
if (kcpu_queue)
__kbase_tlstream_tl_kbase_new_kcpuqueue(
- body, kcpu_queue, kcpu_queue->kctx->id,
+ body, kcpu_queue, kcpu_queue->id, kcpu_queue->kctx->id,
kcpu_queue->num_pending_cmds);
}
--
Gitblit v1.6.2