summaryrefslogtreecommitdiff
path: root/lib/igt_kms.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2018-09-14 21:03:38 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2018-10-01 21:06:56 +0100
commit212b71372bfbb73663d872df31118d6b396ada4f (patch)
treed35e62ce3f8348fa3295070d689d98467e3bc952 /lib/igt_kms.c
parent065e7dcb05a34aa8bd4f9bf30b9061fc2d5fbac9 (diff)
lib/kms: Skip no-op display updates
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@chris-wilson.co.uk> Acked-by: Antonio Argenziano <antonio.argenziano@intel.com>
Diffstat (limited to 'lib/igt_kms.c')
-rw-r--r--lib/igt_kms.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 9710bcae..dedc8134 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);