Re: [PATCH i-g-t v4 11/11] lib/igt_kms: Added igt_pipe_get_last_out_fence()

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

 



On Tue, Jan 31, 2017 at 08:25:20PM -0500, Robert Foss wrote:
Added the igt_pipe_get_last_out_fence() helper function
that wraps accesses to pipe->fence_out.

Signed-off-by: Robert Foss <robert.foss@xxxxxxxxxxxxx>
---
lib/igt_kms.c | 8 ++++++++
lib/igt_kms.h | 1 +
2 files changed, 9 insertions(+)

diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index a1eaf411..b99b0398 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -1938,6 +1938,14 @@ static igt_output_t *igt_pipe_get_output(igt_pipe_t *pipe)
	return NULL;
}

+int igt_pipe_get_last_out_fence(igt_pipe_t *pipe)

I don't think this function can ever be useful, because you closed the
fd in igt_display_commit_atomic already.

If there's no user for this, I'd drop it for now. If we expect someone
to want to call this, then that same someone probably wants to do the
waiting themselves which doesn't mesh will with the wait/close in
igt_display_commit_atomic.

-Brian

+{
+	int fd = (int) pipe->out_fence_fd;
+	pipe->out_fence_fd = -1;
+
+	return fd;
+}
+
bool igt_pipe_get_property(igt_pipe_t *pipe, const char *name,
			   uint32_t *prop_id, uint64_t *value,
			   drmModePropertyPtr *prop)
diff --git a/lib/igt_kms.h b/lib/igt_kms.h
index 6754d00e..8fb327d9 100644
--- a/lib/igt_kms.h
+++ b/lib/igt_kms.h
@@ -390,6 +390,7 @@ igt_plane_t *igt_output_get_plane_type(igt_output_t *output, int plane_type);
igt_output_t *igt_output_from_connector(igt_display_t *display,
    drmModeConnector *connector);
igt_plane_t *igt_pipe_get_plane_type(igt_pipe_t *pipe, int plane_type);
+int igt_pipe_get_last_out_fence(igt_pipe_t *pipe);
bool igt_pipe_get_property(igt_pipe_t *pipe, const char *name,
			   uint32_t *prop_id, uint64_t *value,
			   drmModePropertyPtr *prop);
--
2.11.0.453.g787f75f05

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux