Refine offset calculation.

Upstream-Status: Inappropriate [i.MX specific]

Signed-off-by: Tom Hochstein <tom.hochst...@nxp.com>
---
 ...c-Enable-double-buffer-with-fb_pan_displa.patch | 48 ++++++++++++++++++++++
 recipes-graphics/wayland/weston_%.bbappend         |  1 +
 2 files changed, 49 insertions(+)
 create mode 100644 
recipes-graphics/wayland/weston/0018-MGS-2397-ccc-Enable-double-buffer-with-fb_pan_displa.patch

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
index 0000000..4ce1871
--- /dev/null
+++ 
b/recipes-graphics/wayland/weston/0018-MGS-2397-ccc-Enable-double-buffer-with-fb_pan_displa.patch
@@ -0,0 +1,48 @@
+From 270319565a07f7ceeb12fac1c267d0dd9ebf2d57 Mon Sep 17 00:00:00 2001
+From: Meng Mingming <mingming.m...@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.m...@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
+
diff --git a/recipes-graphics/wayland/weston_%.bbappend 
b/recipes-graphics/wayland/weston_%.bbappend
index aa13f27..8a47ba5 100644
--- a/recipes-graphics/wayland/weston_%.bbappend
+++ b/recipes-graphics/wayland/weston_%.bbappend
@@ -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
-- 
1.9.1

-- 
_______________________________________________
meta-freescale mailing list
meta-freescale@yoctoproject.org
https://lists.yoctoproject.org/listinfo/meta-freescale

Reply via email to