summaryrefslogtreecommitdiff
path: root/lib/libdrm/freedreno/kgsl
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2018-11-01 08:23:22 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2018-11-01 08:23:22 +0000
commit151b82d100e6380d41996fb56cafcab4728d5149 (patch)
tree19af1b08d3b8f2d16fb28d5350bea0f0a7435027 /lib/libdrm/freedreno/kgsl
parente33f6733f6eb02ee1097e1f4ef19735adea243a1 (diff)
Import libdrm 2.4.96
Diffstat (limited to 'lib/libdrm/freedreno/kgsl')
-rw-r--r--lib/libdrm/freedreno/kgsl/kgsl_bo.c2
-rw-r--r--lib/libdrm/freedreno/kgsl/kgsl_ringbuffer.c10
2 files changed, 7 insertions, 5 deletions
diff --git a/lib/libdrm/freedreno/kgsl/kgsl_bo.c b/lib/libdrm/freedreno/kgsl/kgsl_bo.c
index c6d2d4999..7a6af2f08 100644
--- a/lib/libdrm/freedreno/kgsl/kgsl_bo.c
+++ b/lib/libdrm/freedreno/kgsl/kgsl_bo.c
@@ -177,7 +177,7 @@ drm_private struct fd_bo * kgsl_bo_from_handle(struct fd_device *dev,
return bo;
}
-struct fd_bo *
+drm_public struct fd_bo *
fd_bo_from_fbdev(struct fd_pipe *pipe, int fbfd, uint32_t size)
{
struct fd_bo *bo;
diff --git a/lib/libdrm/freedreno/kgsl/kgsl_ringbuffer.c b/lib/libdrm/freedreno/kgsl/kgsl_ringbuffer.c
index e4fdf342b..9abf0adff 100644
--- a/lib/libdrm/freedreno/kgsl/kgsl_ringbuffer.c
+++ b/lib/libdrm/freedreno/kgsl/kgsl_ringbuffer.c
@@ -28,6 +28,7 @@
#include <assert.h>
+#include "xf86atomic.h"
#include "freedreno_ringbuffer.h"
#include "kgsl_priv.h"
@@ -174,13 +175,12 @@ static void kgsl_ringbuffer_emit_reloc(struct fd_ringbuffer *ring,
}
static uint32_t kgsl_ringbuffer_emit_reloc_ring(struct fd_ringbuffer *ring,
- struct fd_ringbuffer *target, uint32_t cmd_idx,
- uint32_t submit_offset, uint32_t size)
+ struct fd_ringbuffer *target, uint32_t cmd_idx)
{
struct kgsl_ringbuffer *target_ring = to_kgsl_ringbuffer(target);
assert(cmd_idx == 0);
- (*ring->cur++) = target_ring->bo->gpuaddr + submit_offset;
- return size;
+ (*ring->cur++) = target_ring->bo->gpuaddr;
+ return offset_bytes(target->cur, target->start);
}
static void kgsl_ringbuffer_destroy(struct fd_ringbuffer *ring)
@@ -216,6 +216,8 @@ drm_private struct fd_ringbuffer * kgsl_ringbuffer_new(struct fd_pipe *pipe,
}
ring = &kgsl_ring->base;
+ atomic_set(&ring->refcnt, 1);
+
ring->funcs = &funcs;
ring->size = size;