| .. | .. |
|---|
| 25 | 25 | |
|---|
| 26 | 26 | #include <mali_kbase.h> |
|---|
| 27 | 27 | |
|---|
| 28 | +#define GPU_FEATURES_CROSS_STREAM_SYNC_MASK (1ull << 3ull) |
|---|
| 29 | + |
|---|
| 28 | 30 | void kbase_create_timeline_objects(struct kbase_device *kbdev) |
|---|
| 29 | 31 | { |
|---|
| 30 | 32 | unsigned int as_nr; |
|---|
| .. | .. |
|---|
| 33 | 35 | struct kbase_timeline *timeline = kbdev->timeline; |
|---|
| 34 | 36 | struct kbase_tlstream *summary = |
|---|
| 35 | 37 | &kbdev->timeline->streams[TL_STREAM_TYPE_OBJ_SUMMARY]; |
|---|
| 38 | + u32 const kbdev_has_cross_stream_sync = |
|---|
| 39 | + (kbdev->gpu_props.props.raw_props.gpu_features & |
|---|
| 40 | + GPU_FEATURES_CROSS_STREAM_SYNC_MASK) ? |
|---|
| 41 | + 1 : |
|---|
| 42 | + 0; |
|---|
| 43 | + u32 const arch_maj = (kbdev->gpu_props.props.raw_props.gpu_id & |
|---|
| 44 | + GPU_ID2_ARCH_MAJOR) >> |
|---|
| 45 | + GPU_ID2_ARCH_MAJOR_SHIFT; |
|---|
| 46 | + u32 const num_sb_entries = arch_maj >= 11 ? 16 : 8; |
|---|
| 47 | + u32 const supports_gpu_sleep = |
|---|
| 48 | +#ifdef KBASE_PM_RUNTIME |
|---|
| 49 | + kbdev->pm.backend.gpu_sleep_supported; |
|---|
| 50 | +#else |
|---|
| 51 | + false; |
|---|
| 52 | +#endif /* KBASE_PM_RUNTIME */ |
|---|
| 36 | 53 | |
|---|
| 37 | 54 | /* Summarize the Address Space objects. */ |
|---|
| 38 | 55 | for (as_nr = 0; as_nr < kbdev->nr_hw_address_spaces; as_nr++) |
|---|
| .. | .. |
|---|
| 51 | 68 | kbdev); |
|---|
| 52 | 69 | |
|---|
| 53 | 70 | /* Trace the creation of a new kbase device and set its properties. */ |
|---|
| 54 | | - __kbase_tlstream_tl_kbase_new_device(summary, |
|---|
| 55 | | - kbdev->gpu_props.props.raw_props.gpu_id, |
|---|
| 56 | | - kbdev->gpu_props.num_cores, kbdev->csf.global_iface.group_num, |
|---|
| 57 | | - kbdev->nr_hw_address_spaces); |
|---|
| 71 | + __kbase_tlstream_tl_kbase_new_device(summary, kbdev->gpu_props.props.raw_props.gpu_id, |
|---|
| 72 | + kbdev->gpu_props.num_cores, |
|---|
| 73 | + kbdev->csf.global_iface.group_num, |
|---|
| 74 | + kbdev->nr_hw_address_spaces, num_sb_entries, |
|---|
| 75 | + kbdev_has_cross_stream_sync, supports_gpu_sleep); |
|---|
| 58 | 76 | |
|---|
| 59 | 77 | /* Lock the context list, to ensure no changes to the list are made |
|---|
| 60 | 78 | * while we're summarizing the contexts and their contents. |
|---|
| .. | .. |
|---|
| 74 | 92 | kbdev->csf.scheduler.csg_slots[slot_i].resident_group; |
|---|
| 75 | 93 | |
|---|
| 76 | 94 | if (group) |
|---|
| 77 | | - __kbase_tlstream_tl_kbase_device_program_csg(summary, |
|---|
| 95 | + __kbase_tlstream_tl_kbase_device_program_csg( |
|---|
| 96 | + summary, |
|---|
| 78 | 97 | kbdev->gpu_props.props.raw_props.gpu_id, |
|---|
| 79 | | - group->handle, slot_i); |
|---|
| 98 | + group->kctx->id, group->handle, slot_i, 0); |
|---|
| 80 | 99 | } |
|---|
| 81 | 100 | |
|---|
| 82 | 101 | /* Reset body stream buffers while holding the kctx lock. |
|---|
| .. | .. |
|---|
| 145 | 164 | |
|---|
| 146 | 165 | if (kcpu_queue) |
|---|
| 147 | 166 | __kbase_tlstream_tl_kbase_new_kcpuqueue( |
|---|
| 148 | | - body, kcpu_queue, kcpu_queue->kctx->id, |
|---|
| 167 | + body, kcpu_queue, kcpu_queue->id, kcpu_queue->kctx->id, |
|---|
| 149 | 168 | kcpu_queue->num_pending_cmds); |
|---|
| 150 | 169 | } |
|---|
| 151 | 170 | |
|---|