diff options
author | Tom Hochstein <tom.hochstein@nxp.com> | 2017-01-16 13:52:23 -0600 |
---|---|---|
committer | Otavio Salvador <otavio@ossystems.com.br> | 2017-01-23 16:55:31 -0200 |
commit | 12a51ab3c33a9d27f21b6f5975382d1501317324 (patch) | |
tree | 8cac8fabc7200be6c5f72dc6d6f2e40c07194db0 /recipes-graphics/wayland/weston | |
parent | 1d4e45fff88b8fd43681e31dc30b1edff3fa0c10 (diff) | |
download | meta-freescale-12a51ab3c33a9d27f21b6f5975382d1501317324.tar.gz |
weston: Enable double buffer with fb_pan_display for weston compositor
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>
Diffstat (limited to 'recipes-graphics/wayland/weston')
-rw-r--r-- | recipes-graphics/wayland/weston/0018-MGS-2397-ccc-Enable-double-buffer-with-fb_pan_displa.patch | 48 |
1 files changed, 48 insertions, 0 deletions
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 00000000..4ce18710 --- /dev/null +++ b/recipes-graphics/wayland/weston/0018-MGS-2397-ccc-Enable-double-buffer-with-fb_pan_displa.patch | |||
@@ -0,0 +1,48 @@ | |||
1 | From 270319565a07f7ceeb12fac1c267d0dd9ebf2d57 Mon Sep 17 00:00:00 2001 | ||
2 | From: Meng Mingming <mingming.meng@nxp.com> | ||
3 | Date: Wed, 16 Nov 2016 15:05:51 +0800 | ||
4 | Subject: [PATCH 17/17] MGS-2397 [#ccc] Enable double buffer with | ||
5 | fb_pan_display for weston compositor | ||
6 | |||
7 | Refine offset calculation. | ||
8 | |||
9 | Upstream-Status: Inappropriate [i.MX specific] | ||
10 | |||
11 | Date: Nov 16, 2016 | ||
12 | Signed-off-by: Meng Mingming <mingming.meng@nxp.com> | ||
13 | --- | ||
14 | src/g2d-renderer.c | 4 +++- | ||
15 | 1 file changed, 3 insertions(+), 1 deletion(-) | ||
16 | |||
17 | diff --git a/src/g2d-renderer.c b/src/g2d-renderer.c | ||
18 | index 41c4d9e..c30aa62 100644 | ||
19 | --- a/src/g2d-renderer.c | ||
20 | +++ b/src/g2d-renderer.c | ||
21 | @@ -78,6 +78,7 @@ struct fb_screeninfo { | ||
22 | size_t buffer_length; /* length of frame buffer memory in bytes */ | ||
23 | size_t physical; | ||
24 | size_t stride; | ||
25 | + size_t stride_bytes; | ||
26 | enum g2d_format pixel_format; /* frame buffer pixel format */ | ||
27 | int fb_fd; | ||
28 | }; | ||
29 | @@ -1136,6 +1137,7 @@ fb_query_screen_info(struct g2d_output_state *output, int fd, | ||
30 | info->physical = fixinfo->smem_start; | ||
31 | info->buffer_length = fixinfo->smem_len; | ||
32 | info->stride = fixinfo->line_length / (varinfo->bits_per_pixel >> 3); | ||
33 | + info->stride_bytes = fixinfo->line_length; | ||
34 | calculate_g2d_format(varinfo, &info->pixel_format); | ||
35 | |||
36 | if (info->pixel_format < 0) { | ||
37 | @@ -1205,7 +1207,7 @@ g2d_renderer_surface_create(struct g2d_output_state *go, struct g2d_renderer *gr | ||
38 | return -1; | ||
39 | } | ||
40 | go->renderSurf = zalloc(sizeof(struct g2d_surfaceEx) * go->nNumBuffers); | ||
41 | - offset = go->fb_info.buffer_length/go->nNumBuffers; | ||
42 | + offset = go->fb_info.stride_bytes * go->fb_info.y_resolution; | ||
43 | for(i = 0; i < go->nNumBuffers; i++) | ||
44 | { | ||
45 | get_G2dSurface_from_screeninfo(&go->fb_info, &go->renderSurf[i]); | ||
46 | -- | ||
47 | 2.7.4 | ||
48 | |||