diff mbox series

[v12,6/6] ui/console: move QemuDmaBuf struct def to dmabuf.c

Message ID 20240425015342.1033815-7-dongwon.kim@intel.com
State New
Headers show
Series ui/console: Private QemuDmaBuf struct | expand

Commit Message

Kim, Dongwon April 25, 2024, 1:53 a.m. UTC
From: Dongwon Kim <dongwon.kim@intel.com>

To complete privatizing process of QemuDmaBuf, QemuDmaBuf struct def
is moved to dmabuf.c

Suggested-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Cc: Philippe Mathieu-Daudé <philmd@linaro.org>
Cc: Daniel P. Berrangé <berrange@redhat.com>
Cc: Vivek Kasireddy <vivek.kasireddy@intel.com>
Signed-off-by: Dongwon Kim <dongwon.kim@intel.com>
---
 include/ui/dmabuf.h | 19 +------------------
 ui/dmabuf.c         | 19 +++++++++++++++++++
 2 files changed, 20 insertions(+), 18 deletions(-)

Comments

Marc-André Lureau May 7, 2024, 1:37 p.m. UTC | #1
On Thu, Apr 25, 2024 at 5:58 AM <dongwon.kim@intel.com> wrote:
>
> From: Dongwon Kim <dongwon.kim@intel.com>
>
> To complete privatizing process of QemuDmaBuf, QemuDmaBuf struct def
> is moved to dmabuf.c
>
> Suggested-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> Cc: Philippe Mathieu-Daudé <philmd@linaro.org>
> Cc: Daniel P. Berrangé <berrange@redhat.com>
> Cc: Vivek Kasireddy <vivek.kasireddy@intel.com>
> Signed-off-by: Dongwon Kim <dongwon.kim@intel.com>

Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>

> ---
>  include/ui/dmabuf.h | 19 +------------------
>  ui/dmabuf.c         | 19 +++++++++++++++++++
>  2 files changed, 20 insertions(+), 18 deletions(-)
>
> diff --git a/include/ui/dmabuf.h b/include/ui/dmabuf.h
> index 4198cdf85a..dc74ba895a 100644
> --- a/include/ui/dmabuf.h
> +++ b/include/ui/dmabuf.h
> @@ -10,24 +10,7 @@
>  #ifndef DMABUF_H
>  #define DMABUF_H
>
> -typedef struct QemuDmaBuf {
> -    int       fd;
> -    uint32_t  width;
> -    uint32_t  height;
> -    uint32_t  stride;
> -    uint32_t  fourcc;
> -    uint64_t  modifier;
> -    uint32_t  texture;
> -    uint32_t  x;
> -    uint32_t  y;
> -    uint32_t  backing_width;
> -    uint32_t  backing_height;
> -    bool      y0_top;
> -    void      *sync;
> -    int       fence_fd;
> -    bool      allow_fences;
> -    bool      draw_submitted;
> -} QemuDmaBuf;
> +typedef struct QemuDmaBuf QemuDmaBuf;
>
>  QemuDmaBuf *qemu_dmabuf_new(uint32_t width, uint32_t height,
>                              uint32_t stride, uint32_t x,
> diff --git a/ui/dmabuf.c b/ui/dmabuf.c
> index e047d5ca26..df7a09703f 100644
> --- a/ui/dmabuf.c
> +++ b/ui/dmabuf.c
> @@ -10,6 +10,25 @@
>  #include "qemu/osdep.h"
>  #include "ui/dmabuf.h"
>
> +struct QemuDmaBuf {
> +    int       fd;
> +    uint32_t  width;
> +    uint32_t  height;
> +    uint32_t  stride;
> +    uint32_t  fourcc;
> +    uint64_t  modifier;
> +    uint32_t  texture;
> +    uint32_t  x;
> +    uint32_t  y;
> +    uint32_t  backing_width;
> +    uint32_t  backing_height;
> +    bool      y0_top;
> +    void      *sync;
> +    int       fence_fd;
> +    bool      allow_fences;
> +    bool      draw_submitted;
> +};
> +
>  QemuDmaBuf *qemu_dmabuf_new(uint32_t width, uint32_t height,
>                              uint32_t stride, uint32_t x,
>                              uint32_t y, uint32_t backing_width,
> --
> 2.34.1
>
diff mbox series

Patch

diff --git a/include/ui/dmabuf.h b/include/ui/dmabuf.h
index 4198cdf85a..dc74ba895a 100644
--- a/include/ui/dmabuf.h
+++ b/include/ui/dmabuf.h
@@ -10,24 +10,7 @@ 
 #ifndef DMABUF_H
 #define DMABUF_H
 
-typedef struct QemuDmaBuf {
-    int       fd;
-    uint32_t  width;
-    uint32_t  height;
-    uint32_t  stride;
-    uint32_t  fourcc;
-    uint64_t  modifier;
-    uint32_t  texture;
-    uint32_t  x;
-    uint32_t  y;
-    uint32_t  backing_width;
-    uint32_t  backing_height;
-    bool      y0_top;
-    void      *sync;
-    int       fence_fd;
-    bool      allow_fences;
-    bool      draw_submitted;
-} QemuDmaBuf;
+typedef struct QemuDmaBuf QemuDmaBuf;
 
 QemuDmaBuf *qemu_dmabuf_new(uint32_t width, uint32_t height,
                             uint32_t stride, uint32_t x,
diff --git a/ui/dmabuf.c b/ui/dmabuf.c
index e047d5ca26..df7a09703f 100644
--- a/ui/dmabuf.c
+++ b/ui/dmabuf.c
@@ -10,6 +10,25 @@ 
 #include "qemu/osdep.h"
 #include "ui/dmabuf.h"
 
+struct QemuDmaBuf {
+    int       fd;
+    uint32_t  width;
+    uint32_t  height;
+    uint32_t  stride;
+    uint32_t  fourcc;
+    uint64_t  modifier;
+    uint32_t  texture;
+    uint32_t  x;
+    uint32_t  y;
+    uint32_t  backing_width;
+    uint32_t  backing_height;
+    bool      y0_top;
+    void      *sync;
+    int       fence_fd;
+    bool      allow_fences;
+    bool      draw_submitted;
+};
+
 QemuDmaBuf *qemu_dmabuf_new(uint32_t width, uint32_t height,
                             uint32_t stride, uint32_t x,
                             uint32_t y, uint32_t backing_width,