[igt-dev] [PATCH i-g-t 4/4] lib/kms: warn if we commit without outputs

Daniel Vetter daniel.vetter at ffwll.ch
Thu Oct 4 13:21:28 UTC 2018


With the high-level helpers requiring outputs there's not point
in silently ignoring issues anymore. Complain about that if it
ever happens.

Cc: Antonio Argenziano <antonio.argenziano at intel.com>
Cc: Chris Wilson <chris at chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter at intel.com>
---
 lib/igt_kms.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 454ab7481cde..867eaa7a971c 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -3269,7 +3269,7 @@ static int do_display_commit(igt_display_t *display,
 	enum pipe pipe;
 	LOG_INDENT(display, "commit");
 
-	if (!display->n_pipes || !display->n_outputs)
+	if (igt_warn_on(!display->n_pipes || !display->n_outputs))
 		return 0; /* nothing to do */
 
 	igt_display_refresh(display);
@@ -3322,7 +3322,7 @@ int igt_display_try_commit_atomic(igt_display_t *display, uint32_t flags, void *
 {
 	int ret;
 
-	if (!display->n_pipes || !display->n_outputs)
+	if (igt_warn_on(!display->n_pipes || !display->n_outputs))
 		return 0; /* nothing to do */
 
 	LOG_INDENT(display, "commit");
-- 
2.19.0.rc2



More information about the igt-dev mailing list