From nobody Tue Aug 27 19:27:55 2024 X-Original-To: freebsd-x11@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Wtcyd6hy5z5JmQ5 for ; Tue, 27 Aug 2024 19:28:09 +0000 (UTC) (envelope-from shamaz.mazum@gmail.com) Received: from mail-lf1-x12d.google.com (mail-lf1-x12d.google.com [IPv6:2a00:1450:4864:20::12d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Wtcyd26YYz4ltk for ; Tue, 27 Aug 2024 19:28:09 +0000 (UTC) (envelope-from shamaz.mazum@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20230601 header.b=XJerc3Cu; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of shamaz.mazum@gmail.com designates 2a00:1450:4864:20::12d as permitted sender) smtp.mailfrom=shamaz.mazum@gmail.com Received: by mail-lf1-x12d.google.com with SMTP id 2adb3069b0e04-533488ffaf7so8004614e87.0 for ; Tue, 27 Aug 2024 12:28:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724786887; x=1725391687; darn=freebsd.org; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=NEuOxMfAUbVzHFZ2MVV4rWIGfjWUtoSS9cO/1cJpNus=; b=XJerc3CuhBvlrhCldqRnZGMz9pudI5bpZuFVZe7p77LWvVpkdHTEtwhcYEOuVFCzGP eZBX1Oa9fRS5q1ScehrknEbWqat+osflY+PXeoztTsumkjlMcyDthGQbFnkny0MWXKt4 9xsMLTCozHZLYJHz93Vm4Y+F4eT8HfDtg+4xpVbE4cV+3XVHzu/JajfxB+OWE159C8jm lroSEA0w4xpmz3rvyVz+I+rqy0B/SMBJhOOoT6Xkzl2s6/DrEN43kNe1sQu8dS3HOvFy 4nrSUHotm+MjdQvau+E3Klq1DUtMNRVGBBsNDRe/AHEf1GBnwOnzUOjZ1rJ5K7lwuAKb J0vA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724786887; x=1725391687; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=NEuOxMfAUbVzHFZ2MVV4rWIGfjWUtoSS9cO/1cJpNus=; b=CfCPpnsSYxk7rk0whi7CyiFSQwkNW/TMXncBd4S8zBWwFwAXCn8oX2dcjqsExYCt2N eQr4mhQIZcTPTa5i+cr6tEbij78BWJZVdJT5w30oprjzZCIM7d/ImuS5WEnIYKS9OeK7 tz5rVcSLCDvNHmuZut5l/zHzoQX2r/keEWpcHP462icVfzDXd0u2/o0LgE/CdtF5Gid/ kFGCozAhJAuc7tjmSQSsRuaHy7SLZnFMiE8Au7gABcGZxdq9oNe6MSdpPes7keqCQYIM 1ntjQsQgG9JsiYa3Ld82DuCmYmXZVtlXnIchDM7XtsWzGrIDk8DwvnaN3zDzCZZ/R0HP hf0g== X-Gm-Message-State: AOJu0YxUexDwFb6bwJsR6kDMQkOUR1JlPJzXlNgtWmq1Gb13waMGSp3S WgSEKqrP8FG0WiZ0fadvWIYS2Znc7jKg2Xr6+PxX8FF4ItQ40o7VgrmBNiv0Qp6e9vbIRsOXX5u hfflFpBlUr2O8i7inU0nPGAwjOOot2A6Atp8= X-Google-Smtp-Source: AGHT+IHLTLnlxqPzuDLEdFYuWMQxAjnKExkmpF1xVIm0/NRXv5nx9TUlFrfT1rjdqyXvx5g5dD3GeHhfWAf5Y97n0i8= X-Received: by 2002:a05:6512:23a2:b0:52e:73a2:4415 with SMTP id 2adb3069b0e04-5344e4fae2amr2738987e87.46.1724786886504; Tue, 27 Aug 2024 12:28:06 -0700 (PDT) List-Id: X11 List-Archive: https://lists.freebsd.org/archives/freebsd-x11 List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-x11@freebsd.org Sender: owner-freebsd-x11@FreeBSD.org MIME-Version: 1.0 References: In-Reply-To: From: Vasily Postnicov Date: Tue, 27 Aug 2024 19:27:55 +0000 Message-ID: Subject: Fwd: Is support for DMA-BUF possible or planned? To: freebsd-x11@freebsd.org Content-Type: multipart/alternative; boundary="000000000000aef7b10620af3d26" X-Spamd-Bar: -- X-Spamd-Result: default: False [-3.00 / 15.00]; SUBJECT_ENDS_QUESTION(1.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.998]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36:c]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20230601]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; RCVD_TLS_LAST(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_FROM(0.00)[gmail.com]; RCPT_COUNT_ONE(0.00)[1]; FREEMAIL_ENVFROM(0.00)[gmail.com]; TAGGED_FROM(0.00)[]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; MISSING_XM_UA(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-x11@freebsd.org]; TO_DN_NONE(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; MLMMJ_DEST(0.00)[freebsd-x11@freebsd.org]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; MID_RHS_MATCH_FROMTLD(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; RCVD_COUNT_ONE(0.00)[1]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::12d:from] X-Rspamd-Queue-Id: 4Wtcyd26YYz4ltk --000000000000aef7b10620af3d26 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Thanks a lot! I applied a patch similar to the one used in x11-wm/magpie to x11-toolkits/gtk40 and the newest webkit started to work without WEBKIT_DISABLE_DMABUF_RENDERER and with WebGL support. I think I'll send a patch to the port tomorrow. =D0=B2=D1=82, 27 =D0=B0=D0=B2=D0=B3. 2024=E2=80=AF=D0=B3. =D0=B2 12:23, Jan= Beich : > (redirecting from desktop@ list) > > Vasily Postnicov writes: > > > Hi! I maintain my own port of webkitgtk. In version 2.44.0 WebKit's > > developers broke WebGL support on systems which do not have DMA-BUF (al= l > > systems but Linux, maybe). Is support for DMA-BUF possible or planned i= n > > FreeBSD as a part of the Linux compatibility layer? > > DMA-BUF works fine natively and required by DRI3, EGL + VA-API interop, > Wayland. > Explicit sync isn't supported yet, see > https://github.com/freebsd/drm-kmod/issues/278 > Note, DMA-BUF on NVIDIA GPUs requires installing nvidia-drm-kmod package. > > header only provides *_SYNC and *_SYNC_FILE ioctls. Consumers > like Mesa usually bundle the header or the relevant macros like in > x11-wm/magpie/files/patch-cogl_cogl_cogl-dma-buf-handle.c (based on bug > 271823). > > *_SYNC may be broken per > https://github.com/FreeBSDDesktop/kms-drm/issues/156 > but nothing critical depends on it and likely obsoleted by *_SYNC_FILE, > anyway. > > Related: > > https://github.com/dragonflybsd/dragonflybsd/tree/master/sys/dev/drm/linu= x_dma-buf.c > https://github.com/freebsd/drm-kmod/tree/master/drivers/dma-buf/dma-buf.c > > https://github.com/evadot/drm-subtree/tree/master/drmkpi/drmcompat_dma_bu= f.c > > https://github.com/NetBSD/src/blob/trunk/sys/external/bsd/drm2/linux/linu= x_dma_buf.c > --000000000000aef7b10620af3d26 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thanks a lot! I applied a patch similar to the one used in= x11-wm/magpie to x11-toolkits/gtk40 and the newest webkit started to work = without=C2=A0WEBKIT_DISABLE_DMABUF_RENDERER and with WebGL support. I think= I'll send a patch to the port tomorrow.
=
=D0=B2= =D1=82, 27 =D0=B0=D0=B2=D0=B3. 2024=E2=80=AF=D0=B3. =D0=B2 12:23, Jan Beich= <jbeich@freebsd= .org>:
(redirecting from desktop@ list)
Vasily Postnicov <shamaz.mazum@gmail.com> writes:

> Hi! I maintain my own port of webkitgtk. In version 2.44.0 WebKit'= s
> developers broke WebGL support on systems which do not have DMA-BUF (a= ll
> systems but Linux, maybe). Is support for DMA-BUF possible or planned = in
> FreeBSD as a part of the Linux compatibility layer?

DMA-BUF works fine natively and required by DRI3, EGL + VA-API interop, Way= land.
Explicit sync isn't supported yet, see https://git= hub.com/freebsd/drm-kmod/issues/278
Note, DMA-BUF on NVIDIA GPUs requires installing nvidia-drm-kmod package.
<dma-buf.h> header only provides *_SYNC and *_SYNC_FILE ioctls. Consu= mers
like Mesa usually bundle the header or the relevant macros like in
x11-wm/magpie/files/patch-cogl_cogl_cogl-dma-buf-handle.c (based on bug 271= 823).

*_SYNC may be broken per https://github.com/Free= BSDDesktop/kms-drm/issues/156
but nothing critical depends on it and likely obsoleted by *_SYNC_FILE, any= way.

Related:
https://github.c= om/dragonflybsd/dragonflybsd/tree/master/sys/dev/drm/linux_dma-buf.c https://github.com/freebsd/= drm-kmod/tree/master/drivers/dma-buf/dma-buf.c
https://github.com/evado= t/drm-subtree/tree/master/drmkpi/drmcompat_dma_buf.c
https://github.c= om/NetBSD/src/blob/trunk/sys/external/bsd/drm2/linux/linux_dma_buf.c
--000000000000aef7b10620af3d26--