[PATCH 08/13] drm/i915: Move stolen_size to the new struct

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jan 17, 2013 at 12:45:19PM -0800, Ben Widawsky wrote:
> Reviewed-by: Rodrigo Vivi <rodrigo.vivi at gmail.com>
> Signed-off-by: Ben Widawsky <ben at bwidawsk.net>
> ---
>  drivers/gpu/drm/i915/i915_drv.h        | 2 ++
>  drivers/gpu/drm/i915/i915_gem_gtt.c    | 7 ++++---
>  drivers/gpu/drm/i915/i915_gem_stolen.c | 8 ++++----
>  3 files changed, 10 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> index 63938f3..28f2cc8 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -383,6 +383,8 @@ struct i915_gtt {
>  	struct io_mapping *mappable;	/* Mapping to our CPU mappable region */
>  	phys_addr_t mappable_base;	/* PA of our GMADR */
>  
> +	size_t stolen_size;
> +
>  	/** "Graphics Stolen Memory" holds the global PTEs */
>  	void __iomem *gsm;
>  
> diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
> index 283f244..8da280d 100644
> --- a/drivers/gpu/drm/i915/i915_gem_gtt.c
> +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
> @@ -734,9 +734,9 @@ int i915_gem_gtt_init(struct drm_device *dev)
>  	gtt_bus_addr = pci_resource_start(dev->pdev, 0) + (2<<20);
>  
>  	if (INTEL_INFO(dev)->gen < 7)
> -		dev_priv->mm.gtt->stolen_size = gen6_get_stolen_size(snb_gmch_ctl);
> +		dev_priv->gtt.stolen_size = gen6_get_stolen_size(snb_gmch_ctl);

Calculating stolen size like that on pre-gen6 won't work too well ...
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch


[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux