summaryrefslogtreecommitdiffstats
path: root/recipes-graphics/wayland/weston
diff options
context:
space:
mode:
authorTom Hochstein <tom.hochstein@nxp.com>2016-10-07 17:36:58 -0500
committerOtavio Salvador <otavio@ossystems.com.br>2016-10-18 16:26:14 -0200
commitb7e1c6f21721108a868e95140918d184dd0a5383 (patch)
tree7f3888dad95b1485212fafb64b90413368d5dae5 /recipes-graphics/wayland/weston
parent94094cf7f9eedeff3cd4d3debf046c391560c779 (diff)
downloadmeta-freescale-b7e1c6f21721108a868e95140918d184dd0a5383.tar.gz
weston: Get stride from the FB buffer
Fix the stride setting error in the fbinfo. Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Diffstat (limited to 'recipes-graphics/wayland/weston')
-rw-r--r--recipes-graphics/wayland/weston/0014-MGS-1987-Get-stride-from-the-FB-buffe.patch76
1 files changed, 76 insertions, 0 deletions
diff --git a/recipes-graphics/wayland/weston/0014-MGS-1987-Get-stride-from-the-FB-buffe.patch b/recipes-graphics/wayland/weston/0014-MGS-1987-Get-stride-from-the-FB-buffe.patch
new file mode 100644
index 00000000..a4658a7b
--- /dev/null
+++ b/recipes-graphics/wayland/weston/0014-MGS-1987-Get-stride-from-the-FB-buffe.patch
@@ -0,0 +1,76 @@
1From 735e58c6066fe1148d803168c6241a4d8cb5c973 Mon Sep 17 00:00:00 2001
2From: "yong.gan" <yong.gan@nxp.com>
3Date: Wed, 6 Jul 2016 08:28:18 +0800
4Subject: [PATCH] MGS-1987: Get stride from the FB buffe.
5
6Fix the stride setting error in the fbinfo.
7
8Date: Jul 6, 2016
9Signed-off-by: Yong Gan <yong.gan@nxp.com>
10---
11 src/g2d-renderer.c | 14 +++++++-------
12 1 file changed, 7 insertions(+), 7 deletions(-)
13
14diff --git a/src/g2d-renderer.c b/src/g2d-renderer.c
15index 0c26e91..30bf1a5 100644
16--- a/src/g2d-renderer.c
17+++ b/src/g2d-renderer.c
18@@ -63,6 +63,7 @@ struct fb_screeninfo {
19 unsigned int y_resolution;
20 size_t buffer_length; /* length of frame buffer memory in bytes */
21 size_t physical;
22+ size_t stride;
23 enum g2d_format pixel_format; /* frame buffer pixel format */
24 int fb_fd;
25 };
26@@ -322,8 +323,6 @@ get_g2dSurface(gcsWL_VIV_BUFFER *buffer, struct g2d_surfaceEx *g2dSurface)
27 weston_log("invalid EGL buffer in function %s\n", __func__);
28 return;
29 }
30- int width = buffer->alignedWidth;
31- int height = buffer->alignedHeight;
32 g2d_getG2dFormat(buffer->format, &g2dSurface->base.format);
33 g2d_getG2dTiling(buffer->tiling, &g2dSurface->tiling);
34 g2dSurface->base.planes[0] = buffer->physical[0] + buffer->gpuBaseAddr;
35@@ -333,9 +332,9 @@ get_g2dSurface(gcsWL_VIV_BUFFER *buffer, struct g2d_surfaceEx *g2dSurface)
36 g2dSurface->base.top = 0;
37 g2dSurface->base.right = buffer->width;
38 g2dSurface->base.bottom = buffer->height;
39- g2dSurface->base.stride = width;
40- g2dSurface->base.width = width;
41- g2dSurface->base.height = height;
42+ g2dSurface->base.stride = buffer->alignedWidth;
43+ g2dSurface->base.width = buffer->width;
44+ g2dSurface->base.height = buffer->height;
45 g2dSurface->base.rot = G2D_ROTATION_0;
46 }
47
48@@ -821,7 +820,7 @@ g2d_renderer_attach_shm(struct weston_surface *es, struct weston_buffer *buffer,
49 gs->g2d_surface.base.right = buffer->width;
50 gs->g2d_surface.base.bottom = buffer->height;
51 gs->g2d_surface.base.stride = alignedWidth;
52- gs->g2d_surface.base.width = alignedWidth;
53+ gs->g2d_surface.base.width = buffer->width;
54 gs->g2d_surface.base.height = buffer->height;
55 gs->g2d_surface.base.rot = G2D_ROTATION_0;
56 gs->g2d_surface.base.clrcolor = 0xFF400000;
57@@ -1079,7 +1078,7 @@ get_G2dSurface_from_screeninfo(struct fb_screeninfo *info, struct g2d_surfaceEx*
58 g2dSurface->base.top = 0;
59 g2dSurface->base.right = info->x_resolution;
60 g2dSurface->base.bottom = info->y_resolution;
61- g2dSurface->base.stride = info->x_resolution;
62+ g2dSurface->base.stride = info->stride;
63 g2dSurface->base.width = info->x_resolution;
64 g2dSurface->base.height = info->y_resolution;
65 g2dSurface->base.format = info->pixel_format;
66@@ -1119,6 +1118,7 @@ fb_query_screen_info(struct g2d_output_state *output, int fd,
67 info->y_resolution = varinfo->yres;
68 info->physical = fixinfo->smem_start;
69 info->buffer_length = fixinfo->smem_len;
70+ info->stride = fixinfo->line_length / (varinfo->bits_per_pixel >> 3);
71 calculate_g2d_format(varinfo, &info->pixel_format);
72
73 if (info->pixel_format < 0) {
74--
751.9.1
76