[gnome-remote-desktop] pipewire-utils: Remove unused sync function



commit 66fcdb8692d9f4fe0d84af3d6cad5d97e04dc286
Author: Jonas Ådahl <jadahl gmail com>
Date:   Wed Nov 24 11:26:02 2021 +0100

    pipewire-utils: Remove unused sync function
    
    Was used for the removed mmap() approach.

 src/grd-pipewire-utils.c | 33 ---------------------------------
 src/grd-pipewire-utils.h |  3 ---
 2 files changed, 36 deletions(-)
---
diff --git a/src/grd-pipewire-utils.c b/src/grd-pipewire-utils.c
index 1eb0357..0e985e9 100644
--- a/src/grd-pipewire-utils.c
+++ b/src/grd-pipewire-utils.c
@@ -23,11 +23,8 @@
 #include "grd-pipewire-utils.h"
 
 #include <drm_fourcc.h>
-#include <linux/dma-buf.h>
 #include <pipewire/pipewire.h>
 #include <spa/param/video/raw.h>
-#include <sys/ioctl.h>
-#include <errno.h>
 
 static gboolean is_pipewire_initialized = FALSE;
 
@@ -53,36 +50,6 @@ grd_spa_pixel_format_to_grd_pixel_format (uint32_t        spa_format,
   return TRUE;
 }
 
-void
-grd_sync_dma_buf (int      fd,
-                  uint64_t start_or_end)
-{
-  struct dma_buf_sync sync = { 0 };
-
-  sync.flags = start_or_end | DMA_BUF_SYNC_READ;
-
-  while (TRUE)
-    {
-      int ret;
-
-      ret = ioctl (fd, DMA_BUF_IOCTL_SYNC, &sync);
-      if (ret == -1 && errno == EINTR)
-        {
-          continue;
-        }
-      else if (ret == -1)
-        {
-          g_warning ("Failed to synchronize DMA buffer: %s",
-                     g_strerror (errno));
-          break;
-        }
-      else
-        {
-          break;
-        }
-    }
-}
-
 static struct
 {
   enum spa_video_format spa_format;
diff --git a/src/grd-pipewire-utils.h b/src/grd-pipewire-utils.h
index 8be6f17..830db6d 100644
--- a/src/grd-pipewire-utils.h
+++ b/src/grd-pipewire-utils.h
@@ -42,9 +42,6 @@ void grd_maybe_initialize_pipewire (void);
 gboolean grd_spa_pixel_format_to_grd_pixel_format (uint32_t        spa_format,
                                                    GrdPixelFormat *out_format);
 
-void grd_sync_dma_buf (int      fd,
-                       uint64_t start_or_end);
-
 void grd_get_spa_format_details (enum spa_video_format  spa_format,
                                  uint32_t              *drm_format,
                                  int                   *bpp);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]