Add Wayland with GPU support.
Cherry-pick from http://192.168.110.45/sdk/buildroot/-/commit/ed70e2b79cbc7a504792899e2cd3577777fd54bd
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
From 0f85e6d2e358c530dd1136d71bfd306cd64c4305 Mon Sep 17 00:00:00 2001
|
||||
From: Brendan King <Brendan.King@imgtec.com>
|
||||
Date: Tue, 4 Sep 2018 14:59:09 +0100
|
||||
Subject: [PATCH 1/2] backend-drm: disable "bo geometry out of bounds" message
|
||||
|
||||
The message was being printed repeatedly whilst running an opaque
|
||||
windowed application, because the application wasn't within the
|
||||
framebuffer dimension limits.
|
||||
---
|
||||
libweston/backend-drm/fb.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/libweston/backend-drm/fb.c b/libweston/backend-drm/fb.c
|
||||
index e7349c4b..da781015 100644
|
||||
--- a/libweston/backend-drm/fb.c
|
||||
+++ b/libweston/backend-drm/fb.c
|
||||
@@ -343,7 +343,9 @@ drm_fb_get_from_dmabuf(struct linux_dmabuf_buffer *dmabuf,
|
||||
fb->width > backend->max_width ||
|
||||
backend->min_height > fb->height ||
|
||||
fb->height > backend->max_height) {
|
||||
+#if 0
|
||||
weston_log("bo geometry out of bounds\n");
|
||||
+#endif
|
||||
goto err_free;
|
||||
}
|
||||
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
From 4a6e5e4ac0a2c63eb78e442bc34a0ee6a0f470d4 Mon Sep 17 00:00:00 2001
|
||||
From: Brendan King <Brendan.King@imgtec.com>
|
||||
Date: Thu, 15 Apr 2021 19:30:02 +0100
|
||||
Subject: [PATCH 3/3] libweston: reduce checks for dmabufs with DRM modifiers
|
||||
|
||||
If the buffer associated with a dmabuf has a DRM modifier, then
|
||||
checking the stride and stride*height against the size of the
|
||||
dambuf may not make sense, so skip the check.
|
||||
|
||||
IMG lossy framebuffers have a smaller size than that of the
|
||||
equivalent linear framebuffer.
|
||||
---
|
||||
libweston/linux-dmabuf.c | 33 ++++++++++++++++++---------------
|
||||
1 file changed, 18 insertions(+), 15 deletions(-)
|
||||
|
||||
diff --git a/libweston/linux-dmabuf.c b/libweston/linux-dmabuf.c
|
||||
index 796e9826..0bbfe480 100644
|
||||
--- a/libweston/linux-dmabuf.c
|
||||
+++ b/libweston/linux-dmabuf.c
|
||||
@@ -240,22 +240,25 @@ params_create_common(struct wl_client *client,
|
||||
goto err_out;
|
||||
}
|
||||
|
||||
- if (buffer->attributes.offset[i] + buffer->attributes.stride[i] > size) {
|
||||
- wl_resource_post_error(params_resource,
|
||||
- ZWP_LINUX_BUFFER_PARAMS_V1_ERROR_OUT_OF_BOUNDS,
|
||||
- "invalid stride %i for plane %i",
|
||||
- buffer->attributes.stride[i], i);
|
||||
- goto err_out;
|
||||
- }
|
||||
+ if (buffer->attributes.modifier[i] == DRM_FORMAT_MOD_INVALID ||
|
||||
+ buffer->attributes.modifier[i] == DRM_FORMAT_MOD_LINEAR) {
|
||||
+ if (buffer->attributes.offset[i] + buffer->attributes.stride[i] > size) {
|
||||
+ wl_resource_post_error(params_resource,
|
||||
+ ZWP_LINUX_BUFFER_PARAMS_V1_ERROR_OUT_OF_BOUNDS,
|
||||
+ "invalid stride %i for plane %i",
|
||||
+ buffer->attributes.stride[i], i);
|
||||
+ goto err_out;
|
||||
+ }
|
||||
|
||||
- /* Only valid for first plane as other planes might be
|
||||
- * sub-sampled according to fourcc format */
|
||||
- if (i == 0 &&
|
||||
- buffer->attributes.offset[i] + buffer->attributes.stride[i] * height > size) {
|
||||
- wl_resource_post_error(params_resource,
|
||||
- ZWP_LINUX_BUFFER_PARAMS_V1_ERROR_OUT_OF_BOUNDS,
|
||||
- "invalid buffer stride or height for plane %i", i);
|
||||
- goto err_out;
|
||||
+ /* Only valid for first plane as other planes might be
|
||||
+ * sub-sampled according to fourcc format */
|
||||
+ if (i == 0 &&
|
||||
+ buffer->attributes.offset[i] + buffer->attributes.stride[i] * height > size) {
|
||||
+ wl_resource_post_error(params_resource,
|
||||
+ ZWP_LINUX_BUFFER_PARAMS_V1_ERROR_OUT_OF_BOUNDS,
|
||||
+ "invalid buffer stride or height for plane %i", i);
|
||||
+ goto err_out;
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -40,11 +40,11 @@ config BR2_PACKAGE_WESTON_DEFAULT_FBDEV
|
||||
|
||||
config BR2_PACKAGE_WESTON_DEFAULT_DRM
|
||||
bool "drm"
|
||||
depends on BR2_PACKAGE_MESA3D_OPENGL_EGL || BR2_PACKAGE_IMX_GPU_VIV_OUTPUT_WL
|
||||
depends on BR2_PACKAGE_MESA3D_OPENGL_EGL || BR2_PACKAGE_IMX_GPU_VIV_OUTPUT_WL || BR2_PACKAGE_IMG_GPU_POWERVR_OUTPUT_WL
|
||||
select BR2_PACKAGE_WESTON_DRM
|
||||
|
||||
comment "drm backend needs mesa3d w/ EGL driver"
|
||||
depends on !BR2_PACKAGE_MESA3D_OPENGL_EGL && !BR2_PACKAGE_IMX_GPU_VIV_OUTPUT_WL
|
||||
depends on !BR2_PACKAGE_MESA3D_OPENGL_EGL && !BR2_PACKAGE_IMX_GPU_VIV_OUTPUT_WL && !BR2_PACKAGE_IMG_GPU_POWERVR_OUTPUT_WL
|
||||
|
||||
config BR2_PACKAGE_WESTON_DEFAULT_X11
|
||||
bool "X11"
|
||||
|
||||
Reference in New Issue
Block a user