Re: [PATCH v2 07/24] drm/i915: page table abstractions

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

 



On Tue, Dec 23, 2014 at 05:16:10PM +0000, Michel Thierry wrote:
> diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.h b/drivers/gpu/drm/i915/i915_gem_gtt.h
> index 8f76990..1ff3c05 100644
> --- a/drivers/gpu/drm/i915/i915_gem_gtt.h
> +++ b/drivers/gpu/drm/i915/i915_gem_gtt.h
> @@ -265,6 +265,20 @@ struct i915_gtt {
>  			  unsigned long *mappable_end);
>  };
>  
> +struct i915_pagetab {
> +	struct page *page;
> +};
> +
> +struct i915_pagedir {
> +	struct page *page; /* NULL for GEN6-GEN7 */
> +	struct i915_pagetab *page_tables;
> +};
> +
> +struct i915_pagedirpo {
> +	/* struct page *page; */
> +	struct i915_pagedir pagedir[GEN8_LEGACY_PDPES];
> +};

Well I still think the names assigned by intel in the IA prm are horrible
and long-term we should just use the ones used by the core linux vm
because they're much saner. But shortening them inconsistently like here
really doesn't help. Can you please replace this with the relevant
page_directory or page_directory_pointer or whatever to make it clearer?

Since it's only used once saving characters here doesn't seem a good
tradeoff.
-Daniel

> +
>  struct i915_hw_ppgtt {
>  	struct i915_address_space base;
>  	struct kref ref;
> @@ -272,11 +286,6 @@ struct i915_hw_ppgtt {
>  	unsigned num_pd_entries;
>  	unsigned num_pd_pages; /* gen8+ */
>  	union {
> -		struct page **pt_pages;
> -		struct page **gen8_pt_pages[GEN8_LEGACY_PDPES];
> -	};
> -	struct page *pd_pages;
> -	union {
>  		uint32_t pd_offset;
>  		dma_addr_t pd_dma_addr[GEN8_LEGACY_PDPES];
>  	};
> @@ -284,6 +293,10 @@ struct i915_hw_ppgtt {
>  		dma_addr_t *pt_dma_addr;
>  		dma_addr_t *gen8_pt_dma_addr[GEN8_LEGACY_PDPES];
>  	};
> +	union {
> +		struct i915_pagedirpo pdp;
> +		struct i915_pagedir pd;
> +	};
>  
>  	struct drm_i915_file_private *file_priv;
>  
> -- 
> 2.1.1
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx




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