public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/kwin] rawhide: Added crash fix with displaylink
@ 2026-11-03 19:13 Steve Cossette
0 siblings, 0 replies; only message in thread
From: Steve Cossette @ 2026-11-03 19:13 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/kwin
Branch : rawhide
Commit : c6f0d01e3df6404feb4566817ad351eeb302bed1
Author : Steve Cossette <farchord@gmail.com>
Date : 2026-11-03T14:13:19-05:00
Stats : +53/-146 in 3 file(s)
URL : https://src.fedoraproject.org/rpms/kwin/c/c6f0d01e3df6404feb4566817ad351eeb302bed1?branch=rawhide
Log:
Added crash fix with displaylink
---
diff --git a/79c0aca568e281c2af8b7820281e7c38b31cf90d.patch b/79c0aca568e281c2af8b7820281e7c38b31cf90d.patch
deleted file mode 100644
index c7ec95f..0000000
--- a/79c0aca568e281c2af8b7820281e7c38b31cf90d.patch
+++ /dev/null
@@ -1,145 +0,0 @@
-From 79c0aca568e281c2af8b7820281e7c38b31cf90d Mon Sep 17 00:00:00 2001
-From: Xaver Hugl <xaver.hugl@kde.org>
-Date: Wed, 16 Sep 2026 14:43:11 +0200
-Subject: [PATCH] core/gbmgraphicsbufferallocator: destroy gbm_bo as soon as
- possible
-
-This avoids crashing when the buffer outlives the allocator, which is
-sometimes required when rendering to the buffer. The buffer's life
-time is instead simply bound to the dmabuf file descriptor.
-
-To make that possible, this also removes the ability to map gbm
-buffers, but that was unused anyways. If we need it again, it would
-be pretty trivial to add it back for linear buffers specifically.
-
-BUG: 525748
-
-
-(cherry picked from commit e3908ecea5b5e93e5d43712e3cd035a69197ace1)
-
-Co-authored-by: Xaver Hugl <xaver.hugl@kde.org>
----
- src/core/gbmgraphicsbufferallocator.cpp | 52 ++++---------------------
- 1 file changed, 7 insertions(+), 45 deletions(-)
-
-diff --git a/src/core/gbmgraphicsbufferallocator.cpp b/src/core/gbmgraphicsbufferallocator.cpp
-index defdacd5432..d27fc00542f 100644
---- a/src/core/gbmgraphicsbufferallocator.cpp
-+++ b/src/core/gbmgraphicsbufferallocator.cpp
-@@ -67,12 +67,9 @@ class GbmGraphicsBuffer : public GraphicsBuffer
- Q_OBJECT
-
- public:
-- GbmGraphicsBuffer(DmaBufAttributes attributes, gbm_bo *handle);
-+ explicit GbmGraphicsBuffer(DmaBufAttributes attributes);
- ~GbmGraphicsBuffer() override;
-
-- Map map(MapFlags flags) override;
-- void unmap() override;
--
- QSize size() const override;
- bool hasAlphaChannel() const override;
- const DmaBufAttributes *dmabufAttributes() const override;
-@@ -81,11 +78,6 @@ public:
- uint32_t pitch() const override;
-
- private:
-- gbm_bo *m_bo;
-- void *m_mapPtr = nullptr;
-- void *m_mapData = nullptr;
-- // the stride of the buffer mapping can be different from the stride of the buffer itself
-- uint32_t m_mapStride = 0;
- DmaBufAttributes m_dmabufAttributes;
- QSize m_size;
- bool m_hasAlphaChannel;
-@@ -185,11 +177,11 @@ static GraphicsBuffer *allocateDmaBuf(gbm_device *device, dev_t deviceId, const
- flags);
- if (bo) {
- std::optional<DmaBufAttributes> attributes = dmaBufAttributesForBo(bo, deviceId);
-+ gbm_bo_destroy(bo);
- if (!attributes.has_value()) {
-- gbm_bo_destroy(bo);
- return nullptr;
- }
-- return new GbmGraphicsBuffer(std::move(attributes.value()), bo);
-+ return new GbmGraphicsBuffer(std::move(attributes.value()));
- }
- }
-
-@@ -206,8 +198,8 @@ static GraphicsBuffer *allocateDmaBuf(gbm_device *device, dev_t deviceId, const
- flags);
- if (bo) {
- std::optional<DmaBufAttributes> attributes = dmaBufAttributesForBo(bo, deviceId);
-+ gbm_bo_destroy(bo);
- if (!attributes.has_value()) {
-- gbm_bo_destroy(bo);
- return nullptr;
- }
- if (flags & GBM_BO_USE_LINEAR) {
-@@ -215,7 +207,7 @@ static GraphicsBuffer *allocateDmaBuf(gbm_device *device, dev_t deviceId, const
- } else {
- attributes->modifier = DRM_FORMAT_MOD_INVALID;
- }
-- return new GbmGraphicsBuffer(std::move(attributes.value()), bo);
-+ return new GbmGraphicsBuffer(std::move(attributes.value()));
- }
-
- return nullptr;
-@@ -241,9 +233,8 @@ GraphicsBuffer *GbmGraphicsBufferAllocator::allocate(const GraphicsBufferOptions
- return allocateDmaBuf(m_device->gbmDevice(), m_device->deviceId(), options);
- }
-
--GbmGraphicsBuffer::GbmGraphicsBuffer(DmaBufAttributes attributes, gbm_bo *handle)
-- : m_bo(handle)
-- , m_dmabufAttributes(std::move(attributes))
-+GbmGraphicsBuffer::GbmGraphicsBuffer(DmaBufAttributes attributes)
-+ : m_dmabufAttributes(std::move(attributes))
- , m_size(m_dmabufAttributes.width, m_dmabufAttributes.height)
- , m_hasAlphaChannel(alphaChannelFromDrmFormat(m_dmabufAttributes.format))
- {
-@@ -251,8 +242,6 @@ GbmGraphicsBuffer::GbmGraphicsBuffer(DmaBufAttributes attributes, gbm_bo *handle
-
- GbmGraphicsBuffer::~GbmGraphicsBuffer()
- {
-- unmap();
-- gbm_bo_destroy(m_bo);
- }
-
- QSize GbmGraphicsBuffer::size() const
-@@ -285,33 +274,6 @@ uint32_t GbmGraphicsBuffer::pitch() const
- return m_dmabufAttributes.pitch[0];
- }
-
--GraphicsBuffer::Map GbmGraphicsBuffer::map(MapFlags flags)
--{
-- if (!m_mapPtr) {
-- uint32_t access = 0;
-- if (flags & MapFlag::Read) {
-- access |= GBM_BO_TRANSFER_READ;
-- }
-- if (flags & MapFlag::Write) {
-- access |= GBM_BO_TRANSFER_WRITE;
-- }
-- m_mapPtr = gbm_bo_map(m_bo, 0, 0, m_dmabufAttributes.width, m_dmabufAttributes.height, access, &m_mapStride, &m_mapData);
-- }
-- return Map{
-- .data = m_mapPtr,
-- .stride = m_mapStride,
-- };
--}
--
--void GbmGraphicsBuffer::unmap()
--{
-- if (m_mapPtr) {
-- gbm_bo_unmap(m_bo, m_mapData);
-- m_mapPtr = nullptr;
-- m_mapData = nullptr;
-- }
--}
--
- DumbGraphicsBuffer::DumbGraphicsBuffer(int drmFd, uint32_t handle, DmaBufAttributes attributes)
- : m_drmFd(drmFd)
- , m_handle(handle)
---
-GitLab
-
diff --git a/c9d720793bbcef9483ab290673032d39441c0e6f.patch b/c9d720793bbcef9483ab290673032d39441c0e6f.patch
new file mode 100644
index 0000000..c1dc5e5
--- /dev/null
+++ b/c9d720793bbcef9483ab290673032d39441c0e6f.patch
@@ -0,0 +1,46 @@
+From c9d720793bbcef9483ab290673032d39441c0e6f Mon Sep 17 00:00:00 2001
+From: Xaver Hugl <xaver.hugl@kde.org>
+Date: Thu, 29 Oct 2026 15:54:18 +0100
+Subject: [PATCH] compositor: handle possibly missing render device
+
+Commit 6783f9610c moved the cross-GPU direct scanout check from
+backends/drm into the compositor, but dropped the null check on the
+render device. GpuManager's compatibleRenderDevice() returns nullptr
+for scanout devices that have no render device to pair with, such as
+evdi DisplayLink outputs. This caused deviceId() to be called on a null
+pointer whenever a buffer from another device is considered for direct
+scanout on such an output.
+
+On systems with a DisplayLink dock, this crashes kwin_wayland as soon
+as a fullscreen surface is shown on an evdi output.
+
+This change restores the previous behavior: If there is no compatible
+render device, treat the buffer as coming from another GPU and refuse
+direct scanout.
+
+BUG: 527984
+
+
+(cherry picked from commit 43a74990f34159e68a12e85dc1ff1d9b0d908ee3)
+
+Co-authored-by: Fae Schiewe <schiewe@uwuware.com>
+---
+ src/compositor.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/compositor.cpp b/src/compositor.cpp
+index 658d550818a..0aa0e57d6b9 100644
+--- a/src/compositor.cpp
++++ b/src/compositor.cpp
+@@ -478,7 +478,7 @@ static bool prepareDirectScanout(RenderView *view, LogicalOutput *logicalOutput,
+ return false;
+ }
+ const auto compatibleDevice = GpuManager::self()->compatibleRenderDevice(layer->scanoutDevice());
+- if (attrs->device != layer->scanoutDevice()->deviceId() && attrs->device != compatibleDevice->deviceId()) {
++ if (attrs->device != layer->scanoutDevice()->deviceId() && (!compatibleDevice || attrs->device != compatibleDevice->deviceId())) {
+ // Disallow direct scanout between GPUs, as
+ // - there are some significant driver bugs with direct scanout from other GPUs,
+ // like https://gitlab.freedesktop.org/drm/amd/-/issues/2075
+--
+GitLab
+
diff --git a/kwin.spec b/kwin.spec
index 7b88d30..d7f072e 100644
--- a/kwin.spec
+++ b/kwin.spec
@@ -1,6 +1,6 @@
Name: kwin
Version: 6.8.2
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: KDE Window manager
License: BSD-2-Clause AND BSD-3-Clause AND CC0-1.0 AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-only AND GPL-3.0-or-later AND LGPL-2.0-only AND LGPL-2.0-or-later AND LGPL-2.1-only AND LGPL-2.1-or-later AND LGPL-3.0-only AND (GPL-2.0-only OR GPL-3.0-only) AND (LGPL-2.1-only OR LGPL-3.0-only) AND MIT
@@ -16,6 +16,9 @@ Source10: macros.kwin.in
## upstream patches
+# compositor: handle possibly missing render device
+# https://invent.kde.org/plasma/kwin/-/commit/c9d720793bbcef9483ab290673032d39441c0e6f
+Patch0: c9d720793bbcef9483ab290673032d39441c0e6f.patch
## proposed patches
@@ -293,6 +296,9 @@ sed -i \
%changelog
+* Tue Nov 03 2026 Steve Cossette <farchord@gmail.com> - 6.8.2-3
+- Fix for a kwin crash
+
* Sat Oct 31 2026 Neal Gompa <ngompa@fedoraproject.org> - 6.8.2-2
- Add RPM macros for kwin versioning to devel package
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-03 19:13 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-03 19:13 [rpms/kwin] rawhide: Added crash fix with displaylink Steve Cossette
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox