[meta-freescale] [meta-fsl-arm][PATCH 4/5] weston: Add patches to fix bugs
Neena Busireddy
neenareddy.busireddy at nxp.com
Mon Jan 4 07:56:22 PST 2016
From: Neena Busireddy <neena.busireddy at freescale.com>
- Patch to fix setenv and clear environments.
- Patch to fix screen blur for Qt5 CinematicExperience.
Signed-off-by: Neena Busireddy <neena.busireddy at freescale.com>
Signed-off-by: Neena Busireddy <neenareddy.busireddy at nxp.com>
---
...GS-1235-Fix-setenv-and-clear-environments.patch | 41 ++++++++++
...x-for-Qt5_CinematicExperience-will-meet-s.patch | 93 ++++++++++++++++++++++
recipes-graphics/wayland/weston_%.bbappend | 5 +-
3 files changed, 138 insertions(+), 1 deletion(-)
create mode 100644 recipes-graphics/wayland/weston/0004-MGS-1235-Fix-setenv-and-clear-environments.patch
create mode 100644 recipes-graphics/wayland/weston/0005-MGS-1252-Fix-for-Qt5_CinematicExperience-will-meet-s.patch
diff --git a/recipes-graphics/wayland/weston/0004-MGS-1235-Fix-setenv-and-clear-environments.patch b/recipes-graphics/wayland/weston/0004-MGS-1235-Fix-setenv-and-clear-environments.patch
new file mode 100644
index 0000000..e4f8cd9
--- /dev/null
+++ b/recipes-graphics/wayland/weston/0004-MGS-1235-Fix-setenv-and-clear-environments.patch
@@ -0,0 +1,41 @@
+From d09d0595b472d6bae35e78272fc670d494f6e408 Mon Sep 17 00:00:00 2001
+From: Prabhu <prabhu.sundararaj at freescale.com>
+Date: Tue, 17 Nov 2015 22:00:42 -0600
+Subject: [PATCH] MGS-1235 : Fix setenv and clear environments
+
+When setenv is set with parameter null causing crash.
+Fixed with unsetenv to restore to previous state
+
+Date: Nov 17, 2015
+Signed-off-by: Prabhu <prabhu.sundararaj at freescale.com>
+
+-1235
+---
+ src/compositor-fbdev.c | 11 ++++++++++-
+ 1 file changed, 10 insertions(+), 1 deletion(-)
+
+diff --git a/src/compositor-fbdev.c b/src/compositor-fbdev.c
+index ed25576..c6b8e5a 100644
+--- a/src/compositor-fbdev.c
++++ b/src/compositor-fbdev.c
+@@ -598,7 +598,16 @@ fbdev_output_create(struct fbdev_backend *backend,
+ fprintf(stderr, "failed to create window\n");
+ return 0;
+ }
+- setenv("FB_FRAMEBUFFER_0", fbenv, 1);
++ /* restore the previous value*/
++ if(fbenv != NULL)
++ {
++ setenv("FB_FRAMEBUFFER_0", fbenv, 1);
++ }
++ else
++ {
++ unsetenv("FB_FRAMEBUFFER_0");
++ }
++
+
+ if (gal2d_renderer->output_create(&output->base,
+ output->display,
+--
+2.5.1
+
diff --git a/recipes-graphics/wayland/weston/0005-MGS-1252-Fix-for-Qt5_CinematicExperience-will-meet-s.patch b/recipes-graphics/wayland/weston/0005-MGS-1252-Fix-for-Qt5_CinematicExperience-will-meet-s.patch
new file mode 100644
index 0000000..82d3798
--- /dev/null
+++ b/recipes-graphics/wayland/weston/0005-MGS-1252-Fix-for-Qt5_CinematicExperience-will-meet-s.patch
@@ -0,0 +1,93 @@
+From 515b1f1c1902ae22914a93982935e2328d2240d2 Mon Sep 17 00:00:00 2001
+From: Yong Gan <b45748 at freescale.com>
+Date: Thu, 19 Nov 2015 15:30:24 +0800
+Subject: [PATCH 2/2] MGS-1252: Fix for Qt5_CinematicExperience will meet
+ screen blur
+
+When the Qt5_CinematicExperience is created, window creates with 1920x1080
+and the starting coordiantes more than screen coordinate.
+Ths cause access beyond the surface and system hang on lcd display
+
+Date: Nov 18, 2015
+Signed-off-by: Prabhu <prabhu.sundararaj at freescale.com>
+---
+ src/gal2d-renderer.c | 30 ++++++++++++++++++------------
+ 1 file changed, 18 insertions(+), 12 deletions(-)
+
+diff --git a/src/gal2d-renderer.c b/src/gal2d-renderer.c
+index c68f02c..6e7d640 100644
+--- a/src/gal2d-renderer.c
++++ b/src/gal2d-renderer.c
+@@ -661,12 +661,11 @@ repaint_region(struct weston_view *ev, struct weston_output *output, struct gal2
+ gcsRECT srcRect = {0};
+ gcsRECT dstrect = {0};
+ gctUINT32 horFactor, verFactor;
+- int useStretch =1;
+ int useFilterBlit = 0;
+ gctUINT srcWidth = 0;
+ gctUINT srcHeight = 0;
+ gctUINT32 srcStride[3];
+- gceSURF_FORMAT srcFormat;;
++ gceSURF_FORMAT srcFormat;
+ gctUINT32 srcPhyAddr[3];
+ gctUINT32 dstPhyAddr[3];
+ gctUINT dstWidth = 0;
+@@ -702,14 +701,16 @@ repaint_region(struct weston_view *ev, struct weston_output *output, struct gal2
+ srcRect.right = ev->surface->width;
+ srcRect.bottom = ev->surface->height;
+
+- if(useFilterBlit)
++ dstsurface = go->nNumBuffers > 1 ?
++ go->renderSurf[go->activebuffer] :
++ go->offscreenSurface;
++ gcmVERIFY_OK(gcoSURF_GetAlignedSize(dstsurface, &dstWidth, &dstHeight, (gctINT *)&dstStrides));
++ gcmVERIFY_OK(gcoSURF_Lock(dstsurface, &dstPhyAddr[0], gcvNULL));
++ gcmVERIFY_OK(gcoSURF_Unlock(dstsurface, gcvNULL));
++
++ if(galIsYUVFormat(srcFormat) == gcvSTATUS_TRUE)
+ {
+- dstsurface = go->nNumBuffers > 1 ?
+- go->renderSurf[go->activebuffer] :
+- go->offscreenSurface;
+- gcmVERIFY_OK(gcoSURF_GetAlignedSize(dstsurface, &dstWidth, &dstHeight, (gctINT *)&dstStrides));
+- gcmVERIFY_OK(gcoSURF_Lock(dstsurface, &dstPhyAddr[0], gcvNULL));
+- gcmVERIFY_OK(gcoSURF_Unlock(dstsurface, gcvNULL));
++ useFilterBlit = 1;
+ }
+ else
+ {
+@@ -739,7 +740,7 @@ repaint_region(struct weston_view *ev, struct weston_output *output, struct gal2
+ dstrect.right = bb_rects[0].x2;
+ dstrect.bottom = bb_rects[0].y2;
+
+- if(dstrect.right < 0 || dstrect.bottom < 0)
++ if(dstrect.right < 0 || dstrect.bottom < 0 || dstrect.left > dstWidth || dstrect.top > dstHeight)
+ {
+ break;
+ }
+@@ -829,8 +830,7 @@ repaint_region(struct weston_view *ev, struct weston_output *output, struct gal2
+ }
+ else
+ {
+- if(useStretch)
+- gcmVERIFY_OK(galGetStretchFactors(&srcRect, &dstrect, &horFactor, &verFactor));
++ gcmVERIFY_OK(galGetStretchFactors(&srcRect, &dstrect, &horFactor, &verFactor));
+
+ if(verFactor == 65536 && horFactor == 65536)
+ {
+@@ -839,6 +839,12 @@ repaint_region(struct weston_view *ev, struct weston_output *output, struct gal2
+ }
+ else
+ {
++ dstrect.right = dstrect.right < dstWidth ? dstrect.right : dstWidth;
++ dstrect.bottom = dstrect.bottom < dstHeight ? dstrect.bottom : dstHeight;
++ srcRect.right = srcRect.right < dstWidth ? srcRect.right : dstWidth;
++ srcRect.bottom = srcRect.bottom < dstHeight ? srcRect.bottom : dstHeight;
++
++ gcmVERIFY_OK(galGetStretchFactors(&srcRect, &dstrect, &horFactor, &verFactor));
+ /* Program the stretch factors. */
+ gcmVERIFY_OK(gco2D_SetStretchFactors(gr->gcoEngine2d, horFactor, verFactor));
+
+--
+1.9.1
+
diff --git a/recipes-graphics/wayland/weston_%.bbappend b/recipes-graphics/wayland/weston_%.bbappend
index a7496da..6c8ba6d 100644
--- a/recipes-graphics/wayland/weston_%.bbappend
+++ b/recipes-graphics/wayland/weston_%.bbappend
@@ -1,6 +1,9 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
-SRC_URI_append_mx6 = " file://0001-MGS-840-Add-i.MX6-support-for-weston.patch"
+SRC_URI_append_mx6 = " \
+ file://0001-MGS-840-Add-i.MX6-support-for-weston.patch \
+ file://0004-MGS-1235-Fix-setenv-and-clear-environments.patch \
+ file://0005-MGS-1252-Fix-for-Qt5_CinematicExperience-will-meet-s.patch"
PACKAGECONFIG_append_mx6q = " cairo-glesv2"
PACKAGECONFIG_append_mx6dl = " cairo-glesv2"
--
1.9.1
More information about the meta-freescale
mailing list