diff --git a/recipes-graphics/drm/libdrm/0003-tests-modetest-set-property-in-atomic-mode.patch b/recipes-graphics/drm/libdrm/0003-tests-modetest-set-property-in-atomic-mode.patch new file mode 100644 index 0000000..8a0cd79 --- /dev/null +++ b/recipes-graphics/drm/libdrm/0003-tests-modetest-set-property-in-atomic-mode.patch @@ -0,0 +1,43 @@ +From 76dfcf7ed090a6cdeda86aa566fa7b653925d01d Mon Sep 17 00:00:00 2001 +From: Yannick Fertre +Date: Fri, 24 Apr 2020 15:31:23 +0200 +Subject: [PATCH 1/2] tests/modetest: set property in atomic mode + +In atomic mode, the additional properties must be done after +call of functions atomic_set_mode & atomic_set_planes. + +Signed-off-by: Yannick Fertre +--- + tests/modetest/modetest.c | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) + +diff --git a/tests/modetest/modetest.c b/tests/modetest/modetest.c +index 018338c..26cd9d6 100644 +--- a/tests/modetest/modetest.c ++++ b/tests/modetest/modetest.c +@@ -2108,8 +2108,10 @@ int main(int argc, char **argv) + dump_resource(&dev, planes); + dump_resource(&dev, framebuffers); + +- for (i = 0; i < prop_count; ++i) +- set_property(&dev, &prop_args[i]); ++ if (!dev.use_atomic) { ++ for (i = 0; i < prop_count; ++i) ++ set_property(&dev, &prop_args[i]); ++ } + + if (dev.use_atomic) { + dev.req = drmModeAtomicAlloc(); +@@ -2126,6 +2128,9 @@ int main(int argc, char **argv) + atomic_set_mode(&dev, pipe_args, count); + atomic_set_planes(&dev, plane_args, plane_count, false); + ++ for (i = 0; i < prop_count; ++i) ++ set_property(&dev, &prop_args[i]); ++ + ret = drmModeAtomicCommit(dev.fd, dev.req, DRM_MODE_ATOMIC_ALLOW_MODESET, NULL); + if (ret) { + fprintf(stderr, "Atomic Commit failed [1]\n"); +-- +2.7.4 + diff --git a/recipes-graphics/drm/libdrm/0004-tests-modetest-close-crtc.patch b/recipes-graphics/drm/libdrm/0004-tests-modetest-close-crtc.patch new file mode 100644 index 0000000..189f632 --- /dev/null +++ b/recipes-graphics/drm/libdrm/0004-tests-modetest-close-crtc.patch @@ -0,0 +1,42 @@ +From 250a5ae2a5caa28911deb1028143d0c9ea4fdf88 Mon Sep 17 00:00:00 2001 +From: Yannick Fertre +Date: Fri, 24 Apr 2020 15:41:17 +0200 +Subject: [PATCH 2/2] tests/modetest: close crtc + +To test several configuration of crtc, it must be closed at the end +of modetest test (with/without atomic mode). + +Signed-off-by: Yannick Fertre +--- + tests/modetest/modetest.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/tests/modetest/modetest.c b/tests/modetest/modetest.c +index 26cd9d6..7094762 100644 +--- a/tests/modetest/modetest.c ++++ b/tests/modetest/modetest.c +@@ -2182,6 +2182,10 @@ int main(int argc, char **argv) + } + + atomic_clear_FB(&dev, plane_args, plane_count); ++ ++ for (i = 0; i < count; i++) ++ drmModeSetCrtc(dev.fd, dev.resources->crtcs[i].crtc->crtc_id, ++ 0, 0, 0, 0, 0, NULL); + } + + drmModeAtomicFree(dev.req); +@@ -2220,6 +2224,10 @@ int main(int argc, char **argv) + + if (count) + clear_mode(&dev); ++ ++ for (i = 0; i < count; i++) ++ drmModeSetCrtc(dev.fd, dev.resources->crtcs[i].crtc->crtc_id, ++ 0, 0, 0, 0, 0, NULL); + } + } + +-- +2.7.4 + diff --git a/recipes-graphics/drm/libdrm_2.4.99.bbappend b/recipes-graphics/drm/libdrm_2.4.100.bbappend similarity index 73% rename from recipes-graphics/drm/libdrm_2.4.99.bbappend rename to recipes-graphics/drm/libdrm_2.4.100.bbappend index 1f3fb6d..5b63b63 100644 --- a/recipes-graphics/drm/libdrm_2.4.99.bbappend +++ b/recipes-graphics/drm/libdrm_2.4.100.bbappend @@ -6,4 +6,6 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}/:" SRC_URI_append_stm32mpcommon = " \ file://0001-tests-modetest-automatic-configuration.patch \ file://0002-tests-util-smtpe-increase-alpha-to-middle-band.patch \ + file://0003-tests-modetest-set-property-in-atomic-mode.patch \ + file://0004-tests-modetest-close-crtc.patch \ "