#include "util/list.h"
#include "util/log.h"
#include "util/simple_mtx.h"
+#include "util/slab.h"
#include "util/u_atomic.h"
#include "util/u_debug.h"
#include "util/u_math.h"
struct fd_bo *control_mem;
volatile struct fd_pipe_control *control;
+ struct slab_parent_pool ring_pool;
+
const struct fd_pipe_funcs *funcs;
};
struct msm_pipe *msm_pipe = to_msm_pipe(pipe);
close_submitqueue(pipe, msm_pipe->queue_id);
- msm_pipe_sp_ringpool_init(msm_pipe);
+ msm_pipe_sp_ringpool_fini(pipe);
free(msm_pipe);
}
if (open_submitqueue(pipe, prio))
goto fail;
- msm_pipe_sp_ringpool_init(msm_pipe);
+ msm_pipe_sp_ringpool_init(pipe);
return pipe;
fail:
#include "freedreno_priv.h"
-#include "util/slab.h"
#include "util/timespec.h"
#include "pipe/p_defines.h"
uint64_t gmem_base;
uint32_t gmem;
uint32_t queue_id;
- struct slab_parent_pool ring_pool;
/**
* If we *ever* see an in-fence-fd, assume that userspace is
struct fd_submit *msm_submit_sp_new(struct fd_pipe *pipe);
void msm_pipe_sp_flush(struct fd_pipe *pipe, uint32_t fence);
-void msm_pipe_sp_ringpool_init(struct msm_pipe *msm_pipe);
-void msm_pipe_sp_ringpool_fini(struct msm_pipe *msm_pipe);
+void msm_pipe_sp_ringpool_init(struct fd_pipe *pipe);
+void msm_pipe_sp_ringpool_fini(struct fd_pipe *pipe);
struct msm_bo {
struct fd_bo base;
msm_submit->bo_table = _mesa_hash_table_create(NULL, _mesa_hash_pointer,
_mesa_key_pointer_equal);
- slab_create_child(&msm_submit->ring_pool, &to_msm_pipe(pipe)->ring_pool);
+ slab_create_child(&msm_submit->ring_pool, &pipe->ring_pool);
submit = &msm_submit->base;
submit->funcs = &submit_funcs;
}
void
-msm_pipe_sp_ringpool_init(struct msm_pipe *msm_pipe)
+msm_pipe_sp_ringpool_init(struct fd_pipe *pipe)
{
// TODO tune size:
- slab_create_parent(&msm_pipe->ring_pool, sizeof(struct msm_ringbuffer_sp),
- 16);
+ slab_create_parent(&pipe->ring_pool, sizeof(struct msm_ringbuffer_sp), 16);
}
void
-msm_pipe_sp_ringpool_fini(struct msm_pipe *msm_pipe)
+msm_pipe_sp_ringpool_fini(struct fd_pipe *pipe)
{
- if (msm_pipe->ring_pool.num_elements)
- slab_destroy_parent(&msm_pipe->ring_pool);
+ if (pipe->ring_pool.num_elements)
+ slab_destroy_parent(&pipe->ring_pool);
}
static void