aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorManuel Bachmann <mbc@iot.bzh>2015-11-05 10:17:00 +0000
committerGerrit Code Review <gerrit@172.30.200.200>2015-11-06 15:25:15 +0000
commite873ca6bed7996d9ee7593651808b94fa8f68e0f (patch)
treed8d70f2431b21a7d768c8e04d1ffbbddbc318aff
parentfa362551def1806d0b1fba133990ad88142d9d1b (diff)
Fix Weston IVI-Shell layout on Renesas R-Car E2 Silk
On Renesas Silk boards, when running weston ivi-shell, layout is too small and black borders are visible. This is due to the presence of a VGA adapter, which ivi-shell wrongly queries for resolution size values. Work around this ; this patch is not upstreamed due to current work being done on ivi-shell multiscreen support (https://github.com/ntanibata/weston-ivi-shell/commits/ multiscreen_feature_03). PS : although this patch is primarily intended for Silk, we put it into "meta-agl" because it is a general-purpose fix. It would also fix the issue on laptops having VGA adapters, e.g.. Change-Id: I25447b54d53eb8f8b7261903c0699a53c81790f8 Signed-off-by: Manuel Bachmann <mbc@iot.bzh>
-rw-r--r--meta-ivi-common/recipes-graphics/wayland/weston-ivi-shell/0001-IVI-Shell-Backport-from-Weston-1.9.0-to-1.5.0.patch (renamed from meta-ivi-common/recipes-graphics/wayland/weston-ivi-shell/Backport-IVI-Shell-from-Weston-1.9.0-to-1.5.0.patch)0
-rw-r--r--meta-ivi-common/recipes-graphics/wayland/weston-ivi-shell/0002-IVI-Shell-use-primary-screen-for-resolution.patch49
-rw-r--r--meta-ivi-common/recipes-graphics/wayland/weston_1.5.0.bbappend3
3 files changed, 51 insertions, 1 deletions
diff --git a/meta-ivi-common/recipes-graphics/wayland/weston-ivi-shell/Backport-IVI-Shell-from-Weston-1.9.0-to-1.5.0.patch b/meta-ivi-common/recipes-graphics/wayland/weston-ivi-shell/0001-IVI-Shell-Backport-from-Weston-1.9.0-to-1.5.0.patch
index 0e5a99f0b..0e5a99f0b 100644
--- a/meta-ivi-common/recipes-graphics/wayland/weston-ivi-shell/Backport-IVI-Shell-from-Weston-1.9.0-to-1.5.0.patch
+++ b/meta-ivi-common/recipes-graphics/wayland/weston-ivi-shell/0001-IVI-Shell-Backport-from-Weston-1.9.0-to-1.5.0.patch
diff --git a/meta-ivi-common/recipes-graphics/wayland/weston-ivi-shell/0002-IVI-Shell-use-primary-screen-for-resolution.patch b/meta-ivi-common/recipes-graphics/wayland/weston-ivi-shell/0002-IVI-Shell-use-primary-screen-for-resolution.patch
new file mode 100644
index 000000000..2df9f4aed
--- /dev/null
+++ b/meta-ivi-common/recipes-graphics/wayland/weston-ivi-shell/0002-IVI-Shell-use-primary-screen-for-resolution.patch
@@ -0,0 +1,49 @@
+From: Manuel Bachmann <manuel.bachmann@iot.bzh>
+Date: Thu, Nov 5 10:17:00 2015 +0000
+Subject: ivi-shell: use primary screen for resolution values
+
+Screen resolution values (width, height) are always grabbed
+from the first screen, n.0, which can be a bad choice if it
+is not the one really used as main display.
+
+This mostly happens on hardware with a VGA adapter, such as
+laptops or Renesas R-Car E2 "Silk", and prevents correct
+layout stretching (black borders).
+
+Discover the primary screen and use its values.
+
+Signed-off-by: Manuel Bachmann <manuel.bachmann@iot.bzh>
+---
+
+--- a/ivi-shell/hmi-controller.c 2015-11-05 09:57:55.740942450 +0000
++++ b/ivi-shell/hmi-controller.c 2015-11-05 10:00:23.545912494 +0000
+@@ -676,6 +676,8 @@
+ struct link_layer *tmp_link_layer = NULL;
+ int32_t panel_height = 0;
+ struct hmi_controller *hmi_ctrl = MEM_ALLOC(sizeof(*hmi_ctrl));
++ struct weston_output *output = NULL;
++ int i = 0;
+
+ wl_array_init(&hmi_ctrl->ui_widgets);
+ hmi_ctrl->layout_mode = IVI_HMI_CONTROLLER_LAYOUT_MODE_TILING;
+@@ -684,11 +686,19 @@
+
+ ivi_controller_interface->get_screens(&screen_length, &pp_screen);
+
+- iviscrn = pp_screen[0];
++ /* find primary screen */
++ for (i = 0; i < screen_length; i++) {
++ iviscrn = pp_screen[i];
++ output = ivi_controller_interface->screen_get_output(iviscrn);
++ if (output->x == 0)
++ break;
++ }
+
+ ivi_controller_interface->get_screen_resolution(iviscrn, &screen_width,
+ &screen_height);
+
++ iviscrn = pp_screen[0];
++
+ /* init base ivi_layer*/
+ hmi_ctrl->base_layer.x = 0;
+ hmi_ctrl->base_layer.y = 0;
diff --git a/meta-ivi-common/recipes-graphics/wayland/weston_1.5.0.bbappend b/meta-ivi-common/recipes-graphics/wayland/weston_1.5.0.bbappend
index 264b6ab6d..8c63e7375 100644
--- a/meta-ivi-common/recipes-graphics/wayland/weston_1.5.0.bbappend
+++ b/meta-ivi-common/recipes-graphics/wayland/weston_1.5.0.bbappend
@@ -1,7 +1,8 @@
FILESEXTRAPATHS_prepend := ":${THISDIR}/weston-ivi-shell:"
SRC_URI_append = " \
- file://Backport-IVI-Shell-from-Weston-1.9.0-to-1.5.0.patch \
+ file://0001-IVI-Shell-Backport-from-Weston-1.9.0-to-1.5.0.patch \
+ file://0002-IVI-Shell-use-primary-screen-for-resolution.patch \
file://data/background.png \
file://data/fullscreen.png \
file://data/home.png \