[PATCH i-g-t 4/5] lib/kms: Skip no-op display updates

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

 



If the display is disabled (e.g. the driver has disabled the KMS
interface) there is nothing to do so avoid failing.

Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
---
 lib/igt_kms.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 9710bcae1..dedc81344 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -3271,6 +3271,9 @@ static int do_display_commit(igt_display_t *display,
 	enum pipe pipe;
 	LOG_INDENT(display, "commit");
 
+	if (!display->n_pipes || !display->n_outputs)
+		return 0; /* nothing to do */
+
 	igt_display_refresh(display);
 
 	if (s == COMMIT_ATOMIC) {
@@ -3321,6 +3324,9 @@ int igt_display_try_commit_atomic(igt_display_t *display, uint32_t flags, void *
 {
 	int ret;
 
+	if (!display->n_pipes || !display->n_outputs)
+		return 0; /* nothing to do */
+
 	LOG_INDENT(display, "commit");
 
 	igt_display_refresh(display);
-- 
2.19.0

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




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux