nouveau/ws: reorganize a little
authorKarol Herbst <kherbst@redhat.com>
Fri, 20 May 2022 13:20:55 +0000 (15:20 +0200)
committerMarge Bot <emma+marge@anholt.net>
Fri, 4 Aug 2023 21:31:52 +0000 (21:31 +0000)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>

src/nouveau/winsys/nouveau_device.c
src/nouveau/winsys/nouveau_device.h

index e851ce0..098f887 100644 (file)
@@ -6,23 +6,8 @@
 #include <nvif/cl0080.h>
 #include <nvif/class.h>
 
-#include <stddef.h>
-
 #include "util/os_misc.h"
 
-struct nouveau_ws_device_priv {
-   struct nouveau_ws_device base;
-   struct nouveau_drm *drm;
-   struct nouveau_device *dev;
-   int fd;
-};
-
-static struct nouveau_ws_device_priv *
-nouveau_ws_device(struct nouveau_ws_device *dev)
-{
-   return container_of(dev, struct nouveau_ws_device_priv, base);
-}
-
 struct nouveau_ws_device *
 nouveau_ws_device_new(int fd)
 {
index 2f0f522..391f5dc 100644 (file)
@@ -3,6 +3,8 @@
 
 #include "nouveau_private.h"
 
+#include <stddef.h>
+
 struct nouveau_ws_device {
    uint16_t vendor_id;
    uint16_t device_id;
@@ -12,6 +14,20 @@ struct nouveau_ws_device {
    bool is_integrated;
 };
 
+/* don't use directly, gets removed once the new UAPI is here */
+struct nouveau_ws_device_priv {
+   struct nouveau_ws_device base;
+   struct nouveau_drm *drm;
+   struct nouveau_device *dev;
+   int fd;
+};
+
+static struct nouveau_ws_device_priv *
+nouveau_ws_device(struct nouveau_ws_device *dev)
+{
+   return container_of(dev, struct nouveau_ws_device_priv, base);
+}
+
 struct nouveau_ws_device *nouveau_ws_device_new(int fd);
 void nouveau_ws_device_destroy(struct nouveau_ws_device *);