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

Brian Starkey brian.starkey at arm.com
Wed Feb 1 10:41:57 UTC 2017


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 at collabora.com>
>---
> 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
>


More information about the Intel-gfx mailing list