Blame SOURCES/0002-renderer-native-Add-API-to-get-primary-GPU.patch

f15b50
From 63455680096e015eaf023760466593b6f42f9cf5 Mon Sep 17 00:00:00 2001
f15b50
From: =?UTF-8?q?Jonas=20=C3=85dahl?= <jadahl@gmail.com>
f15b50
Date: Thu, 12 Sep 2019 11:50:34 +0200
f15b50
Subject: [PATCH 2/4] renderer/native: Add API to get primary GPU
f15b50
f15b50
Will be used when acquiring scanouts from Wayland buffers.
f15b50
f15b50
https://gitlab.gnome.org/GNOME/mutter/merge_requests/798
f15b50
---
f15b50
 src/backends/native/meta-renderer-native.c | 6 ++++++
f15b50
 src/backends/native/meta-renderer-native.h | 2 ++
f15b50
 2 files changed, 8 insertions(+)
f15b50
f15b50
diff --git a/src/backends/native/meta-renderer-native.c b/src/backends/native/meta-renderer-native.c
f15b50
index dbb88edb8e..25833b6cf6 100644
f15b50
--- a/src/backends/native/meta-renderer-native.c
f15b50
+++ b/src/backends/native/meta-renderer-native.c
f15b50
@@ -317,6 +317,12 @@ meta_gbm_device_from_gpu (MetaGpuKms *gpu_kms)
f15b50
   return renderer_gpu_data->gbm.device;
f15b50
 }
f15b50
 
f15b50
+MetaGpuKms *
f15b50
+meta_renderer_native_get_primary_gpu (MetaRendererNative *renderer_native)
f15b50
+{
f15b50
+  return renderer_native->primary_gpu_kms;
f15b50
+}
f15b50
+
f15b50
 static MetaRendererNativeGpuData *
f15b50
 meta_create_renderer_native_gpu_data (MetaGpuKms *gpu_kms)
f15b50
 {
f15b50
diff --git a/src/backends/native/meta-renderer-native.h b/src/backends/native/meta-renderer-native.h
f15b50
index 9eecdead1c..b59366e267 100644
f15b50
--- a/src/backends/native/meta-renderer-native.h
f15b50
+++ b/src/backends/native/meta-renderer-native.h
f15b50
@@ -53,6 +53,8 @@ struct gbm_device * meta_gbm_device_from_gpu (MetaGpuKms *gpu_kms);
f15b50
 
f15b50
 gboolean meta_renderer_native_supports_mirroring (MetaRendererNative *renderer_native);
f15b50
 
f15b50
+MetaGpuKms * meta_renderer_native_get_primary_gpu (MetaRendererNative *renderer_native);
f15b50
+
f15b50
 void meta_renderer_native_finish_frame (MetaRendererNative *renderer_native);
f15b50
 
f15b50
 int64_t meta_renderer_native_get_frame_counter (MetaRendererNative *renderer_native);
f15b50
-- 
f15b50
2.26.2
f15b50