diff --git a/drivers/gpu/drm/i915/gem/i915_gem_stolen.c b/drivers/gpu/drm/i915/gem/i915_gem_stolen.c index 452e3122509..528bcf20009 100644 --- a/drivers/gpu/drm/i915/gem/i915_gem_stolen.c +++ b/drivers/gpu/drm/i915/gem/i915_gem_stolen.c @@ -410,12 +410,6 @@ static int i915_gem_init_stolen(struct intel_memory_region *mem) return 0; } -#ifdef __FreeBSD__ - DRM_INFO("Got stolen memory base 0x%x, size 0x%x\n", - intel_graphics_stolen_res.start, - resource_size(&intel_graphics_stolen_res)); -#endif - if (resource_size(&mem->region) == 0) return 0; diff --git a/drivers/gpu/drm/i915/i915_module.c b/drivers/gpu/drm/i915/i915_module.c index af1234771ca..7c64d9893f3 100644 --- a/drivers/gpu/drm/i915/i915_module.c +++ b/drivers/gpu/drm/i915/i915_module.c @@ -80,6 +80,17 @@ static int __init i915_init(void) { int err, i; +#ifdef __FreeBSD__ +#if defined(__amd64__) + intel_graphics_stolen_res = (struct linux_resource) + DEFINE_RES_MEM(intel_graphics_stolen_base, + intel_graphics_stolen_size); + DRM_INFO("Got Intel graphics stolen memory base 0x%x, size 0x%x\n", + intel_graphics_stolen_res.start, + resource_size(&intel_graphics_stolen_res)); +#endif +#endif + for (i = 0; i < ARRAY_SIZE(init_funcs); i++) { err = init_funcs[i].init(); if (err < 0) { diff --git a/drivers/gpu/drm/i915/intel_freebsd.c b/drivers/gpu/drm/i915/intel_freebsd.c index d66a0b844c1..284902b0e12 100644 --- a/drivers/gpu/drm/i915/intel_freebsd.c +++ b/drivers/gpu/drm/i915/intel_freebsd.c @@ -159,15 +159,3 @@ linux_intel_gtt_insert_sg_entries(struct sg_table *st, unsigned int pg_start, intel_gtt_read_pte(pg_start + i - 1); } - -#if defined(__amd64__) -static void -intel_freebsd_init(void *arg __unused) -{ - /* Defined in $SYSDIR/x86/pci/pci_early_quirks.c */ - intel_graphics_stolen_res = (struct linux_resource) - DEFINE_RES_MEM(intel_graphics_stolen_base, - intel_graphics_stolen_size); -} -SYSINIT(intel_freebsd, SI_SUB_DRIVERS, SI_ORDER_ANY, intel_freebsd_init, NULL); -#endif