All of lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t v2] tests/kms_writeback: Detach pipe only for valid FB_ID
@ 2022-06-22 16:39 Jessica Zhang
  2022-06-22 19:20 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_writeback: Detach pipe only for valid FB_ID (rev2) Patchwork
                   ` (9 more replies)
  0 siblings, 10 replies; 12+ messages in thread
From: Jessica Zhang @ 2022-06-22 16:39 UTC (permalink / raw)
  To: igt-dev; +Cc: quic_aravindh, petri.latvala

Currently, the writeback DRM driver will accept a commit on the
writeback connector only if a valid FB_ID is presented. When we run
the "writeback-invalid-parameters" or "writeback-format-pixels" subtests
individually, this will not be true because no successful commit has
happened. So there is no need to clean up the pipes in detach_crtc.

Only issue a NULL commit if FB_ID is greater than zero. This will make
sure that a cleanup happens only when necessary.

Changes since V1:
- Fix improper brace style for detach_crtc()
- Rebase onto tip of master

Signed-off-by: Jessica Zhang <quic_jesszhan@quicinc.com>
---
 tests/kms_writeback.c | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/tests/kms_writeback.c b/tests/kms_writeback.c
index 6efc72df4327..1a623655da49 100644
--- a/tests/kms_writeback.c
+++ b/tests/kms_writeback.c
@@ -139,7 +139,16 @@ static igt_output_t *kms_writeback_get_output(igt_display_t *display)
 	return NULL;
 }
 
-static void detach_crtc(igt_display_t *display, igt_output_t *output) {
+static uint64_t get_writeback_fb_id(igt_output_t *output)
+{
+	return igt_output_get_prop(output, IGT_CONNECTOR_WRITEBACK_FB_ID);
+}
+
+static void detach_crtc(igt_display_t *display, igt_output_t *output)
+{
+	if (get_writeback_fb_id(output) == 0)
+		return;
+
 	igt_output_set_pipe(output, PIPE_NONE);
 	igt_display_commit2(display, COMMIT_ATOMIC);
 }
-- 
2.31.0

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2022-07-13 16:08 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-22 16:39 [igt-dev] [PATCH i-g-t v2] tests/kms_writeback: Detach pipe only for valid FB_ID Jessica Zhang
2022-06-22 19:20 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_writeback: Detach pipe only for valid FB_ID (rev2) Patchwork
2022-06-27 10:07 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2022-06-27 18:49 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_writeback: Detach pipe only for valid FB_ID (rev3) Patchwork
2022-06-28  5:06 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2022-06-28 19:43 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_writeback: Detach pipe only for valid FB_ID (rev4) Patchwork
2022-06-28 22:54 ` [igt-dev] ✗ GitLab.Pipeline: warning " Patchwork
2022-06-29  0:54 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_writeback: Detach pipe only for valid FB_ID (rev5) Patchwork
2022-06-29 13:00 ` [igt-dev] ✗ Fi.CI.IGT: failure for tests/kms_writeback: Detach pipe only for valid FB_ID (rev4) Patchwork
2022-06-29 16:48 ` [igt-dev] ✓ Fi.CI.IGT: success for tests/kms_writeback: Detach pipe only for valid FB_ID (rev5) Patchwork
2022-07-13  1:27 ` [igt-dev] [PATCH i-g-t v2] tests/kms_writeback: Detach pipe only for valid FB_ID Rob Clark
2022-07-13 16:08   ` Jessica Zhang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.