summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/xe/display/ext/i915_utils.c
blob: 43b10a2cc5085d8dc11b275e6bc2891bbf90ee3b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// SPDX-License-Identifier: MIT
/*
 * Copyright © 2023 Intel Corporation
 */

#include "i915_drv.h"

bool i915_vtd_active(struct drm_i915_private *i915)
{
	if (device_iommu_mapped(i915->drm.dev))
		return true;

	/* Running as a guest, we assume the host is enforcing VT'd */
	return i915_run_as_guest();
}

#if IS_ENABLED(CONFIG_DRM_I915_DEBUG)

/* i915 specific, just put here for shutting it up */
int __i915_inject_probe_error(struct drm_i915_private *i915, int err,
			      const char *func, int line)
{
	return 0;
}

#endif