diff options
-rw-r--r-- | recipes-graphics/wayland/weston/0014-MGS-1987-Get-stride-from-the-FB-buffe.patch | 76 | ||||
-rw-r--r-- | recipes-graphics/wayland/weston_%.bbappend | 1 |
2 files changed, 77 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 @@ | |||
1 | From 735e58c6066fe1148d803168c6241a4d8cb5c973 Mon Sep 17 00:00:00 2001 | ||
2 | From: "yong.gan" <yong.gan@nxp.com> | ||
3 | Date: Wed, 6 Jul 2016 08:28:18 +0800 | ||
4 | Subject: [PATCH] MGS-1987: Get stride from the FB buffe. | ||
5 | |||
6 | Fix the stride setting error in the fbinfo. | ||
7 | |||
8 | Date: Jul 6, 2016 | ||
9 | Signed-off-by: Yong Gan <yong.gan@nxp.com> | ||
10 | --- | ||
11 | src/g2d-renderer.c | 14 +++++++------- | ||
12 | 1 file changed, 7 insertions(+), 7 deletions(-) | ||
13 | |||
14 | diff --git a/src/g2d-renderer.c b/src/g2d-renderer.c | ||
15 | index 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 | -- | ||
75 | 1.9.1 | ||
76 | |||
diff --git a/recipes-graphics/wayland/weston_%.bbappend b/recipes-graphics/wayland/weston_%.bbappend index f0074288..b265016e 100644 --- a/recipes-graphics/wayland/weston_%.bbappend +++ b/recipes-graphics/wayland/weston_%.bbappend | |||
@@ -12,6 +12,7 @@ SRC_URI_append_imxgpu2d = " \ | |||
12 | file://0011-MGS-1724-xwld-G2D-compositor-build-failed-in-slevk-b.patch \ | 12 | file://0011-MGS-1724-xwld-G2D-compositor-build-failed-in-slevk-b.patch \ |
13 | file://0012-MGS-1783-xwld-Add-clone-mode-support-for-multi-displ.patch \ | 13 | file://0012-MGS-1783-xwld-Add-clone-mode-support-for-multi-displ.patch \ |
14 | file://0013-MGS-1945-Use-common-API-to-support-G2d-compositor.patch \ | 14 | file://0013-MGS-1945-Use-common-API-to-support-G2d-compositor.patch \ |
15 | file://0014-MGS-1987-Get-stride-from-the-FB-buffe.patch \ | ||
15 | " | 16 | " |
16 | 17 | ||
17 | PACKAGECONFIG_IMX_TO_APPEND = "" | 18 | PACKAGECONFIG_IMX_TO_APPEND = "" |