* Rob Clark <robclark@freedesktop.org>
*/
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
#include <assert.h>
#include "freedreno_drmif.h"
#include "freedreno_priv.h"
#include "freedreno_ringbuffer.h"
-struct fd_ringbuffer * fd_ringbuffer_new(struct fd_pipe *pipe,
- uint32_t size)
+struct fd_ringbuffer *
+fd_ringbuffer_new(struct fd_pipe *pipe, uint32_t size)
{
struct fd_ringbuffer *ring;
* the bookkeeping works out properly.
*/
void fd_ringbuffer_set_parent(struct fd_ringbuffer *ring,
- struct fd_ringbuffer *parent)
+ struct fd_ringbuffer *parent)
{
ring->parent = parent;
}
if (ring->pipe->id == FD_PIPE_2D)
start = &ring->start[0x140];
ring->cur = ring->last_start = start;
+ if (ring->funcs->reset)
+ ring->funcs->reset(ring);
}
/* maybe get rid of this and use fd_ringmarker_flush() from DDX too? */
}
void fd_ringbuffer_reloc(struct fd_ringbuffer *ring,
- const struct fd_reloc *reloc)
+ const struct fd_reloc *reloc)
{
ring->funcs->emit_reloc(ring, reloc);
}
-void fd_ringbuffer_emit_reloc_ring(struct fd_ringbuffer *ring,
- struct fd_ringmarker *target, struct fd_ringmarker *end)
+void
+fd_ringbuffer_emit_reloc_ring(struct fd_ringbuffer *ring,
+ struct fd_ringmarker *target,
+ struct fd_ringmarker *end)
{
assert(target->ring == end->ring);
ring->funcs->emit_reloc_ring(ring, target, end);
}
uint32_t fd_ringmarker_dwords(struct fd_ringmarker *start,
- struct fd_ringmarker *end)
+ struct fd_ringmarker *end)
{
return end->cur - start->cur;
}