[Intel-gfx] [PATCH] drm/i915: BIOS and power context stolen mem handling for VLV v6
Chris Wilson
chris at chris-wilson.co.uk
Tue May 7 23:57:37 CEST 2013
On Tue, May 07, 2013 at 02:34:31PM -0700, Jesse Barnes wrote:
> +static void valleyview_setup_pctx(struct drm_device *dev)
> +{
> + struct drm_i915_private *dev_priv = dev->dev_private;
> + struct drm_i915_gem_object *pctx;
> + unsigned long pctx_paddr;
> + u32 pcbr;
> + int pctx_size = 24*1024;
> +
> + pcbr = I915_READ(VLV_PCBR);
> + if (pcbr) {
> + /* BIOS set it up already, grab the pre-alloc'd space */
> + int pcbr_offset;
> +
> + pcbr_offset = (pcbr & (~4095)) - dev_priv->mm.stolen_base;
> + pctx = i915_gem_object_create_stolen_for_preallocated(dev_priv->dev,
> + pcbr_offset,
> + pcbr_offset,
> + pctx_size);
We're reserving global GTT space here for someting that just looks like
it requires contiguous physical memory. This may cause issues if
something else is already bound to that GTT range. I think we want to
extend the interface to not reserve GTT space if gtt_offset == -1.
Much happier with the placement of functions and the comments help a
lot.
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
More information about the Intel-gfx
mailing list