dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Julian Stecklina <julian.stecklina@cyberus-technology.de>
To: intel-gvt-dev@lists.freedesktop.org
Cc: Julian Stecklina <julian.stecklina@cyberus-technology.de>,
	linux-kernel@vger.kernel.org, hang.yuan@intel.com,
	dri-devel@lists.freedesktop.org, zhiyuan.lv@intel.com
Subject: [RFC PATCH 4/4] drm/i915/gvt: move public gvt headers out into global include
Date: Thu,  9 Jan 2020 19:13:57 +0200	[thread overview]
Message-ID: <20200109171357.115936-5-julian.stecklina@cyberus-technology.de> (raw)
In-Reply-To: <20200109171357.115936-1-julian.stecklina@cyberus-technology.de>

Now that the GVT interface to hypervisors does not depend on i915/GVT
internals anymore, we can move the headers to the global include/.

This makes out-of-tree modules for hypervisor integration possible.

Cc: Zhenyu Wang <zhenyuw@linux.intel.com>

Signed-off-by: Julian Stecklina <julian.stecklina@cyberus-technology.de>
---
 drivers/gpu/drm/i915/gvt/gvt.h                         |  3 +--
 drivers/gpu/drm/i915/gvt/kvmgt.c                       |  2 +-
 .../i915/gvt/gvt_public.h => include/drm/i915_gvt.h    |  8 ++++----
 .../hypercall.h => include/drm/i915_gvt_hypercall.h    | 10 +++++++---
 4 files changed, 13 insertions(+), 10 deletions(-)
 rename drivers/gpu/drm/i915/gvt/gvt_public.h => include/drm/i915_gvt.h (97%)
 rename drivers/gpu/drm/i915/gvt/hypercall.h => include/drm/i915_gvt_hypercall.h (95%)

diff --git a/drivers/gpu/drm/i915/gvt/gvt.h b/drivers/gpu/drm/i915/gvt/gvt.h
index f9693c44e342..d09374aa7710 100644
--- a/drivers/gpu/drm/i915/gvt/gvt.h
+++ b/drivers/gpu/drm/i915/gvt/gvt.h
@@ -33,9 +33,8 @@
 #ifndef _GVT_H_
 #define _GVT_H_
 
-#include "gvt_public.h"
+#include <drm/i915_gvt.h>
 #include "debug.h"
-#include "hypercall.h"
 #include "mmio.h"
 #include "reg.h"
 #include "interrupt.h"
diff --git a/drivers/gpu/drm/i915/gvt/kvmgt.c b/drivers/gpu/drm/i915/gvt/kvmgt.c
index f5157211d45f..280d69ca964b 100644
--- a/drivers/gpu/drm/i915/gvt/kvmgt.c
+++ b/drivers/gpu/drm/i915/gvt/kvmgt.c
@@ -28,6 +28,7 @@
  *    Xiaoguang Chen <xiaoguang.chen@intel.com>
  */
 
+#include <drm/i915_gvt.h>
 #include <drm/drm_edid.h>
 #include <linux/init.h>
 #include <linux/device.h>
@@ -52,7 +53,6 @@
 #include <linux/nospec.h>
 
 #include "debug.h"
-#include "gvt_public.h"
 
 static const struct intel_gvt_ops *intel_gvt_ops;
 
diff --git a/drivers/gpu/drm/i915/gvt/gvt_public.h b/include/drm/i915_gvt.h
similarity index 97%
rename from drivers/gpu/drm/i915/gvt/gvt_public.h
rename to include/drm/i915_gvt.h
index 23bf1235e1a1..3926ca32f773 100644
--- a/drivers/gpu/drm/i915/gvt/gvt_public.h
+++ b/include/drm/i915_gvt.h
@@ -21,10 +21,10 @@
  * SOFTWARE.
  */
 
-#ifndef _GVT_PUBLIC_H_
-#define _GVT_PUBLIC_H_
+#ifndef _I915_GVT_H_
+#define _I915_GVT_H_
 
-#include "hypercall.h"
+#include <drm/i915_gvt_hypercall.h>
 
 struct attribute;
 struct attribute_group;
@@ -101,4 +101,4 @@ bool intel_gvt_in_gtt(struct intel_vgpu *vgpu, u64 off);
 
 struct dentry *intel_vgpu_debugfs(struct intel_vgpu *vgpu);
 
-#endif /* _GVT_PUBLIC_H_ */
+#endif /* _I915_GVT_H_ */
diff --git a/drivers/gpu/drm/i915/gvt/hypercall.h b/include/drm/i915_gvt_hypercall.h
similarity index 95%
rename from drivers/gpu/drm/i915/gvt/hypercall.h
rename to include/drm/i915_gvt_hypercall.h
index 7ed33e4919a3..c26eef7dbdde 100644
--- a/drivers/gpu/drm/i915/gvt/hypercall.h
+++ b/include/drm/i915_gvt_hypercall.h
@@ -30,8 +30,12 @@
  *
  */
 
-#ifndef _GVT_HYPERCALL_H_
-#define _GVT_HYPERCALL_H_
+#ifndef _I915_GVT_HYPERCALL_H_
+#define _I915_GVT_HYPERCALL_H_
+
+#include <linux/types.h>
+
+struct device;
 
 #include <linux/types.h>
 
@@ -84,4 +88,4 @@ extern struct intel_gvt_mpt xengt_mpt;
 int intel_gvt_register_hypervisor(struct intel_gvt_mpt *);
 void intel_gvt_unregister_hypervisor(void);
 
-#endif /* _GVT_HYPERCALL_H_ */
+#endif /* _I915_GVT_HYPERCALL_H_ */
-- 
2.24.1

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

  parent reply	other threads:[~2020-01-09 17:14 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <4079ce7c26a2d2a3c7e0828ed1ea6008d6e2c805.camel@cyberus-technology.de>
2020-01-09 17:13 ` [RFC PATCH 0/4] Support for out-of-tree hypervisor modules in i915/gvt Julian Stecklina
2020-01-09 17:13   ` [RFC PATCH 1/4] drm/i915/gvt: make gvt oblivious of kvmgt data structures Julian Stecklina
2020-01-20  6:22     ` Zhenyu Wang
2020-01-20  6:33       ` Zhenyu Wang
2020-01-20 17:25         ` [PATCH] " Julian Stecklina
2020-01-20 17:28         ` [RFC PATCH 1/4] " Julian Stecklina
2020-01-09 17:13   ` [RFC PATCH 2/4] drm/i915/gvt: remove unused vblank_done completion Julian Stecklina
2020-01-20  6:23     ` Zhenyu Wang
2020-01-09 17:13   ` [RFC PATCH 3/4] drm/i915/gvt: define a public interface to gvt Julian Stecklina
2020-01-09 17:13   ` Julian Stecklina [this message]
2020-01-15 15:22     ` [RFC PATCH 4/4] drm/i915/gvt: move public gvt headers out into global include Greg KH
2020-01-16 14:13       ` Julian Stecklina
2020-01-16 14:23         ` Greg KH
2020-01-16 15:05           ` Julian Stecklina
2020-01-16 19:48             ` Greg KH
2020-01-17  2:15         ` Zhenyu Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200109171357.115936-5-julian.stecklina@cyberus-technology.de \
    --to=julian.stecklina@cyberus-technology.de \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hang.yuan@intel.com \
    --cc=intel-gvt-dev@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=zhiyuan.lv@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).