[PATCH 1/8] drm/i915: setup the LMEM region
Chris Wilson
chris at chris-wilson.co.uk
Mon Jan 25 22:15:11 UTC 2021
Quoting Matthew Auld (2021-01-25 18:14:39)
> +static struct intel_memory_region *
> +setup_lmem(struct drm_i915_private *i915)
> +{
> + struct pci_dev *pdev = i915->drm.pdev;
> + struct intel_memory_region *mem;
> + resource_size_t io_start;
> + resource_size_t size;
> +
> + /* Enables Local Memory functionality in GAM */
> + intel_uncore_write(&i915->uncore, GEN12_LMEM_CFG_ADDR,
> + intel_uncore_read(&i915->uncore, GEN12_LMEM_CFG_ADDR) | LMEM_ENABLE);
> +
> + io_start = pci_resource_start(pdev, 2);
> + size = pci_resource_len(pdev, 2);
> +
> + mem = intel_memory_region_create(i915,
> + 0,
> + size,
> + I915_GTT_PAGE_SIZE_4K,
> + io_start,
> + &intel_region_lmem_ops);
> + if (!IS_ERR(mem)) {
> + drm_info(&i915->drm, "Intel graphics LMEM: %pR\n", &mem->region);
> + drm_info(&i915->drm, "Intel graphics LMEM IO start: %pa\n",
> + &mem->io_start);
> + drm_info(&i915->drm, "Intel graphics LMEM size: %pa\n", &size);
Since this is drm_info, could we write these in a more user friendly
manner? Or reduce them to dbg. The user doesn't really need the region
or io offset. But knowing the size of attached VRAM would be useful
confirmation.
-Chris
More information about the Intel-gfx-trybot
mailing list