Files
linux/drivers/gpu/drm/i915/i915_mmio_range.c
Matt Atwood 27e2151691 drm/i915: move and rename reg_in_range_table
reg_in_range_table is a useful function that is used in multiple places,
and will be needed for WA_BB implementation later.

Let's move this function and i915_range struct to its own file, as we are
trying to move away from i915_utils files.

v2: move functions to their own file
v3: use correct naming convention

Suggested-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Matt Atwood <matthew.s.atwood@intel.com>
Link:
https://lore.kernel.org/r/20251009215210.41000-1-matthew.s.atwood@intel.com
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2025-10-16 15:20:56 -04:00

19 lines
331 B
C

// SPDX-License-Identifier: MIT
/*
* Copyright © 2025 Intel Corporation
*/
#include "i915_mmio_range.h"
bool i915_mmio_range_table_contains(u32 addr, const struct i915_mmio_range *table)
{
while (table->start || table->end) {
if (addr >= table->start && addr <= table->end)
return true;
table++;
}
return false;
}