diff options
author | takeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp> | 2020-11-02 11:07:33 +0900 |
---|---|---|
committer | takeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp> | 2020-11-02 11:07:33 +0900 |
commit | 1c7d6584a7811b7785ae5c1e378f14b5ba0971cf (patch) | |
tree | cd70a267a5ef105ba32f200aa088e281fbd85747 /bsp/meta-raspberrypi/recipes-graphics/mesa | |
parent | 4204309872da5cb401cbb2729d9e2d4869a87f42 (diff) |
basesystem-jjsandbox/ToshikazuOhiwa/master-jj
recipes
Diffstat (limited to 'bsp/meta-raspberrypi/recipes-graphics/mesa')
3 files changed, 54 insertions, 3 deletions
diff --git a/bsp/meta-raspberrypi/recipes-graphics/mesa/files/0001-dri2-query-dma-buf-modifiers.patch b/bsp/meta-raspberrypi/recipes-graphics/mesa/files/0001-dri2-query-dma-buf-modifiers.patch new file mode 100644 index 00000000..0bda0145 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-graphics/mesa/files/0001-dri2-query-dma-buf-modifiers.patch @@ -0,0 +1,43 @@ +mesa: querying dma_buf_modifiers for specific formats + +mesa wl_drm protocol is the backend for wayland server side which requires +the dmabuf modifiers for some DRM formats on specific devices like RPI. +Currently there is no support of giving any dmabuf modifiers on wl_drm protocol. +This dma_buf modifiers allows EGL implementations to add extra attributes +to drm_fourcc format. + +Upstream-Status: Pending + +Signed-off-by: Balaji Velmurugan <balaji.velmurugan@ltts.com> + +--- a/src/gallium/state_trackers/dri/dri2.c ++++ b/src/gallium/state_trackers/dri/dri2.c +@@ -1366,14 +1366,28 @@ dri2_from_planar(__DRIimage *image, int + return img; + } + ++static boolean ++dri2_query_dma_buf_modifiers(__DRIscreen *_screen, int fourcc, int max, ++ uint64_t *modifiers, unsigned int *external_only, ++ int *count); + static __DRIimage * + dri2_from_fds(__DRIscreen *screen, int width, int height, int fourcc, + int *fds, int num_fds, int *strides, int *offsets, + void *loaderPrivate) + { ++ uint64_t modifier= DRM_FORMAT_MOD_INVALID; ++ unsigned int external_only= 0; ++ int count= 0; ++ boolean result; ++ result= dri2_query_dma_buf_modifiers( screen, fourcc, 1, &modifier, &external_only, &count); ++ return dri2_create_image_from_fd(screen, width, height, fourcc, ++ modifier, fds, num_fds, ++ strides, offsets, NULL, loaderPrivate); ++ #if 0 + return dri2_create_image_from_fd(screen, width, height, fourcc, + DRM_FORMAT_MOD_INVALID, fds, num_fds, + strides, offsets, NULL, loaderPrivate); ++ #endif + } + + static boolean diff --git a/bsp/meta-raspberrypi/recipes-graphics/mesa/mesa-gl_%.bbappend b/bsp/meta-raspberrypi/recipes-graphics/mesa/mesa-gl_%.bbappend index 7897125b..08ec1c59 100644 --- a/bsp/meta-raspberrypi/recipes-graphics/mesa/mesa-gl_%.bbappend +++ b/bsp/meta-raspberrypi/recipes-graphics/mesa/mesa-gl_%.bbappend @@ -1 +1,6 @@ PACKAGECONFIG_append_rpi = " gbm" +PROVIDES_append_rpi = " virtual/libgbm" + +do_install_append_rpi() { + rm -rf ${D}${includedir}/KHR/khrplatform.h +} diff --git a/bsp/meta-raspberrypi/recipes-graphics/mesa/mesa_%.bbappend b/bsp/meta-raspberrypi/recipes-graphics/mesa/mesa_%.bbappend index 8152cc3e..d3435e72 100644 --- a/bsp/meta-raspberrypi/recipes-graphics/mesa/mesa_%.bbappend +++ b/bsp/meta-raspberrypi/recipes-graphics/mesa/mesa_%.bbappend @@ -1,7 +1,10 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/files:" # DRI3 note: # With oe-core commit 8509e2e1a87578882b71948ccef3b50ccf1228b3 dri3 is set # as default. To state out clearly that Raspi needs dri3 and to avoid surprises # in case oe-core changes this default, we set dri3 explicitly. -PACKAGECONFIG_append_rpi = " gallium ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'x11 dri3', '', d)}" -GALLIUMDRIVERS_append_rpi = ",vc4" -DRIDRIVERS_rpi = "" + +SRC_URI_append_rpi = " file://0001-dri2-query-dma-buf-modifiers.patch " + +PACKAGECONFIG_append_rpi = " gallium vc4 v3d kmsro ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'x11 dri3', '', d)}" +DRIDRIVERS_class-target_rpi = "" |