From d7b37cfde5e3d004ddeb09075bf0ba95259a195b Mon Sep 17 00:00:00 2001 From: Ian Douglas Scott Date: Mon, 28 Apr 2025 13:03:50 -0700 Subject: [PATCH] Update `smithay` Updates to use `GbmFramebufferExporter`. --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- src/backend/kms/device.rs | 5 +++-- src/backend/kms/surface/mod.rs | 9 +++------ 4 files changed, 9 insertions(+), 11 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8e74900e..bf0544d0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4735,8 +4735,8 @@ checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" [[package]] name = "smithay" -version = "0.5.0" -source = "git+https://github.com/smithay/smithay//?rev=14b51bd#14b51bd896fe46ba048fe6fd24136455eb36dbee" +version = "0.6.0" +source = "git+https://github.com/smithay/smithay//?rev=f85d06a#f85d06a4629795f5008b573f6b48606db9ff6d71" dependencies = [ "aliasable", "appendlist", diff --git a/Cargo.toml b/Cargo.toml index 7ecae55a..1a694946 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -124,4 +124,4 @@ cosmic-protocols = { git = "https://github.com/pop-os//cosmic-protocols", branch cosmic-client-toolkit = { git = "https://github.com/pop-os//cosmic-protocols", branch = "main" } [patch."https://github.com/smithay/smithay"] -smithay = { git = "https://github.com/smithay/smithay//", rev = "14b51bd" } +smithay = { git = "https://github.com/smithay/smithay//", rev = "f85d06a" } diff --git a/src/backend/kms/device.rs b/src/backend/kms/device.rs index 98a1d9c8..10a461a3 100644 --- a/src/backend/kms/device.rs +++ b/src/backend/kms/device.rs @@ -19,6 +19,7 @@ use smithay::{ }, drm::{ compositor::{FrameError, FrameFlags}, + exporter::gbm::GbmFramebufferExporter, output::DrmOutputManager, DrmDevice, DrmDeviceFd, DrmEvent, DrmNode, }, @@ -61,7 +62,7 @@ pub struct EGLInternals { pub type GbmDrmOutputManager = DrmOutputManager< GbmAllocator, - GbmDevice, + GbmFramebufferExporter, Option<( OutputPresentationFeedback, Receiver<(ScreencopyFrame, Vec>)>, @@ -221,7 +222,7 @@ impl State { gbm.clone(), GbmBufferFlags::RENDERING | GbmBufferFlags::SCANOUT, ), - gbm.clone(), + GbmFramebufferExporter::new(gbm.clone()), Some(gbm.clone()), [ Fourcc::Abgr2101010, diff --git a/src/backend/kms/surface/mod.rs b/src/backend/kms/surface/mod.rs index 11c166eb..3c33ac46 100644 --- a/src/backend/kms/surface/mod.rs +++ b/src/backend/kms/surface/mod.rs @@ -22,13 +22,10 @@ use anyhow::{Context, Result}; use calloop::channel::Channel; use smithay::{ backend::{ - allocator::{ - format::FormatSet, - gbm::{GbmAllocator, GbmDevice}, - Fourcc, - }, + allocator::{format::FormatSet, gbm::GbmAllocator, Fourcc}, drm::{ compositor::{BlitFrameResultError, FrameError, FrameFlags, PrimaryPlaneElement}, + exporter::gbm::GbmFramebufferExporter, output::DrmOutput, DrmDeviceFd, DrmEventMetadata, DrmEventTime, DrmNode, VrrSupport, }, @@ -161,7 +158,7 @@ pub struct SurfaceThreadState { pub type GbmDrmOutput = DrmOutput< GbmAllocator, - GbmDevice, + GbmFramebufferExporter, Option<( OutputPresentationFeedback, Receiver<(ScreencopyFrame, Vec>)>,