static int init_stolen_lmem(struct intel_memory_region *mem)
{
- struct drm_i915_private *i915 = mem->i915;
int err;
if (GEM_WARN_ON(resource_size(&mem->region) == 0))
for (i = 0; i < atop(resource_size(&mem->io)); i++)
atomic_setbits_int(&(pgs[i].pg_flags), PG_PMAP_WC);
- if (bus_space_map(i915->bst, mem->io.start, resource_size(&mem->io),
+ if (bus_space_map(mem->i915->bst, mem->io.start, resource_size(&mem->io),
BUS_SPACE_MAP_LINEAR | BUS_SPACE_MAP_PREFETCHABLE, &bsh))
panic("can't map stolen lmem");
mem->iomap.base = mem->io.start;
mem->iomap.size = resource_size(&mem->io);
- mem->iomap.iomem = bus_space_vaddr(i915->bst, bsh);
+ mem->iomap.iomem = bus_space_vaddr(mem->i915->bst, bsh);
}
#endif
- drm_dbg(&i915->drm, "Stolen Local DSM: %pR\n", &mem->region);
- drm_dbg(&i915->drm, "Stolen Local memory IO: %pR\n", &mem->io);
-
return 0;
#ifdef __linux__
err_cleanup:
if (err)
goto err_region_put;
- drm_dbg(&i915->drm, "Local memory: %pR\n", &mem->region);
- drm_dbg(&i915->drm, "Local memory IO: %pR\n", &mem->io);
-
if (io_size < lmem_size)
drm_info(&i915->drm, "Using a reduced BAR size of %lluMiB. Consider enabling 'Resizable BAR' or similar, if available in the BIOS.\n",
(u64)io_size >> 20);