Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: intel-gvt-dev@lists.freedesktop.org
Cc: Jani Nikula <jani.nikula@intel.com>, intel-gfx@lists.freedesktop.org
Subject: [Intel-gfx] [PATCH 4/4] drm/i915/gvt: move structs intel_gvt_irq_info and intel_gvt_irq_map to interrupt.c
Date: Tue, 26 Sep 2023 15:19:04 +0300	[thread overview]
Message-ID: <20230926121904.499888-4-jani.nikula@intel.com> (raw)
In-Reply-To: <20230926121904.499888-1-jani.nikula@intel.com>

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>
---
 drivers/gpu/drm/i915/gvt/interrupt.c | 17 +++++++++++++++
 drivers/gpu/drm/i915/gvt/interrupt.h | 31 ++++++----------------------
 2 files changed, 23 insertions(+), 25 deletions(-)

diff --git a/drivers/gpu/drm/i915/gvt/interrupt.c b/drivers/gpu/drm/i915/gvt/interrupt.c
index 68eca023bbc6..de3f5903d1a7 100644
--- a/drivers/gpu/drm/i915/gvt/interrupt.c
+++ b/drivers/gpu/drm/i915/gvt/interrupt.c
@@ -36,6 +36,23 @@
 #include "gvt.h"
 #include "trace.h"
 
+struct intel_gvt_irq_info {
+	char *name;
+	i915_reg_t reg_base;
+	enum intel_gvt_event_type bit_to_event[INTEL_GVT_IRQ_BITWIDTH];
+	unsigned long warned;
+	int group;
+	DECLARE_BITMAP(downstream_irq_bitmap, INTEL_GVT_IRQ_BITWIDTH);
+	bool has_upstream_irq;
+};
+
+struct intel_gvt_irq_map {
+	int up_irq_group;
+	int up_irq_bit;
+	int down_irq_group;
+	u32 down_irq_bitmask;
+};
+
 /* common offset among interrupt control registers */
 #define regbase_to_isr(base)	(base)
 #define regbase_to_imr(base)	(base + 0x4)
diff --git a/drivers/gpu/drm/i915/gvt/interrupt.h b/drivers/gpu/drm/i915/gvt/interrupt.h
index b62f04ab47cb..e60ad476fe60 100644
--- a/drivers/gpu/drm/i915/gvt/interrupt.h
+++ b/drivers/gpu/drm/i915/gvt/interrupt.h
@@ -32,10 +32,13 @@
 #ifndef _GVT_INTERRUPT_H_
 #define _GVT_INTERRUPT_H_
 
-#include <linux/hrtimer.h>
-#include <linux/kernel.h>
+#include <linux/bitops.h>
 
-#include "i915_reg_defs.h"
+struct intel_gvt;
+struct intel_gvt_irq;
+struct intel_gvt_irq_info;
+struct intel_gvt_irq_map;
+struct intel_vgpu;
 
 enum intel_gvt_event_type {
 	RCS_MI_USER_INTERRUPT = 0,
@@ -138,10 +141,6 @@ enum intel_gvt_event_type {
 	INTEL_GVT_EVENT_MAX,
 };
 
-struct intel_gvt_irq;
-struct intel_gvt;
-struct intel_vgpu;
-
 typedef void (*gvt_event_virt_handler_t)(struct intel_gvt_irq *irq,
 	enum intel_gvt_event_type event, struct intel_vgpu *vgpu);
 
@@ -175,17 +174,6 @@ enum intel_gvt_irq_type {
 
 #define INTEL_GVT_IRQ_BITWIDTH	32
 
-/* device specific interrupt bit definitions */
-struct intel_gvt_irq_info {
-	char *name;
-	i915_reg_t reg_base;
-	enum intel_gvt_event_type bit_to_event[INTEL_GVT_IRQ_BITWIDTH];
-	unsigned long warned;
-	int group;
-	DECLARE_BITMAP(downstream_irq_bitmap, INTEL_GVT_IRQ_BITWIDTH);
-	bool has_upstream_irq;
-};
-
 /* per-event information */
 struct intel_gvt_event_info {
 	int bit;				/* map to register bit */
@@ -194,13 +182,6 @@ struct intel_gvt_event_info {
 	gvt_event_virt_handler_t v_handler;	/* for v_event */
 };
 
-struct intel_gvt_irq_map {
-	int up_irq_group;
-	int up_irq_bit;
-	int down_irq_group;
-	u32 down_irq_bitmask;
-};
-
 /* structure containing device specific IRQ state */
 struct intel_gvt_irq {
 	const struct intel_gvt_irq_ops *ops;
-- 
2.39.2


  parent reply	other threads:[~2023-09-26 12:19 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-26 12:19 [Intel-gfx] [PATCH 1/4] drm/i915/gvt: remove unused to_gvt() and reduce includes Jani Nikula
2023-09-26 12:19 ` [Intel-gfx] [PATCH 2/4] drm/i915/gvt: don't include gvt.h from intel_gvt_mmio_table.h Jani Nikula
2023-09-26 12:19 ` [Intel-gfx] [PATCH 3/4] drm/i915/gvt: move struct engine_mmio to mmio_context.c Jani Nikula
2023-09-26 12:19 ` Jani Nikula [this message]
2023-09-26 20:20 ` [Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [1/4] drm/i915/gvt: remove unused to_gvt() and reduce includes Patchwork
2023-09-27  8:34 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2023-10-04 12:54 ` [Intel-gfx] [PATCH 1/4] " Jani Nikula
2023-10-04 16:03   ` Wang, Zhi A
2023-10-04 16:33     ` Jani Nikula
2023-10-04 17:02       ` Wang, Zhi A
2023-10-11  5:07   ` Zhenyu Wang
2023-10-11  7:04     ` Jani Nikula
2023-10-11  8:44       ` Zhenyu Wang
2023-10-11 11:36         ` Jani Nikula

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=20230926121904.499888-4-jani.nikula@intel.com \
    --to=jani.nikula@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-gvt-dev@lists.freedesktop.org \
    /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