@@ -108,7 +108,7 @@ intel_pin_and_fence_fb_obj(struct drm_framebuffer *fb,
* we should always have valid PTE following the scanout preventing
* the VT-d warning.
*/
- if (intel_scanout_needs_vtd_wa(dev_priv) && alignment < 256 * 1024)
+ if (intel_vtd_scanout_needs_wa(dev_priv) && alignment < 256 * 1024)
alignment = 256 * 1024;
/*
@@ -123,7 +123,7 @@ i915_gem_shrink(struct i915_gem_ww_ctx *ww,
int err = 0;
/* CHV + VTD workaround use stop_machine(); need to trylock vm->mutex */
- bool trylock_vm = !ww && intel_vm_no_concurrent_access_wa(i915);
+ bool trylock_vm = !ww && intel_vtd_vm_no_concurrent_access_wa(i915);
trace_i915_gem_shrink(i915, target, shrink);
@@ -974,7 +974,7 @@ static int gen8_gmch_probe(struct i915_ggtt *ggtt)
ggtt->vm.cleanup = gen6_gmch_remove;
ggtt->vm.insert_page = gen8_ggtt_insert_page;
ggtt->vm.clear_range = nop_clear_range;
- if (intel_scanout_needs_vtd_wa(i915))
+ if (intel_vtd_scanout_needs_wa(i915))
ggtt->vm.clear_range = gen8_ggtt_clear_range;
ggtt->vm.insert_entries = gen8_ggtt_insert_entries;
@@ -983,7 +983,7 @@ static int gen8_gmch_probe(struct i915_ggtt *ggtt)
* Serialize GTT updates with aperture access on BXT if VT-d is on,
* and always on CHV.
*/
- if (intel_vm_no_concurrent_access_wa(i915)) {
+ if (intel_vtd_vm_no_concurrent_access_wa(i915)) {
ggtt->vm.insert_entries = bxt_vtd_ggtt_insert_entries__BKL;
ggtt->vm.insert_page = bxt_vtd_ggtt_insert_page__BKL;
ggtt->vm.bind_async_flags =
@@ -1122,7 +1122,7 @@ static int gen6_gmch_probe(struct i915_ggtt *ggtt)
ggtt->vm.alloc_scratch_dma = alloc_pt_dma;
ggtt->vm.clear_range = nop_clear_range;
- if (!HAS_FULL_PPGTT(i915) || intel_scanout_needs_vtd_wa(i915))
+ if (!HAS_FULL_PPGTT(i915) || intel_vtd_scanout_needs_wa(i915))
ggtt->vm.clear_range = gen6_ggtt_clear_range;
ggtt->vm.insert_page = gen6_ggtt_insert_page;
ggtt->vm.insert_entries = gen6_ggtt_insert_entries;
@@ -206,7 +206,7 @@ void i915_address_space_init(struct i915_address_space *vm, int subclass)
mutex_init(&vm->mutex);
lockdep_set_subclass(&vm->mutex, subclass);
- if (!intel_vm_no_concurrent_access_wa(vm->i915)) {
+ if (!intel_vtd_vm_no_concurrent_access_wa(vm->i915)) {
i915_gem_shrinker_taints_mutex(vm->i915, &vm->mutex);
} else {
/*
@@ -66,7 +66,7 @@ static int i915_capabilities(struct seq_file *m, void *data)
intel_device_info_print_static(INTEL_INFO(i915), &p);
intel_device_info_print_runtime(RUNTIME_INFO(i915), &p);
- i915_print_iommu_status(i915, &p);
+ intel_vtd_print_iommu_status(i915, &p);
intel_gt_info_print(&to_gt(i915)->info, &p);
intel_driver_caps_print(&i915->caps, &p);
@@ -762,7 +762,7 @@ static void i915_welcome_messages(struct drm_i915_private *dev_priv)
intel_device_info_print_static(INTEL_INFO(dev_priv), &p);
intel_device_info_print_runtime(RUNTIME_INFO(dev_priv), &p);
- i915_print_iommu_status(dev_priv, &p);
+ intel_vtd_print_iommu_status(dev_priv, &p);
intel_gt_info_print(&to_gt(dev_priv)->info, &p);
}
@@ -256,7 +256,7 @@ void intel_detect_pch(struct drm_i915_private *dev_priv)
dev_priv->pch_type = PCH_NOP;
dev_priv->pch_id = 0;
} else if (!pch) {
- if (run_as_guest() && HAS_DISPLAY(dev_priv)) {
+ if (intel_vtd_run_as_guest() && HAS_DISPLAY(dev_priv)) {
intel_virt_detect_pch(dev_priv, &id, &pch_type);
dev_priv->pch_type = pch_type;
dev_priv->pch_id = id;
@@ -8,7 +8,7 @@
#include "intel_vtd.h"
void
-i915_print_iommu_status(struct drm_i915_private *i915, struct drm_printer *p)
+intel_vtd_print_iommu_status(struct drm_i915_private *i915, struct drm_printer *p)
{
drm_printf(p, "iommu: %s\n", enableddisabled(intel_vtd_active(i915)));
}
@@ -14,7 +14,7 @@
struct drm_printer;
-static inline bool run_as_guest(void)
+static inline bool intel_vtd_run_as_guest(void)
{
return !hypervisor_is_type(X86_HYPER_NATIVE);
}
@@ -25,27 +25,27 @@ static inline bool intel_vtd_active(struct drm_i915_private *i915)
return true;
/* Running as a guest, we assume the host is enforcing VT'd */
- return run_as_guest();
+ return intel_vtd_run_as_guest();
}
-static inline bool intel_scanout_needs_vtd_wa(struct drm_i915_private *i915)
+static inline bool intel_vtd_scanout_needs_wa(struct drm_i915_private *i915)
{
return GRAPHICS_VER(i915) >= 6 && intel_vtd_active(i915);
}
static inline bool
-intel_ggtt_update_needs_vtd_wa(struct drm_i915_private *i915)
+intel_vtd_ggtt_update_needs_wa(struct drm_i915_private *i915)
{
return IS_BROXTON(i915) && intel_vtd_active(i915);
}
static inline bool
-intel_vm_no_concurrent_access_wa(struct drm_i915_private *i915)
+intel_vtd_vm_no_concurrent_access_wa(struct drm_i915_private *i915)
{
- return IS_CHERRYVIEW(i915) || intel_ggtt_update_needs_vtd_wa(i915);
+ return IS_CHERRYVIEW(i915) || intel_vtd_ggtt_update_needs_wa(i915);
}
void
-i915_print_iommu_status(struct drm_i915_private *i915, struct drm_printer *p);
+intel_vtd_print_iommu_status(struct drm_i915_private *i915, struct drm_printer *p);
#endif /* __INTEL_VTD_H__ */
The prefix should tell where the function is to be found and where it belongs. Cc: Daniel Vetter <daniel@ffwll.ch> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com> --- drivers/gpu/drm/i915/display/intel_fb_pin.c | 2 +- drivers/gpu/drm/i915/gem/i915_gem_shrinker.c | 2 +- drivers/gpu/drm/i915/gt/intel_ggtt.c | 6 +++--- drivers/gpu/drm/i915/gt/intel_gtt.c | 2 +- drivers/gpu/drm/i915/i915_debugfs.c | 2 +- drivers/gpu/drm/i915/i915_driver.c | 2 +- drivers/gpu/drm/i915/intel_pch.c | 2 +- drivers/gpu/drm/i915/intel_vtd.c | 2 +- drivers/gpu/drm/i915/intel_vtd.h | 14 +++++++------- 9 files changed, 17 insertions(+), 17 deletions(-)