All of lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-gfx] [Patch v3 1/2] drm/i915: Move reg_in_range_table
@ 2023-11-29 20:51 Matt Atwood
  2023-11-29 20:51 ` [Intel-gfx] [Patch v3 2/2] drm/i915: Introduce Wa_1401127433 Matt Atwood
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Matt Atwood @ 2023-11-29 20:51 UTC (permalink / raw)
  To: intel-gfx

Function reg_in_range_table is useful in more places, move function to
intel_uncore.h to make available to more places.

Signed-off-by: Matt Atwood <matthew.s.atwood@intel.com>
---
 drivers/gpu/drm/i915/i915_perf.c    | 13 +------------
 drivers/gpu/drm/i915/intel_uncore.h | 12 ++++++++++++
 2 files changed, 13 insertions(+), 12 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_perf.c b/drivers/gpu/drm/i915/i915_perf.c
index 7b1c8de2f9cb3..5e5dc73621379 100644
--- a/drivers/gpu/drm/i915/i915_perf.c
+++ b/drivers/gpu/drm/i915/i915_perf.c
@@ -219,6 +219,7 @@
 #include "i915_perf.h"
 #include "i915_perf_oa_regs.h"
 #include "i915_reg.h"
+#include "intel_uncore.h"
 
 /* HW requires this to be a power of two, between 128k and 16M, though driver
  * is currently generally designed assuming the largest 16M size is used such
@@ -4324,18 +4325,6 @@ static bool gen8_is_valid_flex_addr(struct i915_perf *perf, u32 addr)
 	return false;
 }
 
-static bool reg_in_range_table(u32 addr, const struct i915_range *table)
-{
-	while (table->start || table->end) {
-		if (addr >= table->start && addr <= table->end)
-			return true;
-
-		table++;
-	}
-
-	return false;
-}
-
 #define REG_EQUAL(addr, mmio) \
 	((addr) == i915_mmio_reg_offset(mmio))
 
diff --git a/drivers/gpu/drm/i915/intel_uncore.h b/drivers/gpu/drm/i915/intel_uncore.h
index f419c311a0dea..1e85eaec1fc5a 100644
--- a/drivers/gpu/drm/i915/intel_uncore.h
+++ b/drivers/gpu/drm/i915/intel_uncore.h
@@ -496,6 +496,18 @@ static inline int intel_uncore_write_and_verify(struct intel_uncore *uncore,
 	return (reg_val & mask) != expected_val ? -EINVAL : 0;
 }
 
+static inline bool reg_in_range_table(u32 addr, const struct i915_range *table)
+{
+	while (table->start || table->end) {
+		if (addr >= table->start && addr <= table->end)
+			return true;
+
+		table++;
+	}
+
+	return false;
+}
+
 static inline void __iomem *intel_uncore_regs(struct intel_uncore *uncore)
 {
 	return uncore->regs;
-- 
2.40.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-12-01 22:07 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-29 20:51 [Intel-gfx] [Patch v3 1/2] drm/i915: Move reg_in_range_table Matt Atwood
2023-11-29 20:51 ` [Intel-gfx] [Patch v3 2/2] drm/i915: Introduce Wa_1401127433 Matt Atwood
2023-12-01 22:05   ` Matt Roper
2023-11-30  6:58 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [v3,1/2] drm/i915: Move reg_in_range_table Patchwork
2023-11-30  6:58 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2023-11-30  7:17 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork
2023-11-30 20:00 ` [Intel-gfx] [Patch v3 1/2] " Rodrigo Vivi
2023-12-01 22:07   ` Matt Roper

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.