radv: fix DCC fast clear code for intensity formats (correctly)
[mesa.git] / src / freedreno / drm / msm_priv.h
index 44fb777f988af9f7d853e16baa7cd13fd7ab333f..172e9870fe5973e497229ff39e03e3b229ca4635 100644 (file)
 
 #include "freedreno_priv.h"
 
+#include "util/slab.h"
+
 #ifndef __user
 #  define __user
 #endif
 
-#include "msm_drm.h"
+#include "drm-uapi/msm_drm.h"
 
 struct msm_device {
        struct fd_device base;
@@ -51,6 +53,7 @@ struct msm_pipe {
        uint32_t gmem;
        uint32_t chip_id;
        uint32_t queue_id;
+       struct slab_parent_pool ring_pool;
 };
 FD_DEFINE_CAST(fd_pipe, msm_pipe);
 
@@ -63,14 +66,13 @@ struct fd_ringbuffer * msm_ringbuffer_sp_new_object(struct fd_pipe *pipe, uint32
 struct fd_submit * msm_submit_new(struct fd_pipe *pipe);
 struct fd_submit * msm_submit_sp_new(struct fd_pipe *pipe);
 
+void msm_pipe_sp_ringpool_init(struct msm_pipe *msm_pipe);
+void msm_pipe_sp_ringpool_fini(struct msm_pipe *msm_pipe);
+
+
 struct msm_bo {
        struct fd_bo base;
        uint64_t offset;
-       /* to avoid excess hashtable lookups, cache the ring this bo was
-        * last emitted on (since that will probably also be the next ring
-        * it is emitted on)
-        */
-       unsigned current_submit_seqno;
        uint32_t idx;
 };
 FD_DEFINE_CAST(fd_bo, msm_bo);
@@ -138,4 +140,6 @@ grow(void *ptr, uint16_t nr, uint16_t *max, uint16_t sz)
        (x)->nr_ ## name ++; \
 })
 
+#define READ_ONCE(x) (*(volatile __typeof__(x) *)&(x))
+
 #endif /* MSM_PRIV_H_ */