diff options
author | Tom Rini <trini@konsulko.com> | 2017-09-22 17:28:03 -0400 |
---|---|---|
committer | Jan-Simon Moeller <jsmoeller@linuxfoundation.org> | 2017-09-24 16:31:47 +0000 |
commit | 6a5e107b07e576ee455f28b30f023eda00bb13ff (patch) | |
tree | 34437a6925cddaedfc7de9c2e8c6bda916de86c9 /meta-agl-bsp/meta-ti/recipes-arago/weston/weston/0001-compositor-drm-support-RGB565-with-pixman-renderer.patch | |
parent | e64dbfecda49032aea78af41adb0d7ac2f846dfa (diff) |
meta-agl-bsp: meta-ti: Rework Weston patches for 2.0
We can drop the changes for the compositor to support RGB565 as this is now
upstream. The other compositor patch is no longer relevant. The soc
performance patch needs additional work to link but is also not required for
overall functionality so leave that broken. For the rest of the patches we
just need to make minor changes about the location of the source files now as
the code has reorganized since the patches were written.
Bug-AGL: SPEC-908
Change-Id: I7034219510821b8f720328318e3e560783cf16d6
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-on: https://gerrit.automotivelinux.org/gerrit/11019
Reviewed-by: Scott Murray <scott.murray@konsulko.com>
Reviewed-by: Matt Ranostay <matt.ranostay@konsulko.com>
Tested-by: Jenkins Job builder account <agl-jobbuilder@automotivelinux.org>
ci-image-build: Jenkins Job builder account <agl-jobbuilder@automotivelinux.org>
Reviewed-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org>
Diffstat (limited to 'meta-agl-bsp/meta-ti/recipes-arago/weston/weston/0001-compositor-drm-support-RGB565-with-pixman-renderer.patch')
-rw-r--r-- | meta-agl-bsp/meta-ti/recipes-arago/weston/weston/0001-compositor-drm-support-RGB565-with-pixman-renderer.patch | 125 |
1 files changed, 0 insertions, 125 deletions
diff --git a/meta-agl-bsp/meta-ti/recipes-arago/weston/weston/0001-compositor-drm-support-RGB565-with-pixman-renderer.patch b/meta-agl-bsp/meta-ti/recipes-arago/weston/weston/0001-compositor-drm-support-RGB565-with-pixman-renderer.patch deleted file mode 100644 index 0d77f529e..000000000 --- a/meta-agl-bsp/meta-ti/recipes-arago/weston/weston/0001-compositor-drm-support-RGB565-with-pixman-renderer.patch +++ /dev/null @@ -1,125 +0,0 @@ -From 91b452fa515b94928d32af6e1b1b0405469747fd Mon Sep 17 00:00:00 2001 -From: Tomi Valkeinen <tomi.valkeinen@ti.com> -Date: Wed, 8 Mar 2017 13:05:38 -0500 -Subject: [PATCH] compositor-drm: support RGB565 with pixman renderer - -At the moment only XRGB8888 is supported when using pixman renderer. -This patch adds support also for RGB565. - -Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> -Reviewed-by: Daniel Stone <daniels@collabora.com> -Reviewed-by: Derek Foreman <derekf@osg.samsung.com> -Signed-off-by: Daniel Stone <daniels@collabora.com> ---- - src/compositor-drm.c | 62 ++++++++++++++++++++++++++++++++++++++++++++++------ - 1 file changed, 55 insertions(+), 7 deletions(-) - -diff --git a/src/compositor-drm.c b/src/compositor-drm.c -index fd89627..443b69a 100644 ---- a/src/compositor-drm.c -+++ b/src/compositor-drm.c -@@ -262,10 +262,12 @@ drm_fb_destroy_callback(struct gbm_bo *bo, void *data) - } - - static struct drm_fb * --drm_fb_create_dumb(struct drm_backend *b, unsigned width, unsigned height) -+drm_fb_create_dumb(struct drm_backend *b, unsigned width, unsigned height, -+ uint32_t format) - { - struct drm_fb *fb; - int ret; -+ uint32_t bpp, depth; - - struct drm_mode_create_dumb create_arg; - struct drm_mode_destroy_dumb destroy_arg; -@@ -275,8 +277,20 @@ drm_fb_create_dumb(struct drm_backend *b, unsigned width, unsigned height) - if (!fb) - return NULL; - -+ switch (format) { -+ case GBM_FORMAT_XRGB8888: -+ bpp = 32; -+ depth = 24; -+ break; -+ case GBM_FORMAT_RGB565: -+ bpp = depth = 16; -+ break; -+ default: -+ return NULL; -+ } -+ - memset(&create_arg, 0, sizeof create_arg); -- create_arg.bpp = 32; -+ create_arg.bpp = bpp; - create_arg.width = width; - create_arg.height = height; - -@@ -289,8 +303,29 @@ drm_fb_create_dumb(struct drm_backend *b, unsigned width, unsigned height) - fb->size = create_arg.size; - fb->fd = b->drm.fd; - -- ret = drmModeAddFB(b->drm.fd, width, height, 24, 32, -- fb->stride, fb->handle, &fb->fb_id); -+ ret = -1; -+ -+ if (!b->no_addfb2) { -+ uint32_t handles[4], pitches[4], offsets[4]; -+ -+ handles[0] = fb->handle; -+ pitches[0] = fb->stride; -+ offsets[0] = 0; -+ -+ ret = drmModeAddFB2(b->drm.fd, width, height, -+ format, handles, pitches, offsets, -+ &fb->fb_id, 0); -+ if (ret) { -+ weston_log("addfb2 failed: %m\n"); -+ b->no_addfb2 = 1; -+ } -+ } -+ -+ if (ret) { -+ ret = drmModeAddFB(b->drm.fd, width, height, depth, bpp, -+ fb->stride, fb->handle, &fb->fb_id); -+ } -+ - if (ret) - goto err_bo; - -@@ -1879,17 +1914,30 @@ drm_output_init_pixman(struct drm_output *output, struct drm_backend *b) - { - int w = output->base.current_mode->width; - int h = output->base.current_mode->height; -+ uint32_t format = output->gbm_format; -+ uint32_t pixman_format; - unsigned int i; - -- /* FIXME error checking */ -+ switch (format) { -+ case GBM_FORMAT_XRGB8888: -+ pixman_format = PIXMAN_x8r8g8b8; -+ break; -+ case GBM_FORMAT_RGB565: -+ pixman_format = PIXMAN_r5g6b5; -+ break; -+ default: -+ weston_log("Unsupported pixman format 0x%x\n", format); -+ return -1; -+ } - -+ /* FIXME error checking */ - for (i = 0; i < ARRAY_LENGTH(output->dumb); i++) { -- output->dumb[i] = drm_fb_create_dumb(b, w, h); -+ output->dumb[i] = drm_fb_create_dumb(b, w, h, format); - if (!output->dumb[i]) - goto err; - - output->image[i] = -- pixman_image_create_bits(PIXMAN_x8r8g8b8, w, h, -+ pixman_image_create_bits(pixman_format, w, h, - output->dumb[i]->map, - output->dumb[i]->stride); - if (!output->image[i]) --- -1.9.1 - |