diff mbox

[06/10] drm/etnaviv: store readback data in struct etnaviv_event

Message ID 20161209112131.3924-7-christian.gmeiner@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Christian Gmeiner Dec. 9, 2016, 11:21 a.m. UTC
In the interrupt handler struct etnaviv_event is the only
information source to process readbacks.

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
---
 drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 3 +++
 drivers/gpu/drm/etnaviv/etnaviv_gpu.h | 2 ++
 2 files changed, 5 insertions(+)
diff mbox

Patch

diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
index 2668723..1fb5e37 100644
--- a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
+++ b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
@@ -1321,7 +1321,10 @@  int etnaviv_gpu_submit(struct etnaviv_gpu *gpu,
 
 	mutex_lock(&gpu->lock);
 
+	gpu->event[event].nr_readbacks = cmdbuf->nr_readbacks;
+	gpu->event[event].readbacks = cmdbuf->readbacks;
 	gpu->event[event].fence = fence;
+
 	submit->fence = fence->seqno;
 	gpu->active_fence = submit->fence;
 
diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gpu.h b/drivers/gpu/drm/etnaviv/etnaviv_gpu.h
index 61b36af..21a4314 100644
--- a/drivers/gpu/drm/etnaviv/etnaviv_gpu.h
+++ b/drivers/gpu/drm/etnaviv/etnaviv_gpu.h
@@ -95,6 +95,8 @@  struct etnaviv_readback {
 
 struct etnaviv_event {
 	bool used;
+	unsigned int nr_readbacks;
+	struct etnaviv_readback *readbacks;
 	struct fence *fence;
 };