Skip to content

Commit

Permalink
chore: Update patch
Browse files Browse the repository at this point in the history
  • Loading branch information
KyleGospo committed Oct 19, 2024
1 parent aa2c278 commit 525f89f
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 48 deletions.
95 changes: 55 additions & 40 deletions staging/mutter/1441.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
Author: Daniel van Vugt <[email protected]>
Source: https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1441
Editor: Joakim Soderlund <[email protected]>
Commit: ad922d6dcb5523a0567060c5056d18ccc5cae3bc
Rebase: Thu Sep 19 14:06:06 2024 +0800

diff --git a/clutter/clutter/clutter-frame-clock.c b/clutter/clutter/clutter-frame-clock.c
index 0cc1f2eb4..3418cb86c 100644
index 0cc1f2eb4a..3418cb86c0 100644
--- a/clutter/clutter/clutter-frame-clock.c
+++ b/clutter/clutter/clutter-frame-clock.c
@@ -42,6 +42,15 @@ enum
Expand Down Expand Up @@ -675,7 +681,7 @@ index 0cc1f2eb4..3418cb86c 100644
object_class->dispose = clutter_frame_clock_dispose;

diff --git a/clutter/clutter/clutter-frame-clock.h b/clutter/clutter/clutter-frame-clock.h
index 6a940f48b..23e3357d3 100644
index 6a940f48be..23e3357d3a 100644
--- a/clutter/clutter/clutter-frame-clock.h
+++ b/clutter/clutter/clutter-frame-clock.h
@@ -33,6 +33,12 @@ typedef enum _ClutterFrameResult
Expand Down Expand Up @@ -704,7 +710,7 @@ index 6a940f48b..23e3357d3 100644
GString * clutter_frame_clock_get_max_render_time_debug_info (ClutterFrameClock *frame_clock);

diff --git a/clutter/clutter/clutter-frame-private.h b/clutter/clutter/clutter-frame-private.h
index ef66b874e..ce140560a 100644
index ef66b874ed..ce140560a8 100644
--- a/clutter/clutter/clutter-frame-private.h
+++ b/clutter/clutter/clutter-frame-private.h
@@ -36,6 +36,7 @@ struct _ClutterFrame
Expand All @@ -716,7 +722,7 @@ index ef66b874e..ce140560a 100644

CLUTTER_EXPORT
diff --git a/clutter/clutter/clutter-frame.c b/clutter/clutter/clutter-frame.c
index 7436f9f18..53c289b2c 100644
index 7436f9f182..53c289b2c5 100644
--- a/clutter/clutter/clutter-frame.c
+++ b/clutter/clutter/clutter-frame.c
@@ -115,3 +115,16 @@ clutter_frame_set_result (ClutterFrame *frame,
Expand All @@ -737,7 +743,7 @@ index 7436f9f18..53c289b2c 100644
+ return frame->hints;
+}
diff --git a/clutter/clutter/clutter-frame.h b/clutter/clutter/clutter-frame.h
index 34f0770bd..c7b3d02ac 100644
index 34f0770bd7..c7b3d02acb 100644
--- a/clutter/clutter/clutter-frame.h
+++ b/clutter/clutter/clutter-frame.h
@@ -54,4 +54,11 @@ void clutter_frame_set_result (ClutterFrame *frame,
Expand All @@ -753,7 +759,7 @@ index 34f0770bd..c7b3d02ac 100644
+
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterFrame, clutter_frame_unref)
diff --git a/clutter/clutter/clutter-stage-view.c b/clutter/clutter/clutter-stage-view.c
index 8fe7f9929..cbaaa1592 100644
index 8fe7f99297..cbaaa15927 100644
--- a/clutter/clutter/clutter-stage-view.c
+++ b/clutter/clutter/clutter-stage-view.c
@@ -1075,14 +1075,21 @@ handle_frame_clock_frame (ClutterFrameClock *frame_clock,
Expand Down Expand Up @@ -781,7 +787,7 @@ index 8fe7f9929..cbaaa1592 100644
_clutter_stage_window_finish_frame (stage_window, view, frame);

diff --git a/cogl/cogl/cogl-onscreen-private.h b/cogl/cogl/cogl-onscreen-private.h
index e732d3fd0..77b09bf2e 100644
index e732d3fd0b..77b09bf2e6 100644
--- a/cogl/cogl/cogl-onscreen-private.h
+++ b/cogl/cogl/cogl-onscreen-private.h
@@ -79,4 +79,7 @@ COGL_EXPORT CoglFrameInfo *
Expand All @@ -794,7 +800,7 @@ index e732d3fd0..77b09bf2e 100644
+COGL_EXPORT unsigned int
+cogl_onscreen_get_pending_frame_count (CoglOnscreen *onscreen);
diff --git a/cogl/cogl/cogl-onscreen.c b/cogl/cogl/cogl-onscreen.c
index 3bcb23307..cde6da308 100644
index 3bcb23307e..cde6da308f 100644
--- a/cogl/cogl/cogl-onscreen.c
+++ b/cogl/cogl/cogl-onscreen.c
@@ -468,6 +468,14 @@ cogl_onscreen_pop_head_frame_info (CoglOnscreen *onscreen)
Expand All @@ -813,10 +819,10 @@ index 3bcb23307..cde6da308 100644
cogl_onscreen_add_frame_callback (CoglOnscreen *onscreen,
CoglFrameCallback callback,
diff --git a/src/backends/meta-stage-impl.c b/src/backends/meta-stage-impl.c
index 945e95ff2..d3eb7f390 100644
index 6a5dcb92c7..dc17846146 100644
--- a/src/backends/meta-stage-impl.c
+++ b/src/backends/meta-stage-impl.c
@@ -800,6 +800,8 @@ meta_stage_impl_redraw_view (ClutterStageWindow *stage_window,
@@ -798,6 +798,8 @@ meta_stage_impl_redraw_view (ClutterStageWindow *stage_window,
{
g_autoptr (GError) error = NULL;

Expand All @@ -826,7 +832,7 @@ index 945e95ff2..d3eb7f390 100644
stage_view,
scanout,
diff --git a/src/backends/native/meta-frame-native.c b/src/backends/native/meta-frame-native.c
index 70461be32..8dc9dba9b 100644
index 70461be32a..8dc9dba9b9 100644
--- a/src/backends/native/meta-frame-native.c
+++ b/src/backends/native/meta-frame-native.c
@@ -31,6 +31,11 @@ struct _MetaFrameNative
Expand Down Expand Up @@ -879,7 +885,7 @@ index 70461be32..8dc9dba9b 100644
+ return frame_native->damage.n_rectangles;
+}
diff --git a/src/backends/native/meta-frame-native.h b/src/backends/native/meta-frame-native.h
index 3df4eff78..84bd43b8c 100644
index 3df4eff78f..84bd43b8c6 100644
--- a/src/backends/native/meta-frame-native.h
+++ b/src/backends/native/meta-frame-native.h
@@ -47,3 +47,12 @@ void meta_frame_native_set_scanout (MetaFrameNative *frame_native,
Expand All @@ -896,7 +902,7 @@ index 3df4eff78..84bd43b8c 100644
+meta_frame_native_get_damage (MetaFrameNative *frame_native,
+ int **rectangles);
diff --git a/src/backends/native/meta-kms.c b/src/backends/native/meta-kms.c
index 9af95ca9c..3d8bffca3 100644
index 9af95ca9c1..3d8bffca30 100644
--- a/src/backends/native/meta-kms.c
+++ b/src/backends/native/meta-kms.c
@@ -66,6 +66,8 @@ struct _MetaKms
Expand Down Expand Up @@ -930,7 +936,7 @@ index 9af95ca9c..3d8bffca3 100644
meta_thread_flush_callbacks (META_THREAD (kms));

diff --git a/src/backends/native/meta-kms.h b/src/backends/native/meta-kms.h
index f5ec4c1c3..77fd62662 100644
index f5ec4c1c3b..77fd62662d 100644
--- a/src/backends/native/meta-kms.h
+++ b/src/backends/native/meta-kms.h
@@ -61,6 +61,8 @@ MetaKmsDevice * meta_kms_create_device (MetaKms *kms,
Expand All @@ -943,7 +949,7 @@ index f5ec4c1c3..77fd62662 100644
MetaKmsFlags flags,
GError **error);
diff --git a/src/backends/native/meta-onscreen-native.c b/src/backends/native/meta-onscreen-native.c
index 89a893bb0..d8cce9d4b 100644
index 021ada3677..ea0e6e4147 100644
--- a/src/backends/native/meta-onscreen-native.c
+++ b/src/backends/native/meta-onscreen-native.c
@@ -76,7 +76,7 @@ typedef struct _MetaOnscreenNativeSecondaryGpuState
Expand Down Expand Up @@ -1187,7 +1193,7 @@ index 89a893bb0..d8cce9d4b 100644
}

static const MetaKmsResultListenerVtable swap_buffer_result_listener_vtable = {
@@ -1292,18 +1358,14 @@ meta_onscreen_native_swap_buffers_with_damage (CoglOnscreen *onscreen,
@@ -1292,35 +1358,37 @@ meta_onscreen_native_swap_buffers_with_damage (CoglOnscreen *onscreen,
CoglRendererEGL *cogl_renderer_egl = cogl_renderer->winsys;
MetaRendererNativeGpuData *renderer_gpu_data = cogl_renderer_egl->platform;
MetaRendererNative *renderer_native = renderer_gpu_data->renderer_native;
Expand All @@ -1203,11 +1209,20 @@ index 89a893bb0..d8cce9d4b 100644
MetaFrameNative *frame_native = meta_frame_native_from_frame (frame);
- MetaKmsUpdate *kms_update;
CoglOnscreenClass *parent_class;
+ gboolean create_timestamp_query = TRUE;
gboolean secondary_gpu_used = FALSE;
MetaPowerSave power_save_mode;
gboolean create_timestamp_query = TRUE;
- MetaPowerSave power_save_mode;
g_autoptr (GError) error = NULL;
@@ -1320,6 +1382,19 @@ meta_onscreen_native_swap_buffers_with_damage (CoglOnscreen *onscreen,
MetaDrmBufferFlags buffer_flags;
MetaDrmBufferGbm *buffer_gbm;
g_autoptr (MetaDrmBuffer) primary_gpu_fb = NULL;
g_autoptr (MetaDrmBuffer) secondary_gpu_fb = NULL;
g_autoptr (MetaDrmBuffer) buffer = NULL;
- MetaKmsCrtc *kms_crtc;
- MetaKmsDevice *kms_device;
- int sync_fd;
-
- COGL_TRACE_SCOPED_ANCHOR (MetaRendererNativePostKmsUpdate);

COGL_TRACE_BEGIN_SCOPED (MetaRendererNativeSwapBuffers,
"Meta::OnscreenNative::swap_buffers_with_damage()");

Expand All @@ -1227,7 +1242,7 @@ index 89a893bb0..d8cce9d4b 100644
secondary_gpu_fb =
update_secondary_gpu_state_pre_swap_buffers (onscreen,
rectangles,
@@ -1401,15 +1476,86 @@ meta_onscreen_native_swap_buffers_with_damage (CoglOnscreen *onscreen,
@@ -1402,15 +1470,86 @@ meta_onscreen_native_swap_buffers_with_damage (CoglOnscreen *onscreen,
#endif
}

Expand Down Expand Up @@ -1318,7 +1333,7 @@ index 89a893bb0..d8cce9d4b 100644
kms_update = meta_frame_native_ensure_kms_update (frame_native,
kms_device);
meta_kms_update_add_result_listener (kms_update,
@@ -1431,13 +1577,11 @@ meta_onscreen_native_swap_buffers_with_damage (CoglOnscreen *onscreen,
@@ -1432,13 +1571,11 @@ meta_onscreen_native_swap_buffers_with_damage (CoglOnscreen *onscreen,
{
meta_renderer_native_queue_power_save_page_flip (renderer_native,
onscreen);
Expand All @@ -1333,7 +1348,7 @@ index 89a893bb0..d8cce9d4b 100644

switch (renderer_gpu_data->mode)
{
@@ -1452,8 +1596,6 @@ meta_onscreen_native_swap_buffers_with_damage (CoglOnscreen *onscreen,
@@ -1453,8 +1590,6 @@ meta_onscreen_native_swap_buffers_with_damage (CoglOnscreen *onscreen,
kms_update = meta_frame_native_steal_kms_update (frame_native);
meta_renderer_native_queue_mode_set_update (renderer_native,
kms_update);
Expand All @@ -1342,7 +1357,7 @@ index 89a893bb0..d8cce9d4b 100644
return;
}
else if (meta_renderer_native_has_pending_mode_set (renderer_native))
@@ -1467,8 +1609,6 @@ meta_onscreen_native_swap_buffers_with_damage (CoglOnscreen *onscreen,
@@ -1468,8 +1603,6 @@ meta_onscreen_native_swap_buffers_with_damage (CoglOnscreen *onscreen,

meta_frame_native_steal_kms_update (frame_native);
meta_renderer_native_post_mode_set_updates (renderer_native);
Expand All @@ -1351,7 +1366,7 @@ index 89a893bb0..d8cce9d4b 100644
return;
}
break;
@@ -1484,8 +1624,6 @@ meta_onscreen_native_swap_buffers_with_damage (CoglOnscreen *onscreen,
@@ -1485,8 +1618,6 @@ meta_onscreen_native_swap_buffers_with_damage (CoglOnscreen *onscreen,
kms_update);

meta_renderer_native_post_mode_set_updates (renderer_native);
Expand All @@ -1360,8 +1375,8 @@ index 89a893bb0..d8cce9d4b 100644
return;
}
break;
@@ -1509,13 +1647,6 @@ meta_onscreen_native_swap_buffers_with_damage (CoglOnscreen *onscreen,

@@ -1503,13 +1634,6 @@ meta_onscreen_native_swap_buffers_with_damage (CoglOnscreen *onscreen,
meta_kms_update_set_sync_fd (kms_update, sync_fd);
meta_kms_device_post_update (kms_device, kms_update,
META_KMS_UPDATE_FLAG_NONE);
- clutter_frame_set_result (frame, CLUTTER_FRAME_RESULT_PENDING_PRESENTED);
Expand All @@ -1374,7 +1389,7 @@ index 89a893bb0..d8cce9d4b 100644
}

gboolean
@@ -1583,11 +1714,11 @@ scanout_result_feedback (const MetaKmsFeedback *kms_feedback,
@@ -1577,11 +1701,11 @@ scanout_result_feedback (const MetaKmsFeedback *kms_feedback,
G_IO_ERROR_PERMISSION_DENIED))
{
ClutterStageView *view = CLUTTER_STAGE_VIEW (onscreen_native->view);
Expand All @@ -1390,7 +1405,7 @@ index 89a893bb0..d8cce9d4b 100644

g_warning ("Direct scanout page flip failed: %s", error->message);

@@ -1600,7 +1731,7 @@ scanout_result_feedback (const MetaKmsFeedback *kms_feedback,
@@ -1594,7 +1718,7 @@ scanout_result_feedback (const MetaKmsFeedback *kms_feedback,
frame_info->flags |= COGL_FRAME_INFO_FLAG_SYMBOLIC;

meta_onscreen_native_notify_frame_complete (onscreen);
Expand All @@ -1399,7 +1414,7 @@ index 89a893bb0..d8cce9d4b 100644
}

static const MetaKmsResultListenerVtable scanout_result_listener_vtable = {
@@ -1652,13 +1783,24 @@ meta_onscreen_native_direct_scanout (CoglOnscreen *onscreen,
@@ -1646,13 +1770,24 @@ meta_onscreen_native_direct_scanout (CoglOnscreen *onscreen,
return FALSE;
}

Expand All @@ -1426,7 +1441,7 @@ index 89a893bb0..d8cce9d4b 100644

meta_frame_native_set_scanout (frame_native, scanout);
meta_frame_native_set_buffer (frame_native,
@@ -1905,22 +2047,79 @@ meta_onscreen_native_finish_frame (CoglOnscreen *onscreen,
@@ -1899,22 +2034,79 @@ meta_onscreen_native_finish_frame (CoglOnscreen *onscreen,
MetaKmsDevice *kms_device = meta_kms_crtc_get_device (kms_crtc);
MetaFrameNative *frame_native = meta_frame_native_from_frame (frame);
MetaKmsUpdate *kms_update;
Expand Down Expand Up @@ -1514,7 +1529,7 @@ index 89a893bb0..d8cce9d4b 100644
meta_kms_update_add_result_listener (kms_update,
&finish_frame_result_listener_vtable,
NULL,
@@ -1943,7 +2142,17 @@ meta_onscreen_native_finish_frame (CoglOnscreen *onscreen,
@@ -1937,7 +2129,17 @@ meta_onscreen_native_finish_frame (CoglOnscreen *onscreen,
meta_kms_update_set_flushing (kms_update, kms_crtc);
meta_kms_device_post_update (kms_device, kms_update,
META_KMS_UPDATE_FLAG_NONE);
Expand All @@ -1533,7 +1548,7 @@ index 89a893bb0..d8cce9d4b 100644
}

static gboolean
@@ -2848,6 +3057,8 @@ meta_onscreen_native_dispose (GObject *object)
@@ -2842,6 +3044,8 @@ meta_onscreen_native_dispose (GObject *object)
meta_onscreen_native_detach (onscreen_native);

g_clear_pointer (&onscreen_native->next_frame, clutter_frame_unref);
Expand All @@ -1543,7 +1558,7 @@ index 89a893bb0..d8cce9d4b 100644

renderer_gpu_data =
diff --git a/src/backends/native/meta-onscreen-native.h b/src/backends/native/meta-onscreen-native.h
index 0e1193325..e30357d19 100644
index 0e1193325a..e30357d19d 100644
--- a/src/backends/native/meta-onscreen-native.h
+++ b/src/backends/native/meta-onscreen-native.h
@@ -48,6 +48,8 @@ void meta_onscreen_native_dummy_power_save_page_flip (CoglOnscreen *onscreen);
Expand All @@ -1556,10 +1571,10 @@ index 0e1193325..e30357d19 100644
MetaRendererView *view);

diff --git a/src/backends/native/meta-renderer-native.c b/src/backends/native/meta-renderer-native.c
index ff5d5002a..362aa11cf 100644
index 7034206bcd..d4ff9e2177 100644
--- a/src/backends/native/meta-renderer-native.c
+++ b/src/backends/native/meta-renderer-native.c
@@ -747,12 +747,18 @@ static gboolean
@@ -732,12 +732,18 @@ static gboolean
dummy_power_save_page_flip_cb (gpointer user_data)
{
MetaRendererNative *renderer_native = user_data;
Expand All @@ -1580,7 +1595,7 @@ index ff5d5002a..362aa11cf 100644
renderer_native->power_save_page_flip_source_id = 0;

return G_SOURCE_REMOVE;
@@ -764,6 +770,9 @@ meta_renderer_native_queue_power_save_page_flip (MetaRendererNative *renderer_na
@@ -749,6 +755,9 @@ meta_renderer_native_queue_power_save_page_flip (MetaRendererNative *renderer_na
{
const unsigned int timeout_ms = 100;

Expand All @@ -1590,7 +1605,7 @@ index ff5d5002a..362aa11cf 100644
if (!renderer_native->power_save_page_flip_source_id)
{
renderer_native->power_save_page_flip_source_id =
@@ -1512,6 +1521,26 @@ detach_onscreens (MetaRenderer *renderer)
@@ -1497,6 +1506,26 @@ detach_onscreens (MetaRenderer *renderer)
}
}

Expand All @@ -1617,7 +1632,7 @@ index ff5d5002a..362aa11cf 100644
static void
meta_renderer_native_rebuild_views (MetaRenderer *renderer)
{
@@ -1522,6 +1551,7 @@ meta_renderer_native_rebuild_views (MetaRenderer *renderer)
@@ -1507,6 +1536,7 @@ meta_renderer_native_rebuild_views (MetaRenderer *renderer)
MetaRendererClass *parent_renderer_class =
META_RENDERER_CLASS (meta_renderer_native_parent_class);

Expand All @@ -1626,7 +1641,7 @@ index ff5d5002a..362aa11cf 100644
g_hash_table_remove_all (renderer_native->mode_set_updates);

diff --git a/src/tests/native-kms-render.c b/src/tests/native-kms-render.c
index f5ebc23fe..2f870fdc3 100644
index f5ebc23fec..2f870fdc33 100644
--- a/src/tests/native-kms-render.c
+++ b/src/tests/native-kms-render.c
@@ -39,6 +39,8 @@
Expand Down
16 changes: 8 additions & 8 deletions staging/mutter/mutter.spec
Original file line number Diff line number Diff line change
Expand Up @@ -24,26 +24,26 @@ License: GPL-2.0-or-later
URL: http://www.gnome.org
Source0: https://download.gnome.org/sources/%{name}/%{gnome_major_version}/%{name}-%{tarball_version}.tar.xz

# https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1441
Patch0: 1441.patch

# Work-around for OpenJDK's compliance test
Patch0: 0001-window-actor-Special-case-shaped-Java-windows.patch
Patch1: 0001-window-actor-Special-case-shaped-Java-windows.patch

# https://bugzilla.redhat.com/show_bug.cgi?id=1936991
Patch1: mutter-42.alpha-disable-tegra.patch
Patch2: mutter-42.alpha-disable-tegra.patch

# https://pagure.io/fedora-workstation/issue/79
Patch2: 0001-place-Always-center-initial-setup-fedora-welcome.patch
Patch3: 0001-place-Always-center-initial-setup-fedora-welcome.patch

# https://pagure.io/fedora-workstation/issue/357
Patch3: 0001-gschema-Enable-fractional-scaling-experimental-featu.patch
Patch4: 0001-gschema-Enable-fractional-scaling-experimental-featu.patch

# https://bugzilla.redhat.com/show_bug.cgi?id=2239128
# https://gitlab.gnome.org/GNOME/mutter/-/issues/3068
# not upstreamed because for upstream we'd really want to find a way
# to fix *both* problems
Patch4: 0001-Revert-x11-Use-input-region-from-frame-window-for-de.patch

# https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1441
Patch5: 1441.patch
Patch5: 0001-Revert-x11-Use-input-region-from-frame-window-for-de.patch

BuildRequires: pkgconfig(gobject-introspection-1.0) >= 1.41.0
BuildRequires: pkgconfig(sm)
Expand Down

0 comments on commit 525f89f

Please sign in to comment.