]> code.ossystems Code Review - meta-freescale.git/commitdiff
weston: Enable double buffer with fb_pan_display for weston compositor
authorTom Hochstein <tom.hochstein@nxp.com>
Mon, 16 Jan 2017 19:52:23 +0000 (13:52 -0600)
committerOtavio Salvador <otavio@ossystems.com.br>
Mon, 23 Jan 2017 18:55:31 +0000 (16:55 -0200)
Refine offset calculation.

Upstream-Status: Inappropriate [i.MX specific]

Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
recipes-graphics/wayland/weston/0018-MGS-2397-ccc-Enable-double-buffer-with-fb_pan_displa.patch [new file with mode: 0644]
recipes-graphics/wayland/weston_%.bbappend

diff --git a/recipes-graphics/wayland/weston/0018-MGS-2397-ccc-Enable-double-buffer-with-fb_pan_displa.patch b/recipes-graphics/wayland/weston/0018-MGS-2397-ccc-Enable-double-buffer-with-fb_pan_displa.patch
new file mode 100644 (file)
index 0000000..4ce1871
--- /dev/null
@@ -0,0 +1,48 @@
+From 270319565a07f7ceeb12fac1c267d0dd9ebf2d57 Mon Sep 17 00:00:00 2001
+From: Meng Mingming <mingming.meng@nxp.com>
+Date: Wed, 16 Nov 2016 15:05:51 +0800
+Subject: [PATCH 17/17] MGS-2397 [#ccc] Enable double buffer with
+ fb_pan_display for weston compositor
+
+Refine offset calculation.
+
+Upstream-Status: Inappropriate [i.MX specific]
+
+Date: Nov 16, 2016
+Signed-off-by: Meng Mingming <mingming.meng@nxp.com>
+---
+ src/g2d-renderer.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/src/g2d-renderer.c b/src/g2d-renderer.c
+index 41c4d9e..c30aa62 100644
+--- a/src/g2d-renderer.c
++++ b/src/g2d-renderer.c
+@@ -78,6 +78,7 @@ struct fb_screeninfo {
+       size_t buffer_length; /* length of frame buffer memory in bytes */
+       size_t physical;
+       size_t stride;
++      size_t stride_bytes;
+       enum g2d_format pixel_format; /* frame buffer pixel format */
+       int fb_fd;
+ };
+@@ -1136,6 +1137,7 @@ fb_query_screen_info(struct g2d_output_state *output, int fd,
+       info->physical = fixinfo->smem_start;
+       info->buffer_length = fixinfo->smem_len;
+       info->stride = fixinfo->line_length / (varinfo->bits_per_pixel >> 3);
++      info->stride_bytes = fixinfo->line_length;
+       calculate_g2d_format(varinfo, &info->pixel_format);
+       if (info->pixel_format < 0) {
+@@ -1205,7 +1207,7 @@ g2d_renderer_surface_create(struct g2d_output_state *go, struct g2d_renderer *gr
+               return -1;
+       }
+       go->renderSurf = zalloc(sizeof(struct g2d_surfaceEx) * go->nNumBuffers);
+-      offset = go->fb_info.buffer_length/go->nNumBuffers;
++      offset = go->fb_info.stride_bytes * go->fb_info.y_resolution;
+       for(i = 0; i < go->nNumBuffers; i++)
+       {
+               get_G2dSurface_from_screeninfo(&go->fb_info, &go->renderSurf[i]);
+-- 
+2.7.4
+
index aa13f27dfbeadb67c2da09585c4ba35ba8a8fa4a..8a47ba52f81bf0889e8c84c6a777d665b731e9bd 100644 (file)
@@ -16,6 +16,7 @@ SRC_URI_append_imxgpu3d = " \
     file://0015-MGS-2221-imx-171-Fix-weston-build-failed.patch             \
     file://0016-Link-compositor-to-egl.patch                               \
     file://0017-MGS-2343-ccc-XWLD-T3DStressTest_Wayland-displays-abn.patch \
+    file://0018-MGS-2397-ccc-Enable-double-buffer-with-fb_pan_displa.patch \
 "
 
 # The 'egl' configuration of weston requires gles support, and consideration