[Intel-gfx] [PATCH 27/29] drm/i915: Allocate overlay registers from stolen memory
Daniel Vetter
daniel at ffwll.ch
Mon Aug 20 23:17:06 CEST 2012
On Sat, Aug 11, 2012 at 03:41:26PM +0100, Chris Wilson wrote:
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
Since most of the overlay-supporting hw uses physical mem for the overlay
I think this isn't much worth it: The additional frobbery in
attach/detach_phys object is likely more work than we'll anything we'll
ever gain from using stolen mem here. Especially since we'll use stolen
mem already for the rings.
-Daniel
> ---
> drivers/gpu/drm/i915/intel_overlay.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_overlay.c b/drivers/gpu/drm/i915/intel_overlay.c
> index 7a98459..6982191 100644
> --- a/drivers/gpu/drm/i915/intel_overlay.c
> +++ b/drivers/gpu/drm/i915/intel_overlay.c
> @@ -1424,8 +1424,10 @@ void intel_setup_overlay(struct drm_device *dev)
>
> overlay->dev = dev;
>
> - reg_bo = i915_gem_alloc_object(dev, PAGE_SIZE);
> - if (!reg_bo)
> + reg_bo = i915_gem_object_create_stolen(dev, PAGE_SIZE);
> + if (reg_bo == NULL)
> + reg_bo = i915_gem_alloc_object(dev, PAGE_SIZE);
> + if (reg_bo == NULL)
> goto out_free;
> overlay->reg_bo = reg_bo;
>
> --
> 1.7.10.4
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Daniel Vetter
Mail: daniel at ffwll.ch
Mobile: +41 (0)79 365 57 48
More information about the Intel-gfx
mailing list