Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Jul 2022 21:59:38 GMT
From:      Christoph Moench-Tegeder <cmt@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-branches@FreeBSD.org
Subject:   git: 5b6b698c8da2 - 2022Q3 - www/firefox: uplift patch for bmo#1779425
Message-ID:  <202207252159.26PLxcFd071786@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch 2022Q3 has been updated by cmt:

URL: https://cgit.FreeBSD.org/ports/commit/?id=5b6b698c8da2227b6f274d5f9dc1a560ad3fda5b

commit 5b6b698c8da2227b6f274d5f9dc1a560ad3fda5b
Author:     Christoph Moench-Tegeder <cmt@FreeBSD.org>
AuthorDate: 2022-07-25 21:55:37 +0000
Commit:     Christoph Moench-Tegeder <cmt@FreeBSD.org>
CommitDate: 2022-07-25 21:59:27 +0000

    www/firefox: uplift patch for bmo#1779425
    
    at least with some video cards (I only have one) but not with
    software rendering, tabs supposed to display WebGL things may
    crash instead. With this patch I can at least watch the cube
    spin and the fishys swim, fwiw.
    
    (cherry picked from commit e9cf87dba5ea6097da725e6184c17462dc1ee75d)
---
 www/firefox/Makefile               |  1 +
 www/firefox/files/patch-bug1779425 | 48 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 49 insertions(+)

diff --git a/www/firefox/Makefile b/www/firefox/Makefile
index e996d41ba97c..9b2efbe2fb8a 100644
--- a/www/firefox/Makefile
+++ b/www/firefox/Makefile
@@ -2,6 +2,7 @@
 
 PORTNAME=	firefox
 DISTVERSION=	103.0
+PORTREVISION=	1
 PORTEPOCH=	2
 CATEGORIES=	www
 MASTER_SITES=	MOZILLA/${PORTNAME}/releases/${DISTVERSION}${DISTVERSIONSUFFIX}/source \
diff --git a/www/firefox/files/patch-bug1779425 b/www/firefox/files/patch-bug1779425
new file mode 100644
index 000000000000..9ab5f99d3b6d
--- /dev/null
+++ b/www/firefox/files/patch-bug1779425
@@ -0,0 +1,48 @@
+commit 9583d02e454318568191e5c31c51c34fd1332182
+Author: Robert Mader <robert.mader@posteo.de>
+Date:   Tue Jul 19 21:52:04 2022 +0000
+
+    Bug 1779425 - Check for GbmDevice before using it, r=stransky,jgilbert
+    
+    In some non-standard configurations we unexpectedly end up in this paths
+    without a GBM device - one example being the GPU process. Fail cleanly
+    instead of crashing in those cases, triggering fallback paths.
+    
+    Context: in the past DMABuf usage was tightly coupled to GBM. Since the
+    introduction of the surfaceless and device EGL platforms that is not
+    longer the case, thus we can't make checks like `IsDMABufWebGLEnabled()`
+    depend on the presence of a GBM device.
+    
+    Optimally all affected cases get fixed eventually. Until then and also
+    for future cases it makes sense to fail softly.
+    
+    Differential Revision: https://phabricator.services.mozilla.com/D152173
+
+diff --git widget/gtk/DMABufSurface.cpp widget/gtk/DMABufSurface.cpp
+index 92c8e75218f8..7fddb32c7cda 100644
+--- widget/gtk/DMABufSurface.cpp
++++ widget/gtk/DMABufSurface.cpp
+@@ -382,6 +382,11 @@ bool DMABufSurfaceRGBA::Create(int aWidth, int aHeight,
+   LOGDMABUF(("DMABufSurfaceRGBA::Create() UID %d size %d x %d\n", mUID, mWidth,
+              mHeight));
+ 
++  if (!GetDMABufDevice()->GetGbmDevice()) {
++    LOGDMABUF(("    Missing GbmDevice!"));
++    return false;
++  }
++
+   mGmbFormat = GetDMABufDevice()->GetGbmFormat(mSurfaceFlags & DMABUF_ALPHA);
+   if (!mGmbFormat) {
+     // Requested DRM format is not supported.
+@@ -1025,6 +1030,11 @@ bool DMABufSurfaceYUV::CreateYUVPlane(int aPlane, int aWidth, int aHeight,
+   LOGDMABUF(("DMABufSurfaceYUV::CreateYUVPlane() UID %d size %d x %d", mUID,
+              aWidth, aHeight));
+ 
++  if (!GetDMABufDevice()->GetGbmDevice()) {
++    LOGDMABUF(("    Missing GbmDevice!"));
++    return false;
++  }
++
+   mWidth[aPlane] = aWidth;
+   mHeight[aPlane] = aHeight;
+   mDrmFormats[aPlane] = aDrmFormat;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202207252159.26PLxcFd071786>