[PATCH libdrm v3 2/4] etnaviv: simplify etna_pipe_wait(..)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We can make use of etna_pipe_wait_ns(..).

Signed-off-by: Christian Gmeiner <christian.gmeiner@xxxxxxxxx>
---
 etnaviv/etnaviv_pipe.c | 21 +--------------------
 1 file changed, 1 insertion(+), 20 deletions(-)

diff --git a/etnaviv/etnaviv_pipe.c b/etnaviv/etnaviv_pipe.c
index f2e417f..6951362 100644
--- a/etnaviv/etnaviv_pipe.c
+++ b/etnaviv/etnaviv_pipe.c
@@ -32,26 +32,7 @@
 
 int etna_pipe_wait(struct etna_pipe *pipe, uint32_t timestamp, uint32_t ms)
 {
-	struct etna_device *dev = pipe->gpu->dev;
-	int ret;
-
-	struct drm_etnaviv_wait_fence req = {
-		.pipe = pipe->gpu->core,
-		.fence = timestamp,
-	};
-
-	if (ms == 0)
-		req.flags |= ETNA_WAIT_NONBLOCK;
-
-	get_abs_timeout(&req.timeout, ms);
-
-	ret = drmCommandWrite(dev->fd, DRM_ETNAVIV_WAIT_FENCE, &req, sizeof(req));
-	if (ret) {
-		ERROR_MSG("wait-fence failed! %d (%s)", ret, strerror(errno));
-		return ret;
-	}
-
-	return 0;
+	return etna_pipe_wait_ns(pipe, timestamp, ms * 1000000);
 }
 
 int etna_pipe_wait_ns(struct etna_pipe *pipe, uint32_t timestamp, uint64_t ns)
-- 
2.7.4

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux