aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Stevenson <dave.stevenson@raspberrypi.com>2023-10-05 14:16:44 +0100
committerTomi Valkeinen <tomi.valkeinen@ideasonboard.com>2023-11-07 15:12:34 +0200
commit898a52f08482775776a08a99c33cb0458ec68977 (patch)
treee9e996224a7dbdcd9c30711fd55e4a182d2ac1e4
parent403c756c958c2a60adc6e8fa64aa0943b4dfda4e (diff)
downloadlibkmsxx-898a52f08482775776a08a99c33cb0458ec68977.tar.gz
kmstest: Don't fail if setting crtc inactive and disabling the planes fails
Many simple DRM devices (eg SPI) don't support disabling the primary plane when the CRTC is enabled (which is different from the ACTIVE flag from being cleared). This is enforced by the kernel in drm_atomic_helper_check_crtc_primary_plane. Do not exit if that commit fails. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
-rw-r--r--utils/kmstest.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/utils/kmstest.cpp b/utils/kmstest.cpp
index 580b69b..de6957d 100644
--- a/utils/kmstest.cpp
+++ b/utils/kmstest.cpp
@@ -835,7 +835,9 @@ static void set_crtcs_n_planes_atomic(Card& card, const vector<OutputInfo>& outp
// XXX DRM framework doesn't allow moving an active plane from one crtc to another.
// See drm_atomic.c::plane_switching_crtc().
- // For the time being, disable all crtcs and planes here.
+ // For the time being, try and disable all crtcs and planes here.
+ // Do not check the return value as some simple displays don't support the crtc being
+ // enabled but the primary plane being disabled.
AtomicReq disable_req(card);
@@ -856,9 +858,7 @@ static void set_crtcs_n_planes_atomic(Card& card, const vector<OutputInfo>& outp
{ "CRTC_ID", 0 },
});
- r = disable_req.commit_sync(true);
- if (r)
- EXIT("Atomic commit failed when disabling: %d\n", r);
+ disable_req.commit_sync(true);
// Keep blobs here so that we keep ref to them until we have committed the req
vector<unique_ptr<Blob>> blobs;