Skip to content

Commit 906cdb2

Browse files
committed
drm/i915/gvt: move structs intel_gvt_irq_info and intel_gvt_irq_map to interrupt.c
Structs intel_gvt_irq_info and intel_gvt_irq_map are not used outside of interrupt.c. Hide them, 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-4-jani.nikula@intel.com
1 parent 21c828a commit 906cdb2

2 files changed

Lines changed: 23 additions & 25 deletions

File tree

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

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,23 @@
3636
#include "gvt.h"
3737
#include "trace.h"
3838

39+
struct intel_gvt_irq_info {
40+
char *name;
41+
i915_reg_t reg_base;
42+
enum intel_gvt_event_type bit_to_event[INTEL_GVT_IRQ_BITWIDTH];
43+
unsigned long warned;
44+
int group;
45+
DECLARE_BITMAP(downstream_irq_bitmap, INTEL_GVT_IRQ_BITWIDTH);
46+
bool has_upstream_irq;
47+
};
48+
49+
struct intel_gvt_irq_map {
50+
int up_irq_group;
51+
int up_irq_bit;
52+
int down_irq_group;
53+
u32 down_irq_bitmask;
54+
};
55+
3956
/* common offset among interrupt control registers */
4057
#define regbase_to_isr(base) (base)
4158
#define regbase_to_imr(base) (base + 0x4)

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

Lines changed: 6 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,13 @@
3232
#ifndef _GVT_INTERRUPT_H_
3333
#define _GVT_INTERRUPT_H_
3434

35-
#include <linux/hrtimer.h>
36-
#include <linux/kernel.h>
35+
#include <linux/bitops.h>
3736

38-
#include "i915_reg_defs.h"
37+
struct intel_gvt;
38+
struct intel_gvt_irq;
39+
struct intel_gvt_irq_info;
40+
struct intel_gvt_irq_map;
41+
struct intel_vgpu;
3942

4043
enum intel_gvt_event_type {
4144
RCS_MI_USER_INTERRUPT = 0,
@@ -138,10 +141,6 @@ enum intel_gvt_event_type {
138141
INTEL_GVT_EVENT_MAX,
139142
};
140143

141-
struct intel_gvt_irq;
142-
struct intel_gvt;
143-
struct intel_vgpu;
144-
145144
typedef void (*gvt_event_virt_handler_t)(struct intel_gvt_irq *irq,
146145
enum intel_gvt_event_type event, struct intel_vgpu *vgpu);
147146

@@ -175,17 +174,6 @@ enum intel_gvt_irq_type {
175174

176175
#define INTEL_GVT_IRQ_BITWIDTH 32
177176

178-
/* device specific interrupt bit definitions */
179-
struct intel_gvt_irq_info {
180-
char *name;
181-
i915_reg_t reg_base;
182-
enum intel_gvt_event_type bit_to_event[INTEL_GVT_IRQ_BITWIDTH];
183-
unsigned long warned;
184-
int group;
185-
DECLARE_BITMAP(downstream_irq_bitmap, INTEL_GVT_IRQ_BITWIDTH);
186-
bool has_upstream_irq;
187-
};
188-
189177
/* per-event information */
190178
struct intel_gvt_event_info {
191179
int bit; /* map to register bit */
@@ -194,13 +182,6 @@ struct intel_gvt_event_info {
194182
gvt_event_virt_handler_t v_handler; /* for v_event */
195183
};
196184

197-
struct intel_gvt_irq_map {
198-
int up_irq_group;
199-
int up_irq_bit;
200-
int down_irq_group;
201-
u32 down_irq_bitmask;
202-
};
203-
204185
/* structure containing device specific IRQ state */
205186
struct intel_gvt_irq {
206187
const struct intel_gvt_irq_ops *ops;

0 commit comments

Comments
 (0)