[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200109171357.115936-5-julian.stecklina@cyberus-technology.de>
Date: Thu, 9 Jan 2020 19:13:57 +0200
From: Julian Stecklina <julian.stecklina@...erus-technology.de>
To: intel-gvt-dev@...ts.freedesktop.org
Cc: dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
zhiyuan.lv@...el.com, hang.yuan@...el.com,
Julian Stecklina <julian.stecklina@...erus-technology.de>,
Zhenyu Wang <zhenyuw@...ux.intel.com>
Subject: [RFC PATCH 4/4] drm/i915/gvt: move public gvt headers out into global include
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@...ux.intel.com>
Signed-off-by: Julian Stecklina <julian.stecklina@...erus-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@...el.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
Powered by blists - more mailing lists