RE: [PATCH 5/7] drm/syncobj: move drm_syncobj_cb into drm_syncobj.c

2018-11-15 Thread Zhou, David(ChunMing)
Reviewed-by: Chunming Zhou 

> -Original Message-
> From: Christian König 
> Sent: Thursday, November 15, 2018 7:13 PM
> To: dri-devel@lists.freedesktop.org
> Cc: ch...@chris-wilson.co.uk; daniel.vet...@ffwll.ch; e...@anholt.net; Zhou,
> David(ChunMing) 
> Subject: [PATCH 5/7] drm/syncobj: move drm_syncobj_cb into
> drm_syncobj.c
> 
> Not used outside the file.
> 
> Signed-off-by: Christian König 
> ---
>  drivers/gpu/drm/drm_syncobj.c | 21 +
>  include/drm/drm_syncobj.h | 21 -
>  2 files changed, 21 insertions(+), 21 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_syncobj.c
> b/drivers/gpu/drm/drm_syncobj.c index 4c45acb326b9..4a2e6ef16979
> 100644
> --- a/drivers/gpu/drm/drm_syncobj.c
> +++ b/drivers/gpu/drm/drm_syncobj.c
> @@ -56,6 +56,27 @@
>  #include "drm_internal.h"
>  #include 
> 
> +struct drm_syncobj_cb;
> +
> +typedef void (*drm_syncobj_func_t)(struct drm_syncobj *syncobj,
> +struct drm_syncobj_cb *cb);
> +
> +/**
> + * struct drm_syncobj_cb - callback for drm_syncobj_add_callback
> + * @node: used by drm_syncob_add_callback to append this struct to
> + * _syncobj.cb_list
> + * @func: drm_syncobj_func_t to call
> + *
> + * This struct will be initialized by drm_syncobj_add_callback,
> +additional
> + * data can be passed along by embedding drm_syncobj_cb in another
> struct.
> + * The callback will get called the next time drm_syncobj_replace_fence
> +is
> + * called.
> + */
> +struct drm_syncobj_cb {
> + struct list_head node;
> + drm_syncobj_func_t func;
> +};
> +
>  static DEFINE_SPINLOCK(stub_fence_lock);  static struct dma_fence
> stub_fence;
> 
> diff --git a/include/drm/drm_syncobj.h b/include/drm/drm_syncobj.h index
> ab9055f943c7..c79f5ada7cdb 100644
> --- a/include/drm/drm_syncobj.h
> +++ b/include/drm/drm_syncobj.h
> @@ -28,8 +28,6 @@
> 
>  #include "linux/dma-fence.h"
> 
> -struct drm_syncobj_cb;
> -
>  /**
>   * struct drm_syncobj - sync object.
>   *
> @@ -62,25 +60,6 @@ struct drm_syncobj {
>   struct file *file;
>  };
> 
> -typedef void (*drm_syncobj_func_t)(struct drm_syncobj *syncobj,
> -struct drm_syncobj_cb *cb);
> -
> -/**
> - * struct drm_syncobj_cb - callback for drm_syncobj_add_callback
> - * @node: used by drm_syncob_add_callback to append this struct to
> - * _syncobj.cb_list
> - * @func: drm_syncobj_func_t to call
> - *
> - * This struct will be initialized by drm_syncobj_add_callback, additional
> - * data can be passed along by embedding drm_syncobj_cb in another
> struct.
> - * The callback will get called the next time drm_syncobj_replace_fence is
> - * called.
> - */
> -struct drm_syncobj_cb {
> - struct list_head node;
> - drm_syncobj_func_t func;
> -};
> -
>  void drm_syncobj_free(struct kref *kref);
> 
>  /**
> --
> 2.14.1

___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


[PATCH 5/7] drm/syncobj: move drm_syncobj_cb into drm_syncobj.c

2018-11-15 Thread Christian König
Not used outside the file.

Signed-off-by: Christian König 
---
 drivers/gpu/drm/drm_syncobj.c | 21 +
 include/drm/drm_syncobj.h | 21 -
 2 files changed, 21 insertions(+), 21 deletions(-)

diff --git a/drivers/gpu/drm/drm_syncobj.c b/drivers/gpu/drm/drm_syncobj.c
index 4c45acb326b9..4a2e6ef16979 100644
--- a/drivers/gpu/drm/drm_syncobj.c
+++ b/drivers/gpu/drm/drm_syncobj.c
@@ -56,6 +56,27 @@
 #include "drm_internal.h"
 #include 
 
+struct drm_syncobj_cb;
+
+typedef void (*drm_syncobj_func_t)(struct drm_syncobj *syncobj,
+  struct drm_syncobj_cb *cb);
+
+/**
+ * struct drm_syncobj_cb - callback for drm_syncobj_add_callback
+ * @node: used by drm_syncob_add_callback to append this struct to
+ *   _syncobj.cb_list
+ * @func: drm_syncobj_func_t to call
+ *
+ * This struct will be initialized by drm_syncobj_add_callback, additional
+ * data can be passed along by embedding drm_syncobj_cb in another struct.
+ * The callback will get called the next time drm_syncobj_replace_fence is
+ * called.
+ */
+struct drm_syncobj_cb {
+   struct list_head node;
+   drm_syncobj_func_t func;
+};
+
 static DEFINE_SPINLOCK(stub_fence_lock);
 static struct dma_fence stub_fence;
 
diff --git a/include/drm/drm_syncobj.h b/include/drm/drm_syncobj.h
index ab9055f943c7..c79f5ada7cdb 100644
--- a/include/drm/drm_syncobj.h
+++ b/include/drm/drm_syncobj.h
@@ -28,8 +28,6 @@
 
 #include "linux/dma-fence.h"
 
-struct drm_syncobj_cb;
-
 /**
  * struct drm_syncobj - sync object.
  *
@@ -62,25 +60,6 @@ struct drm_syncobj {
struct file *file;
 };
 
-typedef void (*drm_syncobj_func_t)(struct drm_syncobj *syncobj,
-  struct drm_syncobj_cb *cb);
-
-/**
- * struct drm_syncobj_cb - callback for drm_syncobj_add_callback
- * @node: used by drm_syncob_add_callback to append this struct to
- *   _syncobj.cb_list
- * @func: drm_syncobj_func_t to call
- *
- * This struct will be initialized by drm_syncobj_add_callback, additional
- * data can be passed along by embedding drm_syncobj_cb in another struct.
- * The callback will get called the next time drm_syncobj_replace_fence is
- * called.
- */
-struct drm_syncobj_cb {
-   struct list_head node;
-   drm_syncobj_func_t func;
-};
-
 void drm_syncobj_free(struct kref *kref);
 
 /**
-- 
2.14.1

___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel