My Project
mali_kbase_defs.h
Go to the documentation of this file.
1 /*
2  *
3  * (C) COPYRIGHT 2011-2017 ARM Limited. All rights reserved.
4  *
5  * This program is free software and is provided to you under the terms of the
6  * GNU General Public License version 2 as published by the Free Software
7  * Foundation, and any use by you of this program is subject to the terms
8  * of such GNU licence.
9  *
10  * A copy of the licence is included with the program, and can also be obtained
11  * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
12  * Boston, MA 02110-1301, USA.
13  *
14  */
15 
16 
17 
18 
19 
27 #ifndef _KBASE_DEFS_H_
28 #define _KBASE_DEFS_H_
29 
30 #include <mali_kbase_config.h>
31 #include <mali_base_hwconfig_features.h>
32 #include <mali_base_hwconfig_issues.h>
33 #include <mali_kbase_mem_lowlevel.h>
34 #include <mali_kbase_mmu_hw.h>
35 #include <mali_kbase_mmu_mode.h>
36 #include <mali_kbase_instr_defs.h>
37 #include <mali_kbase_pm.h>
38 
39 #include <linux/atomic.h>
40 #include <linux/mempool.h>
41 #include <linux/slab.h>
42 #include <linux/file.h>
43 
44 #ifdef CONFIG_MALI_FPGA_BUS_LOGGER
45 #include <linux/bus_logger.h>
46 #endif
47 
48 
49 #ifdef CONFIG_KDS
50 #include <linux/kds.h>
51 #endif /* CONFIG_KDS */
52 
53 #ifdef CONFIG_SYNC
54 #include "sync.h"
55 #endif /* CONFIG_SYNC */
56 
57 #include "mali_kbase_dma_fence.h"
58 
59 #ifdef CONFIG_HISI_DEBUG_FS
60 #include <linux/debugfs.h>
61 #endif /* CONFIG_HISI_DEBUG_FS */
62 
63 #ifdef CONFIG_PM_DEVFREQ
64 #include <linux/devfreq.h>
65 #endif /* CONFIG_DEVFREQ */
66 
67 #include <linux/clk.h>
68 #include <linux/regulator/consumer.h>
69 
70 #if defined(CONFIG_PM_RUNTIME) || \
71  (defined(CONFIG_PM) && LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0))
72 #define KBASE_PM_RUNTIME 1
73 #endif
74 
76 #ifdef CONFIG_MALI_MIDGARD_ENABLE_TRACE
77 #define KBASE_TRACE_ENABLE 1
78 #endif
79 
80 #ifndef KBASE_TRACE_ENABLE
81 #ifdef CONFIG_MALI_DEBUG
82 #define KBASE_TRACE_ENABLE 1
83 #else
84 #define KBASE_TRACE_ENABLE 0
85 #endif /* CONFIG_MALI_DEBUG */
86 #endif /* KBASE_TRACE_ENABLE */
87 
89 #define KBASE_TRACE_DUMP_ON_JOB_SLOT_ERROR 1
90 
97 #define ZAP_TIMEOUT 1000
98 
100 #define RESET_TIMEOUT 500
101 
113 #define KBASE_DISABLE_SCHEDULING_SOFT_STOPS 0
114 
124 #define KBASE_DISABLE_SCHEDULING_HARD_STOPS 0
125 
132 #define BASE_JM_MAX_NR_SLOTS 3
133 
140 #define BASE_MAX_NR_AS 16
141 
142 /* mmu */
143 #define MIDGARD_MMU_VA_BITS 48
144 
145 #if MIDGARD_MMU_VA_BITS > 39
146 #define MIDGARD_MMU_TOPLEVEL 0
147 #else
148 #define MIDGARD_MMU_TOPLEVEL 1
149 #endif
150 
151 #define MIDGARD_MMU_BOTTOMLEVEL 3
152 
153 #define GROWABLE_FLAGS_REQUIRED (KBASE_REG_PF_GROW | KBASE_REG_GPU_WR)
154 
156 #define KBASEP_AS_NR_INVALID (-1)
157 
158 #define KBASE_LOCK_REGION_MAX_SIZE (63)
159 #define KBASE_LOCK_REGION_MIN_SIZE (11)
160 
161 #define KBASE_TRACE_SIZE_LOG2 8 /* 256 entries */
162 #define KBASE_TRACE_SIZE (1 << KBASE_TRACE_SIZE_LOG2)
163 #define KBASE_TRACE_MASK ((1 << KBASE_TRACE_SIZE_LOG2)-1)
164 
165 #include "mali_kbase_js_defs.h"
166 #include "mali_kbase_hwaccess_defs.h"
167 
168 #define KBASEP_FORCE_REPLAY_DISABLED 0
169 
170 /* Maximum force replay limit when randomization is enabled */
171 #define KBASEP_FORCE_REPLAY_RANDOM_LIMIT 16
172 
174 #define KBASE_KATOM_FLAG_BEEN_SOFT_STOPPPED (1<<1)
175 
176 #define KBASE_KATOM_FLAGS_RERUN (1<<2)
177 #define KBASE_KATOM_FLAGS_JOBCHAIN (1<<3)
178 
179 #define KBASE_KATOM_FLAG_BEEN_HARD_STOPPED (1<<4)
180 
181 #define KBASE_KATOM_FLAG_IN_DISJOINT (1<<5)
182 /* Atom blocked on cross-slot dependency */
183 #define KBASE_KATOM_FLAG_X_DEP_BLOCKED (1<<7)
184 /* Atom has fail dependency on cross-slot dependency */
185 #define KBASE_KATOM_FLAG_FAIL_BLOCKER (1<<8)
186 /* Atom is currently in the list of atoms blocked on cross-slot dependencies */
187 #define KBASE_KATOM_FLAG_JSCTX_IN_X_DEP_LIST (1<<9)
188 /* Atom is currently holding a context reference */
189 #define KBASE_KATOM_FLAG_HOLDING_CTX_REF (1<<10)
190 /* Atom requires GPU to be in protected mode */
191 #define KBASE_KATOM_FLAG_PROTECTED (1<<11)
192 /* Atom has been stored in runnable_tree */
193 #define KBASE_KATOM_FLAG_JSCTX_IN_TREE (1<<12)
194 
195 /* SW related flags about types of JS_COMMAND action
196  * NOTE: These must be masked off by JS_COMMAND_MASK */
197 
199 #define JS_COMMAND_SW_CAUSES_DISJOINT 0x100
200 
202 #define JS_COMMAND_SW_BITS (JS_COMMAND_SW_CAUSES_DISJOINT)
203 
204 #if (JS_COMMAND_SW_BITS & JS_COMMAND_MASK)
205 #error JS_COMMAND_SW_BITS not masked off by JS_COMMAND_MASK. Must update JS_COMMAND_SW_<..> bitmasks
206 #endif
207 
210 #define JS_COMMAND_SOFT_STOP_WITH_SW_DISJOINT \
211  (JS_COMMAND_SW_CAUSES_DISJOINT | JS_COMMAND_SOFT_STOP)
212 
213 #define KBASEP_ATOM_ID_INVALID BASE_JD_ATOM_COUNT
214 
215 /* Serialize atoms within a slot (ie only one atom per job slot) */
216 #define KBASE_SERIALIZE_INTRA_SLOT (1 << 0)
217 /* Serialize atoms between slots (ie only one job slot running at any time) */
218 #define KBASE_SERIALIZE_INTER_SLOT (1 << 1)
219 /* Reset the GPU after each atom completion */
220 #define KBASE_SERIALIZE_RESET (1 << 2)
221 
222 #ifdef CONFIG_HISI_DEBUG_FS
223 struct base_job_fault_event {
224 
225  u32 event_code;
226  struct kbase_jd_atom *katom;
227  struct work_struct job_fault_work;
228  struct list_head head;
229  int reg_offset;
230 };
231 
232 #endif
233 
235  struct kbase_jd_atom *atom;
236  u8 dep_type;
237 };
238 
246  uintptr_t addr;
247  u32 value;
248 };
249 
260 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 4, 0))
261  bool enabled;
262 #else
263  u32 enabled;
264 #endif
265 
266  spinlock_t lock;
267  size_t count;
268  u16 size;
269  struct kbase_io_access *buf;
270 };
271 
280 static inline const struct kbase_jd_atom * kbase_jd_katom_dep_atom(const struct kbase_jd_atom_dependency *dep)
281 {
282  LOCAL_ASSERT(dep != NULL);
283 
284  return (const struct kbase_jd_atom *)(dep->atom);
285 }
286 
295 static inline u8 kbase_jd_katom_dep_type(const struct kbase_jd_atom_dependency *dep)
296 {
297  LOCAL_ASSERT(dep != NULL);
298 
299  return dep->dep_type;
300 }
301 
310 static inline void kbase_jd_katom_dep_set(const struct kbase_jd_atom_dependency *const_dep,
311  struct kbase_jd_atom *a, u8 type)
312 {
313  struct kbase_jd_atom_dependency *dep;
314 
315  LOCAL_ASSERT(const_dep != NULL);
316 
317  dep = (struct kbase_jd_atom_dependency *)const_dep;
318 
319  dep->atom = a;
320  dep->dep_type = type;
321 }
322 
329 static inline void kbase_jd_katom_dep_clear(const struct kbase_jd_atom_dependency *const_dep)
330 {
331  struct kbase_jd_atom_dependency *dep;
332 
333  LOCAL_ASSERT(const_dep != NULL);
334 
335  dep = (struct kbase_jd_atom_dependency *)const_dep;
336 
337  dep->atom = NULL;
338  dep->dep_type = BASE_JD_DEP_TYPE_INVALID;
339 }
340 
341 enum kbase_atom_gpu_rb_state {
342  /* Atom is not currently present in slot ringbuffer */
343  KBASE_ATOM_GPU_RB_NOT_IN_SLOT_RB,
344  /* Atom is in slot ringbuffer but is blocked on a previous atom */
345  KBASE_ATOM_GPU_RB_WAITING_BLOCKED,
346  /* Atom is in slot ringbuffer but is waiting for a previous protected
347  * mode transition to complete */
348  KBASE_ATOM_GPU_RB_WAITING_PROTECTED_MODE_PREV,
349  /* Atom is in slot ringbuffer but is waiting for proected mode
350  * transition */
351  KBASE_ATOM_GPU_RB_WAITING_PROTECTED_MODE_TRANSITION,
352  /* Atom is in slot ringbuffer but is waiting for cores to become
353  * available */
354  KBASE_ATOM_GPU_RB_WAITING_FOR_CORE_AVAILABLE,
355  /* Atom is in slot ringbuffer but is blocked on affinity */
356  KBASE_ATOM_GPU_RB_WAITING_AFFINITY,
357  /* Atom is in slot ringbuffer and ready to run */
358  KBASE_ATOM_GPU_RB_READY,
359  /* Atom is in slot ringbuffer and has been submitted to the GPU */
360  KBASE_ATOM_GPU_RB_SUBMITTED,
361  /* Atom must be returned to JS as soon as it reaches the head of the
362  * ringbuffer due to a previous failure */
363  KBASE_ATOM_GPU_RB_RETURN_TO_JS = -1
364 };
365 
366 enum kbase_atom_enter_protected_state {
367  /*
368  * Starting state:
369  * Check if a transition into protected mode is required.
370  *
371  * NOTE: The integer value of this must
372  * match KBASE_ATOM_EXIT_PROTECTED_CHECK.
373  */
374  KBASE_ATOM_ENTER_PROTECTED_CHECK = 0,
375  /* Wait for vinstr to suspend. */
376  KBASE_ATOM_ENTER_PROTECTED_VINSTR,
377  /* Wait for the L2 to become idle in preparation for
378  * the coherency change. */
379  KBASE_ATOM_ENTER_PROTECTED_IDLE_L2,
380  /* End state;
381  * Prepare coherency change. */
382  KBASE_ATOM_ENTER_PROTECTED_FINISHED,
383 };
384 
385 enum kbase_atom_exit_protected_state {
386  /*
387  * Starting state:
388  * Check if a transition out of protected mode is required.
389  *
390  * NOTE: The integer value of this must
391  * match KBASE_ATOM_ENTER_PROTECTED_CHECK.
392  */
393  KBASE_ATOM_EXIT_PROTECTED_CHECK = 0,
394  /* Wait for the L2 to become idle in preparation
395  * for the reset. */
396  KBASE_ATOM_EXIT_PROTECTED_IDLE_L2,
397  /* Issue the protected reset. */
398  KBASE_ATOM_EXIT_PROTECTED_RESET,
399  /* End state;
400  * Wait for the reset to complete. */
401  KBASE_ATOM_EXIT_PROTECTED_RESET_WAIT,
402 };
403 
405  u64 gpu_address;
406  struct kbase_mem_phy_alloc *alloc;
407 };
408 
410  struct work_struct work;
411  ktime_t start_timestamp;
412 
413  struct base_jd_udata udata;
414  struct kbase_context *kctx;
415 
416  struct list_head dep_head[2];
417  struct list_head dep_item[2];
418  const struct kbase_jd_atom_dependency dep[2];
419  /* List head used during job dispatch job_done processing - as
420  * dependencies may not be entirely resolved at this point, we need to
421  * use a separate list head. */
422  struct list_head jd_item;
423  /* true if atom's jd_item is currently on a list. Prevents atom being
424  * processed twice. */
425  bool in_jd_list;
426 
427  u16 nr_extres;
428  struct kbase_ext_res *extres;
429 
430  u32 device_nr;
431  u64 affinity;
432  u64 jc;
433  enum kbase_atom_coreref_state coreref_state;
434 #ifdef CONFIG_KDS
435  struct list_head node;
436  struct kds_resource_set *kds_rset;
437  bool kds_dep_satisfied;
438 #endif /* CONFIG_KDS */
439 #ifdef CONFIG_SYNC
440  struct sync_fence *fence;
441  struct sync_fence_waiter sync_waiter;
442 #endif /* CONFIG_SYNC */
443 #ifdef CONFIG_MALI_DMA_FENCE
444  struct {
445  /* This points to the dma-buf fence for this atom. If this is
446  * NULL then there is no fence for this atom and the other
447  * fields related to dma_fence may have invalid data.
448  *
449  * The context and seqno fields contain the details for this
450  * fence.
451  *
452  * This fence is signaled when the katom is completed,
453  * regardless of the event_code of the katom (signal also on
454  * failure).
455  */
456  struct fence *fence;
457  /* The dma-buf fence context number for this atom. A unique
458  * context number is allocated to each katom in the context on
459  * context creation.
460  */
461  unsigned int context;
462  /* The dma-buf fence sequence number for this atom. This is
463  * increased every time this katom uses dma-buf fence.
464  */
465  atomic_t seqno;
466  /* This contains a list of all callbacks set up to wait on
467  * other fences. This atom must be held back from JS until all
468  * these callbacks have been called and dep_count have reached
469  * 0. The initial value of dep_count must be equal to the
470  * number of callbacks on this list.
471  *
472  * This list is protected by jctx.lock. Callbacks are added to
473  * this list when the atom is built and the wait are set up.
474  * All the callbacks then stay on the list until all callbacks
475  * have been called and the atom is queued, or cancelled, and
476  * then all callbacks are taken off the list and freed.
477  */
478  struct list_head callbacks;
479  /* Atomic counter of number of outstandind dma-buf fence
480  * dependencies for this atom. When dep_count reaches 0 the
481  * atom may be queued.
482  *
483  * The special value "-1" may only be set after the count
484  * reaches 0, while holding jctx.lock. This indicates that the
485  * atom has been handled, either queued in JS or cancelled.
486  *
487  * If anyone but the dma-fence worker sets this to -1 they must
488  * ensure that any potentially queued worker must have
489  * completed before allowing the atom to be marked as unused.
490  * This can be done by flushing the fence work queue:
491  * kctx->dma_fence.wq.
492  */
493  atomic_t dep_count;
494  } dma_fence;
495 #endif /* CONFIG_MALI_DMA_FENCE */
496 
497  /* Note: refer to kbasep_js_atom_retained_state, which will take a copy of some of the following members */
498  enum base_jd_event_code event_code;
504 
505  u32 ticks;
506  /* JS atom priority with respect to other atoms on its kctx. */
507  int sched_priority;
508 
509  int poking; /* BASE_HW_ISSUE_8316 */
510 
511  wait_queue_head_t completed;
512  enum kbase_jd_atom_state status;
513 #ifdef CONFIG_GPU_TRACEPOINTS
514  int work_id;
515 #endif
516  /* Assigned after atom is completed. Used to check whether PRLAM-10676 workaround should be applied */
517  int slot_nr;
518 
519  u32 atom_flags;
520 
521  /* Number of times this atom has been retried. Used by replay soft job.
522  */
523  int retry_count;
524 
525  enum kbase_atom_gpu_rb_state gpu_rb_state;
526 
527  u64 need_cache_flush_cores_retained;
528 
529  atomic_t blocked;
530 
531  /* Pointer to atom that this atom has same-slot dependency on */
532  struct kbase_jd_atom *pre_dep;
533  /* Pointer to atom that has same-slot dependency on this atom */
534  struct kbase_jd_atom *post_dep;
535 
536  /* Pointer to atom that this atom has cross-slot dependency on */
537  struct kbase_jd_atom *x_pre_dep;
538  /* Pointer to atom that has cross-slot dependency on this atom */
539  struct kbase_jd_atom *x_post_dep;
540 
541  /* The GPU's flush count recorded at the time of submission, used for
542  * the cache flush optimisation */
543  u32 flush_id;
544 
545  struct kbase_jd_atom_backend backend;
546 #ifdef CONFIG_HISI_DEBUG_FS
547  struct base_job_fault_event fault_event;
548 #endif
549 
550  /* List head used for three different purposes:
551  * 1. Overflow list for JS ring buffers. If an atom is ready to run,
552  * but there is no room in the JS ring buffer, then the atom is put
553  * on the ring buffer's overflow list using this list node.
554  * 2. List of waiting soft jobs.
555  */
556  struct list_head queue;
557 
558  /* Used to keep track of all JIT free/alloc jobs in submission order
559  */
560  struct list_head jit_node;
561  bool jit_blocked;
562 
563  /* If non-zero, this indicates that the atom will fail with the set
564  * event_code when the atom is processed. */
565  enum base_jd_event_code will_fail_event_code;
566 
567  /* Atoms will only ever be transitioning into, or out of
568  * protected mode so we do not need two separate fields.
569  */
570  union {
571  enum kbase_atom_enter_protected_state enter;
572  enum kbase_atom_exit_protected_state exit;
573  } protected_state;
574 
575  struct rb_node runnable_tree_node;
576 
577  /* 'Age' of atom relative to other atoms in the context. */
578  u32 age;
579 };
580 
581 static inline bool kbase_jd_katom_is_protected(const struct kbase_jd_atom *katom)
582 {
583  return (bool)(katom->atom_flags & KBASE_KATOM_FLAG_PROTECTED);
584 }
585 
586 /*
587  * Theory of operations:
588  *
589  * Atom objects are statically allocated within the context structure.
590  *
591  * Each atom is the head of two lists, one for the "left" set of dependencies, one for the "right" set.
592  */
593 
594 #define KBASE_JD_DEP_QUEUE_SIZE 256
595 
597  struct mutex lock;
598  struct kbasep_js_kctx_info sched_info;
599  struct kbase_jd_atom atoms[BASE_JD_ATOM_COUNT];
600 
603  u32 job_nr;
604 
625  wait_queue_head_t zero_jobs_wait;
626 
628  struct workqueue_struct *job_done_wq;
629 
630  spinlock_t tb_lock;
631  u32 *tb;
632  size_t tb_wrap_offset;
633 
634 #ifdef CONFIG_KDS
635  struct kds_callback kds_cb;
636 #endif /* CONFIG_KDS */
637 #ifdef CONFIG_GPU_TRACEPOINTS
638  atomic_t work_id;
639 #endif
640 };
641 
643  u32 features;
644 };
645 
647 enum {
648  KBASE_AS_POKE_STATE_IN_FLIGHT = 1<<0,
649  KBASE_AS_POKE_STATE_KILLING_POKE = 1<<1
650 };
651 
654 
656  u64 transtab;
657  u64 memattr;
658  u64 transcfg;
659 };
660 
668 struct kbase_as {
669  int number;
670 
671  struct workqueue_struct *pf_wq;
672  struct work_struct work_pagefault;
673  struct work_struct work_busfault;
674  enum kbase_mmu_fault_type fault_type;
675  bool protected_mode;
676  u32 fault_status;
677  u64 fault_addr;
678  u64 fault_extra_addr;
679 
680  struct kbase_mmu_setup current_setup;
681 
682  /* BASE_HW_ISSUE_8316 */
683  struct workqueue_struct *poke_wq;
684  struct work_struct poke_work;
688  kbase_as_poke_state poke_state;
689  struct hrtimer poke_timer;
690 };
691 
692 static inline int kbase_as_has_bus_fault(struct kbase_as *as)
693 {
694  return as->fault_type == KBASE_MMU_FAULT_TYPE_BUS;
695 }
696 
697 static inline int kbase_as_has_page_fault(struct kbase_as *as)
698 {
699  return as->fault_type == KBASE_MMU_FAULT_TYPE_PAGE;
700 }
701 
703  atomic_t used_pages; /* Tracks usage of OS shared memory. Updated
704  when OS memory is allocated/freed. */
705 
706 };
707 
708 #define KBASE_TRACE_CODE(X) KBASE_TRACE_CODE_ ## X
709 
710 enum kbase_trace_code {
711  /* IMPORTANT: USE OF SPECIAL #INCLUDE OF NON-STANDARD HEADER FILE
712  * THIS MUST BE USED AT THE START OF THE ENUM */
713 #define KBASE_TRACE_CODE_MAKE_CODE(X) KBASE_TRACE_CODE(X)
714 #include "mali_kbase_trace_defs.h"
715 #undef KBASE_TRACE_CODE_MAKE_CODE
716  /* Comma on its own, to extend the list */
717  ,
718  /* Must be the last in the enum */
719  KBASE_TRACE_CODE_COUNT
720 };
721 
722 #define KBASE_TRACE_FLAG_REFCOUNT (((u8)1) << 0)
723 #define KBASE_TRACE_FLAG_JOBSLOT (((u8)1) << 1)
724 
725 struct kbase_trace {
726  struct timespec timestamp;
727  u32 thread_id;
728  u32 cpu;
729  void *ctx;
730  bool katom;
731  int atom_number;
732  u64 atom_udata[2];
733  u64 gpu_addr;
734  unsigned long info_val;
735  u8 code;
736  u8 jobslot;
737  u8 refcount;
738  u8 flags;
739 };
740 
748  /* helper for tests */
749  KBASEP_TIMELINE_PM_EVENT_FIRST,
750 
752  KBASE_TIMELINE_PM_EVENT_RESERVED_0 = KBASEP_TIMELINE_PM_EVENT_FIRST,
753 
759 
765 
771 
775 
779 
783 
791 
792  KBASEP_TIMELINE_PM_EVENT_LAST = KBASE_TIMELINE_PM_EVENT_CHANGE_GPU_STATE,
793 };
794 
795 #ifdef CONFIG_MALI_TRACE_TIMELINE
796 struct kbase_trace_kctx_timeline {
797  atomic_t jd_atoms_in_flight;
798  u32 owner_tgid;
799 };
800 
801 struct kbase_trace_kbdev_timeline {
802  /* Note: strictly speaking, not needed, because it's in sync with
803  * kbase_device::jm_slots[]::submitted_nr
804  *
805  * But it's kept as an example of how to add global timeline tracking
806  * information
807  *
808  * The caller must hold hwaccess_lock when accessing this */
809  u8 slot_atoms_submitted[BASE_JM_MAX_NR_SLOTS];
810 
811  /* Last UID for each PM event */
812  atomic_t pm_event_uid[KBASEP_TIMELINE_PM_EVENT_LAST+1];
813  /* Counter for generating PM event UIDs */
814  atomic_t pm_event_uid_counter;
815  /*
816  * L2 transition state - true indicates that the transition is ongoing
817  * Expected to be protected by hwaccess_lock */
818  bool l2_transitioning;
819 };
820 #endif /* CONFIG_MALI_TRACE_TIMELINE */
821 
822 
824  struct list_head link;
825  struct kbase_context *kctx;
826 };
827 
842  struct mutex lock;
843 
848  /* Wait queue set when active_count == 0 */
849  wait_queue_head_t zero_active_count_wait;
850 
855  u64 debug_core_mask[BASE_JM_MAX_NR_SLOTS];
856  u64 debug_core_mask_all;
857 
865  int (*callback_power_runtime_init)(struct kbase_device *kbdev);
866 
872  void (*callback_power_runtime_term)(struct kbase_device *kbdev);
873 
874  /* Time in milliseconds between each dvfs sample */
875  u32 dvfs_period;
876 
877  /* Period of GPU poweroff timer */
878  ktime_t gpu_poweroff_time;
879 
880  /* Number of ticks of GPU poweroff timer before shader is powered off */
881  int poweroff_shader_ticks;
882 
883  /* Number of ticks of GPU poweroff timer before GPU is powered off */
884  int poweroff_gpu_ticks;
885 
886  struct kbase_pm_backend_data backend;
887 };
888 
903  int (*protected_mode_enter)(struct kbase_device *kbdev);
904 
911  int (*protected_mode_reset)(struct kbase_device *kbdev);
912 
919  bool (*protected_mode_supported)(struct kbase_device *kbdev);
920 };
921 
922 
938  struct kbase_device *kbdev;
939  size_t cur_size;
940  size_t max_size;
941  spinlock_t pool_lock;
942  struct list_head page_list;
943  struct shrinker reclaim;
944 
945  struct kbase_mem_pool *next_pool;
946 };
947 
948 
949 #define DEVNAME_SIZE 16
950 
951 struct kbase_device {
952  s8 slot_submit_count_irq[BASE_JM_MAX_NR_SLOTS];
953 
954  u32 hw_quirks_sc;
955  u32 hw_quirks_tiler;
956  u32 hw_quirks_mmu;
957  u32 hw_quirks_jm;
958 
959  struct list_head entry;
960  struct device *dev;
961  struct miscdevice mdev;
962  u64 reg_start;
963  size_t reg_size;
964  void __iomem *reg;
965 
966  void __iomem *crgreg;
967  void __iomem *pmctrlreg;
968  void __iomem *pctrlreg;
969 
970  struct {
971  int irq;
972  int flags;
973  } irqs[3];
974 
975  struct clk *clock;
976 #ifdef CONFIG_REGULATOR
977  struct regulator *regulator;
978 #endif
979  char devname[DEVNAME_SIZE];
980 
981 #ifdef CONFIG_MALI_NO_MALI
982  void *model;
983  struct kmem_cache *irq_slab;
984  struct workqueue_struct *irq_workq;
985  atomic_t serving_job_irq;
986  atomic_t serving_gpu_irq;
987  atomic_t serving_mmu_irq;
988  spinlock_t reg_op_lock;
989 #endif /* CONFIG_MALI_NO_MALI */
990 
991  struct kbase_pm_device_data pm;
992  struct kbasep_js_device_data js_data;
993  struct kbase_mem_pool mem_pool;
994  struct kbasep_mem_device memdev;
995  struct kbase_mmu_mode const *mmu_mode;
996 
997  struct kbase_as as[BASE_MAX_NR_AS];
998 
999  spinlock_t mmu_mask_change;
1000 
1001  struct kbase_gpu_props gpu_props;
1002 
1004  unsigned long hw_issues_mask[(BASE_HW_ISSUE_END + BITS_PER_LONG - 1) / BITS_PER_LONG];
1006  unsigned long hw_features_mask[(BASE_HW_FEATURE_END + BITS_PER_LONG - 1) / BITS_PER_LONG];
1007 
1009  unsigned long hi_features_mask[2];
1010 
1011  /* Bitmaps of cores that are currently in use (running jobs).
1012  * These should be kept up to date by the job scheduler.
1013  *
1014  * pm.power_change_lock should be held when accessing these members.
1015  *
1016  * kbase_pm_check_transitions_nolock() should be called when bits are
1017  * cleared to update the power management system and allow transitions to
1018  * occur. */
1019  u64 shader_inuse_bitmap;
1020 
1021  /* Refcount for cores in use */
1022  u32 shader_inuse_cnt[64];
1023 
1024  /* Bitmaps of cores the JS needs for jobs ready to run */
1025  u64 shader_needed_bitmap;
1026 
1027  /* Refcount for cores needed */
1028  u32 shader_needed_cnt[64];
1029 
1030  u32 tiler_inuse_cnt;
1031 
1032  u32 tiler_needed_cnt;
1033 
1034  /* struct for keeping track of the disjoint information
1035  *
1036  * The state is > 0 if the GPU is in a disjoint state. Otherwise 0
1037  * The count is the number of disjoint events that have occurred on the GPU
1038  */
1039  struct {
1040  atomic_t count;
1041  atomic_t state;
1042  } disjoint_event;
1043 
1044  /* Refcount for tracking users of the l2 cache, e.g. when using hardware counter instrumentation. */
1045  u32 l2_users_count;
1046 
1047  /* Bitmaps of cores that are currently available (powered up and the power policy is happy for jobs to be
1048  * submitted to these cores. These are updated by the power management code. The job scheduler should avoid
1049  * submitting new jobs to any cores that are not marked as available.
1050  *
1051  * pm.power_change_lock should be held when accessing these members.
1052  */
1053  u64 shader_available_bitmap;
1054  u64 tiler_available_bitmap;
1055  u64 l2_available_bitmap;
1056  u64 stack_available_bitmap;
1057 
1058  u64 shader_ready_bitmap;
1059  u64 shader_transitioning_bitmap;
1060 
1064  /* Structure used for instrumentation and HW counters dumping */
1065  struct kbase_hwcnt {
1066  /* The lock should be used when accessing any of the following members */
1067  spinlock_t lock;
1068 
1069  struct kbase_context *kctx;
1070  u64 addr;
1071 
1072  struct kbase_instr_backend backend;
1073  } hwcnt;
1074 
1075  struct kbase_vinstr_context *vinstr_ctx;
1076 
1077  /*value to be written to the irq_throttle register each time an irq is served */
1078  atomic_t irq_throttle_cycles;
1079 
1080 #if KBASE_TRACE_ENABLE
1081  spinlock_t trace_lock;
1082  u16 trace_first_out;
1083  u16 trace_next_in;
1084  struct kbase_trace *trace_rbuf;
1085 #endif
1086 
1087  u32 reset_timeout_ms;
1088 
1089  struct mutex cacheclean_lock;
1090 
1091  /* Platform specific private data to be accessed by mali_kbase_config_xxx.c only */
1092  void *platform_context;
1093 
1094  /* List of kbase_contexts created */
1095  struct list_head kctx_list;
1096  struct mutex kctx_list_lock;
1097 
1098 #ifdef CONFIG_PM_DEVFREQ
1099  struct devfreq_dev_profile devfreq_profile;
1100  struct devfreq *devfreq;
1101  unsigned long current_freq;
1102  unsigned long current_voltage;
1103 #ifdef CONFIG_DEVFREQ_THERMAL
1104 #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 4, 0)
1105  struct devfreq_cooling_device *devfreq_cooling;
1106 #else
1107  struct thermal_cooling_device *devfreq_cooling;
1108 #endif
1109  struct list_head ipa_power_models;
1110  struct kbase_ipa_model *ipa_current_model;
1111  struct kbase_ipa_model *ipa_configured_model;
1112  struct kbase_ipa_model *ipa_fallback_model;
1113 #endif
1114 #endif
1115 
1116 
1117 #ifdef CONFIG_MALI_TRACE_TIMELINE
1118  struct kbase_trace_kbdev_timeline timeline;
1119 #endif
1120 
1121  /*
1122  * Control for enabling job dump on failure, set when control debugfs
1123  * is opened.
1124  */
1125  bool job_fault_debug;
1126 
1127  /* procfs entry for gpu_memory */
1128  struct proc_dir_entry *proc_gpu_memory_dentry;
1129 
1130 #ifdef CONFIG_HISI_DEBUG_FS
1131  /* directory for debugfs entries */
1132  struct dentry *mali_debugfs_directory;
1133  /* Root directory for per context entry */
1134  struct dentry *debugfs_ctx_directory;
1135 
1136 #ifdef CONFIG_MALI_DEBUG
1137  /* bit for each as, set if there is new data to report */
1138  u64 debugfs_as_read_bitmap;
1139 #endif /* CONFIG_MALI_DEBUG */
1140 
1141  /* failed job dump, used for separate debug process */
1142  wait_queue_head_t job_fault_wq;
1143  wait_queue_head_t job_fault_resume_wq;
1144  struct workqueue_struct *job_fault_resume_workq;
1145  struct list_head job_fault_event_list;
1146  spinlock_t job_fault_event_lock;
1147  struct kbase_context *kctx_fault;
1148 
1149 #if !MALI_CUSTOMER_RELEASE
1150  /* Per-device data for register dumping interface */
1151  struct {
1152  u16 reg_offset; /* Offset of a GPU_CONTROL register to be
1153  dumped upon request */
1154  } regs_dump_debugfs_data;
1155 #endif /* !MALI_CUSTOMER_RELEASE */
1156 #endif /* CONFIG_HISI_DEBUG_FS */
1157 
1158  /* fbdump profiling controls set by gator */
1159  u32 kbase_profiling_controls[FBDUMP_CONTROL_MAX];
1160 
1161  struct clk *clk;
1162 
1163 #if MALI_CUSTOMER_RELEASE == 0
1164  /* Number of jobs that are run before a job is forced to fail and
1165  * replay. May be KBASEP_FORCE_REPLAY_DISABLED, to disable forced
1166  * failures. */
1167  int force_replay_limit;
1168  /* Count of jobs between forced failures. Incremented on each job. A
1169  * job is forced to fail once this is greater than or equal to
1170  * force_replay_limit. */
1171  int force_replay_count;
1172  /* Core requirement for jobs to be failed and replayed. May be zero. */
1173  base_jd_core_req force_replay_core_req;
1174  /* true if force_replay_limit should be randomized. The random
1175  * value will be in the range of 1 - KBASEP_FORCE_REPLAY_RANDOM_LIMIT.
1176  */
1177  bool force_replay_random;
1178 #endif
1179 
1180  /* Total number of created contexts */
1181  atomic_t ctx_num;
1182 
1183 #ifdef CONFIG_HISI_DEBUG_FS
1184  /* Holds the most recent register accesses */
1185  struct kbase_io_history io_history;
1186 #endif /* CONFIG_HISI_DEBUG_FS */
1187 
1188  /* set to 0, means not restrict outstanding */
1189  u32 gpu_outstanding;
1190 
1191  struct kbase_hwaccess_data hwaccess;
1192 
1193  /* Count of page/bus faults waiting for workqueues to process */
1194  atomic_t faults_pending;
1195 
1196  /* true if GPU is powered off or power off operation is in progress */
1197  bool poweroff_pending;
1198 
1199 
1200  /* defaults for new context created for this device */
1201 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 4, 0))
1202  bool infinite_cache_active_default;
1203 #else
1204  u32 infinite_cache_active_default;
1205 #endif
1206  size_t mem_pool_max_size_default;
1207 
1208  /* current gpu coherency mode */
1209  u32 current_gpu_coherency_mode;
1210  /* system coherency mode */
1211  u32 system_coherency;
1212  /* Flag to track when cci snoops have been enabled on the interface */
1213  bool cci_snoop_enabled;
1214 
1215  /* SMC function IDs to call into Trusted firmware to enable/disable
1216  * cache snooping. Value of 0 indicates that they are not used
1217  */
1218  u32 snoop_enable_smc;
1219  u32 snoop_disable_smc;
1220 
1221  /* Protected operations */
1222  struct kbase_protected_ops *protected_ops;
1223 
1224  /*
1225  * true when GPU is put into protected mode
1226  */
1227  bool protected_mode;
1228 
1229  /*
1230  * true when GPU is transitioning into or out of protected mode
1231  */
1232  bool protected_mode_transition;
1233 
1234  /*
1235  * true if protected mode is supported
1236  */
1237  bool protected_mode_support;
1238 
1239 
1240 #ifdef CONFIG_MALI_DEBUG
1241  wait_queue_head_t driver_inactive_wait;
1242  bool driver_inactive;
1243 #endif /* CONFIG_MALI_DEBUG */
1244 
1245 #ifdef CONFIG_MALI_FPGA_BUS_LOGGER
1246  /*
1247  * Bus logger integration.
1248  */
1249  struct bus_logger_client *buslogger;
1250 #endif
1251  /* Boolean indicating if an IRQ flush during reset is in progress. */
1252  bool irq_reset_flush;
1253 
1254  /* list of inited sub systems. Used during terminate/error recovery */
1255  u32 inited_subsys;
1256 
1257  spinlock_t hwaccess_lock;
1258 
1259  /* Protects access to MMU operations */
1260  struct mutex mmu_hw_mutex;
1261 
1262  /* Current serialization mode. See KBASE_SERIALIZE_* for details */
1263  u8 serialize_jobs;
1264 
1265  /* gpu virtual id */
1266  u32 gpu_vid;
1267 };
1268 
1279 struct jsctx_queue {
1280  struct rb_root runnable_tree;
1281  struct list_head x_dep_head;
1282 };
1283 
1284 
1285 #define KBASE_API_VERSION(major, minor) ((((major) & 0xFFF) << 20) | \
1286  (((minor) & 0xFFF) << 8) | \
1287  ((0 & 0xFF) << 0))
1288 
1327  KCTX_COMPAT = 1U << 0,
1328  KCTX_RUNNABLE_REF = 1U << 1,
1329  KCTX_ACTIVE = 1U << 2,
1330  KCTX_PULLED = 1U << 3,
1331  KCTX_MEM_PROFILE_INITIALIZED = 1U << 4,
1332  KCTX_INFINITE_CACHE = 1U << 5,
1333  KCTX_SUBMIT_DISABLED = 1U << 6,
1334  KCTX_PRIVILEGED = 1U << 7,
1335  KCTX_SCHEDULED = 1U << 8,
1336  KCTX_DYING = 1U << 9,
1337  KCTX_NO_IMPLICIT_SYNC = 1U << 10,
1338 };
1339 
1341  struct file *filp;
1342  struct kbase_device *kbdev;
1343  int id; /* System wide unique id */
1344  unsigned long api_version;
1345  phys_addr_t pgd;
1346  struct list_head event_list;
1347  struct list_head event_coalesce_list;
1348  struct mutex event_mutex;
1349  atomic_t event_closed;
1350  struct workqueue_struct *event_workq;
1351  atomic_t event_count;
1352  int event_coalesce_count;
1353 
1354  atomic_t flags;
1355 
1356  atomic_t setup_complete;
1357  atomic_t setup_in_progress;
1358 
1359  u64 *mmu_teardown_pages;
1360 
1361  struct page *aliasing_sink_page;
1362 
1363  struct mutex mmu_lock;
1364  struct mutex reg_lock; /* To be converted to a rwlock? */
1365  struct rb_root reg_rbtree_same; /* RB tree of GPU (live) regions,
1366  * SAME_VA zone */
1367  struct rb_root reg_rbtree_exec; /* RB tree of GPU (live) regions,
1368  * EXEC zone */
1369  struct rb_root reg_rbtree_custom; /* RB tree of GPU (live) regions,
1370  * CUSTOM_VA zone */
1371 
1372  unsigned long cookies;
1373  struct kbase_va_region *pending_regions[BITS_PER_LONG];
1374 
1375  wait_queue_head_t event_queue;
1376  pid_t tgid;
1377  pid_t pid;
1378 
1379  struct kbase_jd_context jctx;
1380  atomic_t used_pages;
1381  atomic_t nonmapped_pages;
1382 
1383  struct kbase_mem_pool mem_pool;
1384 
1385  struct shrinker reclaim;
1386  struct list_head evict_list;
1387 
1388  struct list_head waiting_soft_jobs;
1389  spinlock_t waiting_soft_jobs_lock;
1390 #ifdef CONFIG_KDS
1391  struct list_head waiting_kds_resource;
1392 #endif
1393 #ifdef CONFIG_MALI_DMA_FENCE
1394  struct {
1395  struct list_head waiting_resource;
1396  struct workqueue_struct *wq;
1397  } dma_fence;
1398 #endif /* CONFIG_MALI_DMA_FENCE */
1399 
1409  int as_nr;
1410 
1411  /* NOTE:
1412  *
1413  * Flags are in jctx.sched_info.ctx.flags
1414  * Mutable flags *must* be accessed under jctx.sched_info.ctx.jsctx_mutex
1415  *
1416  * All other flags must be added there */
1417  spinlock_t mm_update_lock;
1418  struct mm_struct *process_mm;
1419  /* End of the SAME_VA zone */
1420  u64 same_va_end;
1421 
1422 #ifdef CONFIG_MALI_TRACE_TIMELINE
1423  struct kbase_trace_kctx_timeline timeline;
1424 #endif
1425 #ifdef CONFIG_HISI_DEBUG_FS
1426  /* Content of mem_profile file */
1427  char *mem_profile_data;
1428  /* Size of @c mem_profile_data */
1429  size_t mem_profile_size;
1430  /* Mutex guarding memory profile state */
1431  struct mutex mem_profile_lock;
1432  /* Memory profile directory under debugfs */
1433  struct dentry *kctx_dentry;
1434 
1435  /* for job fault debug */
1436  unsigned int *reg_dump;
1437  atomic_t job_fault_count;
1438  /* This list will keep the following atoms during the dump
1439  * in the same context
1440  */
1441  struct list_head job_fault_resume_event_list;
1442 
1443 #endif /* CONFIG_HISI_DEBUG_FS */
1444 
1445  struct jsctx_queue jsctx_queue
1446  [KBASE_JS_ATOM_SCHED_PRIO_COUNT][BASE_JM_MAX_NR_SLOTS];
1447 
1448  /* Number of atoms currently pulled from this context */
1449  atomic_t atoms_pulled;
1450  /* Number of atoms currently pulled from this context, per slot */
1451  atomic_t atoms_pulled_slot[BASE_JM_MAX_NR_SLOTS];
1452  /* Number of atoms currently pulled from this context, per slot and
1453  * priority. Hold hwaccess_lock when accessing */
1454  int atoms_pulled_slot_pri[BASE_JM_MAX_NR_SLOTS][
1455  KBASE_JS_ATOM_SCHED_PRIO_COUNT];
1456 
1457  /* true if slot is blocked on the given priority. This will be set on a
1458  * soft-stop */
1459  bool blocked_js[BASE_JM_MAX_NR_SLOTS][KBASE_JS_ATOM_SCHED_PRIO_COUNT];
1460 
1461  /* Bitmask of slots that can be pulled from */
1462  u32 slots_pullable;
1463 
1464  /* Backend specific data */
1465  struct kbase_context_backend backend;
1466 
1467  /* Work structure used for deferred ASID assignment */
1468  struct work_struct work;
1469 
1470  /* Only one userspace vinstr client per kbase context */
1471  struct kbase_vinstr_client *vinstr_cli;
1472  struct mutex vinstr_cli_lock;
1473 
1474  /* List of completed jobs waiting for events to be posted */
1475  struct list_head completed_jobs;
1476  /* Number of work items currently pending on job_done_wq */
1477  atomic_t work_count;
1478 
1479  /* Waiting soft-jobs will fail when this timer expires */
1480  struct timer_list soft_job_timeout;
1481 
1482  /* JIT allocation management */
1483  struct kbase_va_region *jit_alloc[256];
1484  struct list_head jit_active_head;
1485  struct list_head jit_pool_head;
1486  struct list_head jit_destroy_head;
1487  struct mutex jit_evict_lock;
1488  struct work_struct jit_work;
1489 
1490  /* A list of the JIT soft-jobs in submission order
1491  * (protected by kbase_jd_context.lock)
1492  */
1493  struct list_head jit_atoms_head;
1494  /* A list of pending JIT alloc soft-jobs (using the 'queue' list_head)
1495  * (protected by kbase_jd_context.lock)
1496  */
1497  struct list_head jit_pending_alloc;
1498 
1499  /* External sticky resource management */
1500  struct list_head ext_res_meta_head;
1501 
1502  /* Used to record that a drain was requested from atomic context */
1503  atomic_t drain_pending;
1504 
1505  /* Current age count, used to determine age for newly submitted atoms */
1506  u32 age_count;
1507 
1508 #if BASE_DEBUG_FENCE_TIMEOUT
1509  struct hrtimer fence_wait_timer;
1510  int timer_started;
1511 #endif
1512 };
1513 
1535  struct list_head ext_res_node;
1536  struct kbase_mem_phy_alloc *alloc;
1537  u64 gpu_addr;
1538 };
1539 
1540 enum kbase_reg_access_type {
1541  REG_READ,
1542  REG_WRITE
1543 };
1544 
1545 enum kbase_share_attr_bits {
1546  /* (1ULL << 8) bit is reserved */
1547  SHARE_BOTH_BITS = (2ULL << 8), /* inner and outer shareable coherency */
1548  SHARE_INNER_BITS = (3ULL << 8) /* inner shareable coherency */
1549 };
1550 
1557 static inline bool kbase_device_is_cpu_coherent(struct kbase_device *kbdev)
1558 {
1559  if ((kbdev->system_coherency == COHERENCY_ACE_LITE) ||
1560  (kbdev->system_coherency == COHERENCY_ACE))
1561  return true;
1562 
1563  return false;
1564 }
1565 
1566 /* Conversion helpers for setting up high resolution timers */
1567 #define HR_TIMER_DELAY_MSEC(x) (ns_to_ktime(((u64)(x))*1000000U))
1568 #define HR_TIMER_DELAY_NSEC(x) (ns_to_ktime(x))
1569 
1570 /* Maximum number of loops polling the GPU for a cache flush before we assume it must have completed */
1571 #define KBASE_CLEAN_CACHE_MAX_LOOPS 100000
1572 /* Maximum number of loops polling the GPU for an AS command to complete before we assume the GPU has hung */
1573 #define KBASE_AS_INACTIVE_MAX_LOOPS 100000
1574 
1575 /* Maximum number of times a job can be replayed */
1576 #define BASEP_JD_REPLAY_LIMIT 15
1577 
1578 /* JobDescriptorHeader - taken from the architecture specifications, the layout
1579  * is currently identical for all GPU archs. */
1581  u32 exception_status;
1582  u32 first_incomplete_task;
1583  u64 fault_pointer;
1584  u8 job_descriptor_size : 1;
1585  u8 job_type : 7;
1586  u8 job_barrier : 1;
1587  u8 _reserved_01 : 1;
1588  u8 _reserved_1 : 1;
1589  u8 _reserved_02 : 1;
1590  u8 _reserved_03 : 1;
1591  u8 _reserved_2 : 1;
1592  u8 _reserved_04 : 1;
1593  u8 _reserved_05 : 1;
1594  u16 job_index;
1595  u16 job_dependency_index_1;
1596  u16 job_dependency_index_2;
1597  union {
1598  u64 _64;
1599  u32 _32;
1600  } next_job;
1601 };
1602 
1603 #endif /* _KBASE_DEFS_H_ */
Per-job data.
Definition: mali_base_kernel.h:373
int as_nr
Definition: mali_kbase_defs.h:1409
Definition: mali_kbase_defs.h:782
KBase Context Job Scheduling information structure.
Definition: mali_kbase_js_defs.h:321
int retry_submit_on_slot
Definition: mali_kbase_defs.h:503
Definition: mali_kbase_defs.h:409
Definition: mali_kbase_vinstr.c:102
#define BASE_JD_DEP_TYPE_INVALID
Definition: mali_base_kernel.h:438
s8 nr_hw_address_spaces
Definition: mali_kbase_defs.h:1061
Definition: mali_kbase_vinstr.c:152
Definition: mali_kbase_defs.h:1534
Definition: mali_kbase_defs.h:234
Definition: mali_kbase_defs.h:655
Definition: mali_kbase_mmu_mode.h:31
kbase_mmu_fault_type
MMU fault type descriptor.
Definition: mali_kbase_mmu_hw.h:53
struct workqueue_struct * job_done_wq
Definition: mali_kbase_defs.h:628
Definition: mali_kbase_defs.h:1340
Definition: mali_kbase_defs.h:790
kbase_context_flags
Definition: mali_kbase_defs.h:1326
Definition: mali_kbase_defs.h:596
int active_count
Definition: mali_kbase_defs.h:845
Definition: mali_kbase_defs.h:725
Definition: mali_kbase_defs.h:702
base_jd_event_code
Job chain event codes.
Definition: mali_base_kernel.h:1057
wait_queue_head_t zero_jobs_wait
Definition: mali_kbase_defs.h:625
int poke_refcount
Definition: mali_kbase_defs.h:686
Definition: mali_kbase_defs.h:758
u32 base_jd_core_req
Job chain hardware requirements.
Definition: mali_base_kernel.h:452
Definition: mali_kbase_defs.h:834
Definition: mali_kbase_hwaccess_defs.h:30
Definition: mali_kbase_defs.h:937
Definition: mali_kbase_defs.h:668
Definition: mali_kbase_defs.h:823
Definition: mali_kbase_mem.h:108
kbase_as_poke_state poke_state
Definition: mali_kbase_defs.h:688
kbase_jd_atom_state
Definition: mali_base_kernel.h:800
Definition: mali_kbase_defs.h:951
kbase_timeline_pm_event
Definition: mali_kbase_defs.h:747
Definition: mali_kbase_gpuprops_types.h:73
Definition: mali_kbase_defs.h:774
base_jd_core_req core_req
Definition: mali_kbase_defs.h:499
Definition: mali_kbase_defs.h:752
s8 nr_user_address_spaces
Definition: mali_kbase_defs.h:1062
bool suspending
Definition: mali_kbase_defs.h:847
Definition: mali_kbase_defs.h:770
Definition: mali_kbase_defs.h:259
Definition: mali_kbase_defs.h:1065
u32 kbase_as_poke_state
Definition: mali_kbase_defs.h:653
#define BASE_JM_MAX_NR_SLOTS
Definition: mali_kbase_defs.h:132
kbase_atom_coreref_state
States to model state machine processed by kbasep_js_job_check_ref_cores(), which handles retaining c...
Definition: mali_base_kernel.h:745
Definition: mali_kbase_defs.h:896
Definition: mali_kbase_defs.h:1279
Definition: mali_kbase_defs.h:778
Definition: mali_kbase_mem.h:206
u32 job_nr
Definition: mali_kbase_defs.h:603
Definition: mali_kbase_defs.h:764
Definition: mali_kbase_defs.h:1580
Definition: mali_kbase_defs.h:245
Definition: mali_kbase_defs.h:642
KBase Device Data Job Scheduler sub-structure.
Definition: mali_kbase_js_defs.h:188
Definition: mali_kbase_defs.h:404