FreeBSD Bugzilla – Attachment 253141 Details for
Bug 281107
x11-toolkits/gtk40: Add support for DMABUF
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
The patch for the gtk port
0096-x11-toolkits-gtk40-DMABUF-support.patch (text/plain), 4.89 KB, created by
shamaz.mazum
on 2024-08-28 07:09:51 UTC
(
hide
)
Description:
The patch for the gtk port
Filename:
MIME Type:
Creator:
shamaz.mazum
Created:
2024-08-28 07:09:51 UTC
Size:
4.89 KB
patch
obsolete
>From 9874a1e423320d0efb49615872835e7435a69bf7 Mon Sep 17 00:00:00 2001 >From: Vasily Postnikov <shamaz.mazum@gmail.com> >Date: Tue, 27 Aug 2024 21:37:53 +0300 >Subject: [PATCH 96/96] x11-toolkits/gtk40: DMABUF support > >--- > x11-toolkits/gtk40/Makefile | 5 +++- > .../gtk40/files/patch-dma-buf-compat.h | 25 +++++++++++++++++++ > .../gtk40/files/patch-gdk_gdkdmabuf.c | 12 +++++++++ > .../files/patch-gsk_gpu_gskgpudownloadop.c | 11 ++++++++ > .../files/patch-gsk_gpu_gskvulkanimage.c | 11 ++++++++ > x11-toolkits/gtk40/files/patch-meson.build | 11 ++++++++ > 6 files changed, 74 insertions(+), 1 deletion(-) > create mode 100644 x11-toolkits/gtk40/files/patch-dma-buf-compat.h > create mode 100644 x11-toolkits/gtk40/files/patch-gdk_gdkdmabuf.c > create mode 100644 x11-toolkits/gtk40/files/patch-gsk_gpu_gskgpudownloadop.c > create mode 100644 x11-toolkits/gtk40/files/patch-gsk_gpu_gskvulkanimage.c > create mode 100644 x11-toolkits/gtk40/files/patch-meson.build > >diff --git a/x11-toolkits/gtk40/Makefile b/x11-toolkits/gtk40/Makefile >index 04ebc8e3351e..833281e817eb 100644 >--- a/x11-toolkits/gtk40/Makefile >+++ b/x11-toolkits/gtk40/Makefile >@@ -1,5 +1,6 @@ > PORTNAME= gtk > PORTVERSION= 4.14.4 >+PORTREVISION= 1 > CATEGORIES= x11-toolkits > MASTER_SITES= GNOME > PKGNAMESUFFIX= 4 >@@ -13,7 +14,9 @@ LICENSE= LGPL20 > > PORTSCOUT= limit:1,even > >-BUILD_DEPENDS= sassc>0:textproc/sassc >+# libdrm is only for its headers >+BUILD_DEPENDS= sassc>0:textproc/sassc \ >+ libdrm>0:graphics/libdrm > LIB_DEPENDS= libepoxy.so:graphics/libepoxy \ > libpng.so:graphics/png \ > libtiff.so:graphics/tiff \ >diff --git a/x11-toolkits/gtk40/files/patch-dma-buf-compat.h b/x11-toolkits/gtk40/files/patch-dma-buf-compat.h >new file mode 100644 >index 000000000000..bd3727dc5103 >--- /dev/null >+++ b/x11-toolkits/gtk40/files/patch-dma-buf-compat.h >@@ -0,0 +1,25 @@ >+--- dma-buf-compat.h.orig 2024-08-27 18:15:44 UTC >++++ dma-buf-compat.h >+@@ -0,0 +1,22 @@ >++#ifdef __linux__ >++#include <linux/dma-buf.h> >++#else >++typedef uint64_t __u64; >++ >++// From https://github.com/evadot/drm-subtree or https://reviews.freebsd.org/D23085 >++struct dma_buf_sync >++{ >++ __u64 flags; >++}; >++ >++#define DMA_BUF_SYNC_READ (1 << 0) >++#define DMA_BUF_SYNC_WRITE (2 << 0) >++#define DMA_BUF_SYNC_RW (DMA_BUF_SYNC_READ | DMA_BUF_SYNC_WRITE) >++#define DMA_BUF_SYNC_START (0 << 2) >++#define DMA_BUF_SYNC_END (1 << 2) >++#define DMA_BUF_SYNC_VALID_FLAGS_MASK \ >++ (DMA_BUF_SYNC_RW | DMA_BUF_SYNC_END) >++ >++#define DMA_BUF_BASE 'b' >++#define DMA_BUF_IOCTL_SYNC _IOW(DMA_BUF_BASE, 0, struct dma_buf_sync) >++#endif >diff --git a/x11-toolkits/gtk40/files/patch-gdk_gdkdmabuf.c b/x11-toolkits/gtk40/files/patch-gdk_gdkdmabuf.c >new file mode 100644 >index 000000000000..c67a2d69b563 >--- /dev/null >+++ b/x11-toolkits/gtk40/files/patch-gdk_gdkdmabuf.c >@@ -0,0 +1,12 @@ >+--- gdk/gdkdmabuf.c.orig 2024-08-27 18:17:03 UTC >++++ gdk/gdkdmabuf.c >+@@ -28,8 +28,8 @@ >+ #ifdef HAVE_DMABUF >+ #include <sys/mman.h> >+ #include <sys/ioctl.h> >+-#include <linux/dma-buf.h> >+ #include <epoxy/egl.h> >++#include "../dma-buf-compat.h" >+ >+ typedef struct _GdkDrmFormatInfo GdkDrmFormatInfo; >+ >diff --git a/x11-toolkits/gtk40/files/patch-gsk_gpu_gskgpudownloadop.c b/x11-toolkits/gtk40/files/patch-gsk_gpu_gskgpudownloadop.c >new file mode 100644 >index 000000000000..a33e8ac3368e >--- /dev/null >+++ b/x11-toolkits/gtk40/files/patch-gsk_gpu_gskgpudownloadop.c >@@ -0,0 +1,11 @@ >+--- gsk/gpu/gskgpudownloadop.c.orig 2024-08-27 18:18:39 UTC >++++ gsk/gpu/gskgpudownloadop.c >+@@ -16,7 +16,7 @@ >+ #include "gdk/gdkglcontextprivate.h" >+ >+ #ifdef HAVE_DMABUF >+-#include <linux/dma-buf.h> >++#include "../../dma-buf-compat.h" >+ #endif >+ >+ typedef struct _GskGpuDownloadOp GskGpuDownloadOp; >diff --git a/x11-toolkits/gtk40/files/patch-gsk_gpu_gskvulkanimage.c b/x11-toolkits/gtk40/files/patch-gsk_gpu_gskvulkanimage.c >new file mode 100644 >index 000000000000..17338b95e694 >--- /dev/null >+++ b/x11-toolkits/gtk40/files/patch-gsk_gpu_gskvulkanimage.c >@@ -0,0 +1,11 @@ >+--- gsk/gpu/gskvulkanimage.c.orig 2024-08-27 18:18:26 UTC >++++ gsk/gpu/gskvulkanimage.c >+@@ -15,7 +15,7 @@ >+ #include <fcntl.h> >+ #include <string.h> >+ #ifdef HAVE_DMABUF >+-#include <linux/dma-buf.h> >++#include <../../dma-buf-compat.h> >+ #endif >+ >+ struct _GskVulkanImage >diff --git a/x11-toolkits/gtk40/files/patch-meson.build b/x11-toolkits/gtk40/files/patch-meson.build >new file mode 100644 >index 000000000000..b09b6e24be71 >--- /dev/null >+++ b/x11-toolkits/gtk40/files/patch-meson.build >@@ -0,0 +1,11 @@ >+--- meson.build.orig 2024-08-27 18:19:59 UTC >++++ meson.build >+@@ -636,7 +636,7 @@ cdata.set('HAVE_DRM_FOURCC_H', libdrm_dep.found()) >+ libdrm_dep = libdrm_dep.partial_dependency(includes: true, compile_args: true) >+ cdata.set('HAVE_DRM_FOURCC_H', libdrm_dep.found()) >+ >+-cdata.set('HAVE_DMABUF', cc.has_header('linux/dma-buf.h')) >++cdata.set('HAVE_DMABUF', true) >+ >+ cloudproviders_dep = dependency('cloudproviders', >+ required: get_option('cloudproviders'), >-- >2.46.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 281107
: 253141