diff options
| -rw-r--r-- | recipes-graphics/wayland/weston/0018-MGS-2397-ccc-Enable-double-buffer-with-fb_pan_displa.patch | 48 | ||||
| -rw-r--r-- | recipes-graphics/wayland/weston_%.bbappend | 1 |
2 files changed, 49 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 000000000..4ce187102 --- /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 | |||
diff --git a/recipes-graphics/wayland/weston_%.bbappend b/recipes-graphics/wayland/weston_%.bbappend index aa13f27df..8a47ba52f 100644 --- a/recipes-graphics/wayland/weston_%.bbappend +++ b/recipes-graphics/wayland/weston_%.bbappend | |||
| @@ -16,6 +16,7 @@ SRC_URI_append_imxgpu3d = " \ | |||
| 16 | file://0015-MGS-2221-imx-171-Fix-weston-build-failed.patch \ | 16 | file://0015-MGS-2221-imx-171-Fix-weston-build-failed.patch \ |
| 17 | file://0016-Link-compositor-to-egl.patch \ | 17 | file://0016-Link-compositor-to-egl.patch \ |
| 18 | file://0017-MGS-2343-ccc-XWLD-T3DStressTest_Wayland-displays-abn.patch \ | 18 | file://0017-MGS-2343-ccc-XWLD-T3DStressTest_Wayland-displays-abn.patch \ |
| 19 | file://0018-MGS-2397-ccc-Enable-double-buffer-with-fb_pan_displa.patch \ | ||
| 19 | " | 20 | " |
| 20 | 21 | ||
| 21 | # The 'egl' configuration of weston requires gles support, and consideration | 22 | # The 'egl' configuration of weston requires gles support, and consideration |
