summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'freedreno/msm/msm_priv.h')
-rw-r--r--freedreno/msm/msm_priv.h17
1 files changed, 6 insertions, 11 deletions
diff --git a/freedreno/msm/msm_priv.h b/freedreno/msm/msm_priv.h
index e499b3b8..6d670aab 100644
--- a/freedreno/msm/msm_priv.h
+++ b/freedreno/msm/msm_priv.h
@@ -39,6 +39,8 @@
39 39
40struct msm_device { 40struct msm_device {
41 struct fd_device base; 41 struct fd_device base;
42 struct fd_bo_cache ring_cache;
43 unsigned ring_cnt;
42}; 44};
43 45
44static inline struct msm_device * to_msm_device(struct fd_device *x) 46static inline struct msm_device * to_msm_device(struct fd_device *x)
@@ -71,18 +73,11 @@ struct msm_bo {
71 struct fd_bo base; 73 struct fd_bo base;
72 uint64_t offset; 74 uint64_t offset;
73 uint64_t presumed; 75 uint64_t presumed;
74 /* in the common case, a bo won't be referenced by more than a single 76 /* to avoid excess hashtable lookups, cache the ring this bo was
75 * (parent) ring[*]. So to avoid looping over all the bo's in the 77 * last emitted on (since that will probably also be the next ring
76 * reloc table to find the idx of a bo that might already be in the 78 * it is emitted on)
77 * table, we cache the idx in the bo. But in order to detect the
78 * slow-path where bo is ref'd in multiple rb's, we also must track
79 * the current_ring for which the idx is valid. See bo2idx().
80 *
81 * [*] in case multiple ringbuffers, ie. one toplevel and other rb(s)
82 * used for IB target(s), the toplevel rb is the parent which is
83 * tracking bo's for the submit
84 */ 79 */
85 struct fd_ringbuffer *current_ring; 80 unsigned current_ring_seqno;
86 uint32_t idx; 81 uint32_t idx;
87}; 82};
88 83