Skip to content

Commit 21c828a

Browse files
committed
drm/i915/gvt: move struct engine_mmio to mmio_context.c
struct engine_mmio is not used outside of mmio_context.c. Hide it, and reduce includes. Signed-off-by: Jani Nikula <jani.nikula@intel.com> Reviewed-by: Zhenyu Wang <zhenyuw@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230926121904.499888-3-jani.nikula@intel.com
1 parent 80cf8f1 commit 21c828a

3 files changed

Lines changed: 10 additions & 10 deletions

File tree

drivers/gpu/drm/i915/gvt/gvt.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@
6060

6161
#define GVT_MAX_VGPU 8
6262

63+
struct engine_mmio;
64+
6365
/* Describe per-platform limitations. */
6466
struct intel_gvt_device_info {
6567
u32 max_support_vgpus;

drivers/gpu/drm/i915/gvt/mmio_context.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,14 @@
4545

4646
#define GEN9_MOCS_SIZE 64
4747

48+
struct engine_mmio {
49+
enum intel_engine_id id;
50+
i915_reg_t reg;
51+
u32 mask;
52+
bool in_context;
53+
u32 value;
54+
};
55+
4856
/* Raw offset is appened to each line for convenience. */
4957
static struct engine_mmio gen8_engine_mmio_list[] __cacheline_aligned = {
5058
{RCS0, RING_MODE_GEN7(RENDER_RING_BASE), 0xffff, false}, /* 0x229c */

drivers/gpu/drm/i915/gvt/mmio_context.h

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,23 +39,13 @@
3939
#include <linux/types.h>
4040

4141
#include "gt/intel_engine_regs.h"
42-
#include "gt/intel_engine_types.h"
43-
#include "gt/intel_lrc_reg.h"
4442

4543
struct i915_request;
4644
struct intel_context;
4745
struct intel_engine_cs;
4846
struct intel_gvt;
4947
struct intel_vgpu;
5048

51-
struct engine_mmio {
52-
enum intel_engine_id id;
53-
i915_reg_t reg;
54-
u32 mask;
55-
bool in_context;
56-
u32 value;
57-
};
58-
5949
void intel_gvt_switch_mmio(struct intel_vgpu *pre,
6050
struct intel_vgpu *next,
6151
const struct intel_engine_cs *engine);

0 commit comments

Comments
 (0)