mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-14 16:10:17 +01:00
freedreno/drm: Expose attach_ring()
This will fit in better with the upcoming new cs builders. Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36589>
This commit is contained in:
parent
290f1dd72c
commit
2cc3e1b9ae
2 changed files with 14 additions and 0 deletions
|
|
@ -92,6 +92,8 @@ struct fd_ringbuffer_funcs {
|
|||
* the kernel would need to do a legacy reloc.
|
||||
*/
|
||||
void (*attach_bo)(struct fd_ringbuffer *ring, struct fd_bo *bo);
|
||||
uint32_t (*attach_ring)(struct fd_ringbuffer *ring, struct fd_ringbuffer *target,
|
||||
uint32_t cmd_idx, uint64_t *iova);
|
||||
void (*assert_attached)(struct fd_ringbuffer *ring, struct fd_bo *bo);
|
||||
|
||||
void (*emit_reloc)(struct fd_ringbuffer *ring, const struct fd_reloc *reloc);
|
||||
|
|
@ -210,6 +212,14 @@ fd_ringbuffer_attach_bo(struct fd_ringbuffer *ring, struct fd_bo *bo)
|
|||
ring->funcs->attach_bo(ring, bo);
|
||||
}
|
||||
|
||||
static inline
|
||||
uint32_t fd_ringbuffer_attach_ring(struct fd_ringbuffer *ring,
|
||||
struct fd_ringbuffer *target,
|
||||
uint32_t cmd_idx, uint64_t *iova)
|
||||
{
|
||||
return ring->funcs->attach_ring(ring, target, cmd_idx, iova);
|
||||
}
|
||||
|
||||
static inline void
|
||||
fd_ringbuffer_assert_attached(struct fd_ringbuffer *ring, struct fd_bo *bo)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -747,6 +747,7 @@ fd_ringbuffer_sp_destroy(struct fd_ringbuffer *ring)
|
|||
static const struct fd_ringbuffer_funcs ring_funcs_nonobj_32 = {
|
||||
.grow = fd_ringbuffer_sp_grow,
|
||||
.attach_bo = fd_ringbuffer_sp_attach_bo_nonobj,
|
||||
.attach_ring = fd_ringbuffer_sp_attach_ring_nonobj,
|
||||
.assert_attached = fd_ringbuffer_sp_assert_attached_nonobj,
|
||||
.emit_reloc = fd_ringbuffer_sp_emit_reloc_nonobj_32,
|
||||
.emit_reloc_ring = fd_ringbuffer_sp_emit_reloc_ring_nonobj_32,
|
||||
|
|
@ -758,6 +759,7 @@ static const struct fd_ringbuffer_funcs ring_funcs_nonobj_32 = {
|
|||
static const struct fd_ringbuffer_funcs ring_funcs_obj_32 = {
|
||||
.grow = fd_ringbuffer_sp_grow,
|
||||
.attach_bo = fd_ringbuffer_sp_attach_bo_obj,
|
||||
.attach_ring = fd_ringbuffer_sp_attach_ring_obj,
|
||||
.assert_attached = fd_ringbuffer_sp_assert_attached_obj,
|
||||
.emit_reloc = fd_ringbuffer_sp_emit_reloc_obj_32,
|
||||
.emit_reloc_ring = fd_ringbuffer_sp_emit_reloc_ring_obj_32,
|
||||
|
|
@ -768,6 +770,7 @@ static const struct fd_ringbuffer_funcs ring_funcs_obj_32 = {
|
|||
static const struct fd_ringbuffer_funcs ring_funcs_nonobj_64 = {
|
||||
.grow = fd_ringbuffer_sp_grow,
|
||||
.attach_bo = fd_ringbuffer_sp_attach_bo_nonobj,
|
||||
.attach_ring = fd_ringbuffer_sp_attach_ring_nonobj,
|
||||
.assert_attached = fd_ringbuffer_sp_assert_attached_nonobj,
|
||||
.emit_reloc = fd_ringbuffer_sp_emit_reloc_nonobj_64,
|
||||
.emit_reloc_ring = fd_ringbuffer_sp_emit_reloc_ring_nonobj_64,
|
||||
|
|
@ -779,6 +782,7 @@ static const struct fd_ringbuffer_funcs ring_funcs_nonobj_64 = {
|
|||
static const struct fd_ringbuffer_funcs ring_funcs_obj_64 = {
|
||||
.grow = fd_ringbuffer_sp_grow,
|
||||
.attach_bo = fd_ringbuffer_sp_attach_bo_obj,
|
||||
.attach_ring = fd_ringbuffer_sp_attach_ring_obj,
|
||||
.assert_attached = fd_ringbuffer_sp_assert_attached_obj,
|
||||
.emit_reloc = fd_ringbuffer_sp_emit_reloc_obj_64,
|
||||
.emit_reloc_ring = fd_ringbuffer_sp_emit_reloc_ring_obj_64,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue