Skip to content

Commit

Permalink
feat(mutter): Add support for DRM Leasing (VR Headsets)
Browse files Browse the repository at this point in the history
  • Loading branch information
KyleGospo committed Jun 3, 2024
1 parent fdbb71f commit 3ff55ef
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 1 deletion.
39 changes: 39 additions & 0 deletions staging/mutter/3746.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
diff --git a/src/backends/meta-monitor-config-manager.c b/src/backends/meta-monitor-config-manager.c
index 5fcb10b4e..2c39575e1 100644
--- a/src/backends/meta-monitor-config-manager.c
+++ b/src/backends/meta-monitor-config-manager.c
@@ -383,9 +383,9 @@ meta_monitor_config_manager_assign (MetaMonitorManager *manager,
GPtrArray **out_output_assignments,
GError **error)
{
- GPtrArray *crtc_assignments;
- GPtrArray *output_assignments;
- GArray *reserved_crtcs;
+ g_autoptr (GPtrArray) crtc_assignments = NULL;
+ g_autoptr (GPtrArray) output_assignments = NULL;
+ g_autoptr (GArray) reserved_crtcs = NULL;
GList *l;

crtc_assignments =
@@ -432,18 +432,11 @@ meta_monitor_config_manager_assign (MetaMonitorManager *manager,
config, logical_monitor_config,
crtc_assignments, output_assignments,
reserved_crtcs, error))
- {
- g_ptr_array_free (crtc_assignments, TRUE);
- g_ptr_array_free (output_assignments, TRUE);
- g_array_free (reserved_crtcs, TRUE);
- return FALSE;
- }
+ return FALSE;
}

- g_array_free (reserved_crtcs, TRUE);
-
- *out_crtc_assignments = crtc_assignments;
- *out_output_assignments = output_assignments;
+ *out_crtc_assignments = g_steal_pointer (&crtc_assignments);
+ *out_output_assignments = g_steal_pointer (&output_assignments);

return TRUE;
}
5 changes: 4 additions & 1 deletion staging/mutter/mutter.spec
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,11 @@ Patch4: 0001-modified-3329.patch
# https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1441
Patch5: 1441.patch

# https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3746
Patch6: 3746.patch

# https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3567
# Patch6: 3567.patch
# Patch7: 3567.patch

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

0 comments on commit 3ff55ef

Please sign in to comment.