Commit 7a5c9223 authored by Casey Bowman's avatar Casey Bowman Committed by Lucas De Marchi
Browse files

drm/i915/gt: Split intel-gtt functions by arch



Some functions defined in the intel-gtt module are used in several
areas, but is only supported on x86 platforms.

By separating these calls and their static underlying functions to
another area, we are able to compile out these functions for
non-x86 builds and provide stubs for the non-x86 implementations.

In addition to the problematic calls, we are moving the gmch-related
functions to the new area.

Signed-off-by: default avatarCasey Bowman <casey.g.bowman@intel.com>
Acked-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: default avatarLucas De Marchi <lucas.demarchi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220330234809.1218210-2-casey.g.bowman@intel.com
parent b9bd4832
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -127,6 +127,8 @@ gt-y += \
	gt/intel_workarounds.o \
	gt/shmem_utils.o \
	gt/sysfs_engines.o
# x86 intel-gtt module support
gt-$(CONFIG_X86) += gt/intel_gt_gmch.o
# autogenerated null render state
gt-y += \
	gt/gen6_renderstate.o \
+14 −649

File changed.

Preview size limit exceeded, changes collapsed.

+2 −2
Original line number Diff line number Diff line
@@ -4,7 +4,6 @@
 */

#include <drm/drm_managed.h>
#include <drm/intel-gtt.h>

#include "gem/i915_gem_internal.h"
#include "gem/i915_gem_lmem.h"
@@ -17,6 +16,7 @@
#include "intel_gt_buffer_pool.h"
#include "intel_gt_clock_utils.h"
#include "intel_gt_debugfs.h"
#include "intel_gt_gmch.h"
#include "intel_gt_pm.h"
#include "intel_gt_regs.h"
#include "intel_gt_requests.h"
@@ -451,7 +451,7 @@ void intel_gt_chipset_flush(struct intel_gt *gt)
{
	wmb();
	if (GRAPHICS_VER(gt->i915) < 6)
		intel_gtt_chipset_flush();
		intel_gt_gmch_gen5_chipset_flush(gt);
}

void intel_gt_driver_register(struct intel_gt *gt)
+9 −0
Original line number Diff line number Diff line
@@ -13,6 +13,13 @@
struct drm_i915_private;
struct drm_printer;

struct insert_entries {
	struct i915_address_space *vm;
	struct i915_vma_resource *vma_res;
	enum i915_cache_level level;
	u32 flags;
};

#define GT_TRACE(gt, fmt, ...) do {					\
	const struct intel_gt *gt__ __maybe_unused = (gt);		\
	GEM_TRACE("%s " fmt, dev_name(gt__->i915->drm.dev),		\
@@ -113,4 +120,6 @@ void intel_gt_watchdog_work(struct work_struct *work);

void intel_gt_invalidate_tlbs(struct intel_gt *gt);

struct resource intel_pci_resource(struct pci_dev *pdev, int bar);

#endif /* __INTEL_GT_H__ */
+654 −0

File added.

Preview size limit exceeded, changes collapsed.

Loading