aboutsummaryrefslogtreecommitdiffstats
path: root/meta-agl-flutter
diff options
context:
space:
mode:
authorMarius Vlad <marius.vlad@collabora.com>2023-06-19 10:48:07 +0300
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2023-07-20 13:39:14 +0000
commitdb0a49c12e175462206e43e9057fdbfe62d2bb49 (patch)
treee131c54be97c71bff7059792ef2467c50e0f00d5 /meta-agl-flutter
parent1712fa4839d373fb0f9ea7d92925a57a9aee4c52 (diff)
meta-agl-flutter/recipes-graphics/toyota: Hot fix for current mode
The flags entry is bitmasked between preferred and current mode, which we didn't account at all. This adds a temporary patch to fix that until meta-flutter is updated with it. Bug-AGL: SPEC-4841 Change-Id: I930bbaed59e468803e16cbb2c72df440a0c30746 Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Diffstat (limited to 'meta-agl-flutter')
-rw-r--r--meta-agl-flutter/recipes-graphics/toyota/files/0001-shell-wayland-display-Handle-flags-as-bitfield-entri.patch38
-rw-r--r--meta-agl-flutter/recipes-graphics/toyota/flutter-auto_aglflutter.inc3
2 files changed, 40 insertions, 1 deletions
diff --git a/meta-agl-flutter/recipes-graphics/toyota/files/0001-shell-wayland-display-Handle-flags-as-bitfield-entri.patch b/meta-agl-flutter/recipes-graphics/toyota/files/0001-shell-wayland-display-Handle-flags-as-bitfield-entri.patch
new file mode 100644
index 00000000..6970388c
--- /dev/null
+++ b/meta-agl-flutter/recipes-graphics/toyota/files/0001-shell-wayland-display-Handle-flags-as-bitfield-entri.patch
@@ -0,0 +1,38 @@
+From 357634ceae6d730131b26bc3e72b4cf0b3e902ad Mon Sep 17 00:00:00 2001
+From: Marius Vlad <marius.vlad@collabora.com>
+Date: Mon, 19 Jun 2023 10:34:44 +0300
+Subject: [PATCH] shell/wayland/display: Handle flags as bitfield entries
+
+We can have preferred and current mode or'ed in the same time, so we
+can't really check just for current mode. Make sure we do get a valid
+width/height for the outputs to avoid going further.
+
+Bug-AGL: SPEC-4841
+Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
+---
+ shell/wayland/display.cc | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/shell/wayland/display.cc b/shell/wayland/display.cc
+index 434dd05..5ace67c 100644
+--- a/shell/wayland/display.cc
++++ b/shell/wayland/display.cc
+@@ -258,12 +258,14 @@ void Display::display_handle_mode(void* data,
+ (void)flags;
+ auto* oi = static_cast<output_info_t*>(data);
+
+- if (flags == WL_OUTPUT_MODE_CURRENT) {
++ if ((flags & WL_OUTPUT_MODE_CURRENT) == WL_OUTPUT_MODE_CURRENT) {
+ oi->height = static_cast<unsigned int>(height);
+ oi->width = static_cast<unsigned int>(width);
+ oi->refresh_rate = refresh;
+ }
+
++ assert(oi->height && oi->width);
++
+ FML_DLOG(INFO) << "Video mode: " << width << " x " << height << " @ "
+ << (refresh > 1000 ? refresh / 1000.0 : (double)refresh)
+ << " Hz";
+--
+2.35.1
+
diff --git a/meta-agl-flutter/recipes-graphics/toyota/flutter-auto_aglflutter.inc b/meta-agl-flutter/recipes-graphics/toyota/flutter-auto_aglflutter.inc
index 41035f58..02cd0679 100644
--- a/meta-agl-flutter/recipes-graphics/toyota/flutter-auto_aglflutter.inc
+++ b/meta-agl-flutter/recipes-graphics/toyota/flutter-auto_aglflutter.inc
@@ -1,6 +1,7 @@
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
-SRC_URI += "file://0001-Add-optional-agl_shell-plugin.patch"
+SRC_URI += "file://0001-Add-optional-agl_shell-plugin.patch \
+ file://0001-shell-wayland-display-Handle-flags-as-bitfield-entri.patch"
# For now disable gstreamer to avoid needing to enable "commercial"
# licenses for the stated ffmpeg dependency.