[igt-dev] [PATCH i-g-t 4/5] lib/kms: Skip no-op display updates
Chris Wilson
chris at chris-wilson.co.uk
Fri Sep 14 20:13:09 UTC 2018
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 at chris-wilson.co.uk>
---
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
More information about the igt-dev
mailing list