diff mbox

[06/21] drm/i915/gtt: Remove _single from page table allocator

Message ID 1432314314-23530-7-git-send-email-mika.kuoppala@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Mika Kuoppala May 22, 2015, 5:04 p.m. UTC
We are always allocating a single page. No need to be verbose so
remove the suffix.

Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
---
 drivers/gpu/drm/i915/i915_gem_gtt.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

Comments

Joonas Lahtinen June 2, 2015, 9:53 a.m. UTC | #1
On pe, 2015-05-22 at 20:04 +0300, Mika Kuoppala wrote:
> We are always allocating a single page. No need to be verbose so
> remove the suffix.
> 
> Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/i915_gem_gtt.c | 16 ++++++++--------
>  1 file changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
> index a608b1b..4cf47f9 100644
> --- a/drivers/gpu/drm/i915/i915_gem_gtt.c
> +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
> @@ -369,7 +369,7 @@ static void gen8_initialize_pt(struct i915_address_space *vm,
>  	kunmap_atomic(pt_vaddr);
>  }
>  
> -static struct i915_page_table *alloc_pt_single(struct drm_device *dev)
> +static struct i915_page_table *alloc_pt(struct drm_device *dev)
>  {
>  	struct i915_page_table *pt;
>  	const size_t count = INTEL_INFO(dev)->gen >= 8 ?
> @@ -417,7 +417,7 @@ static void unmap_and_free_pd(struct i915_page_directory *pd,
>  	}
>  }
>  
> -static struct i915_page_directory *alloc_pd_single(struct drm_device *dev)
> +static struct i915_page_directory *alloc_pd(struct drm_device *dev)
>  {
>  	struct i915_page_directory *pd;
>  	int ret = -ENOMEM;
> @@ -702,7 +702,7 @@ static int gen8_ppgtt_alloc_pagetabs(struct i915_hw_ppgtt *ppgtt,
>  			continue;
>  		}
>  
> -		pt = alloc_pt_single(dev);
> +		pt = alloc_pt(dev);
>  		if (IS_ERR(pt))
>  			goto unwind_out;
>  
> @@ -760,7 +760,7 @@ static int gen8_ppgtt_alloc_page_directories(struct i915_hw_ppgtt *ppgtt,
>  		if (pd)
>  			continue;
>  
> -		pd = alloc_pd_single(dev);
> +		pd = alloc_pd(dev);
>  		if (IS_ERR(pd))
>  			goto unwind_out;
>  
> @@ -992,11 +992,11 @@ static int gen8_preallocate_top_level_pdps(struct i915_hw_ppgtt *ppgtt)
>   */
>  static int gen8_ppgtt_init(struct i915_hw_ppgtt *ppgtt)
>  {
> -	ppgtt->scratch_pt = alloc_pt_single(ppgtt->base.dev);
> +	ppgtt->scratch_pt = alloc_pt(ppgtt->base.dev);
>  	if (IS_ERR(ppgtt->scratch_pt))
>  		return PTR_ERR(ppgtt->scratch_pt);
>  
> -	ppgtt->scratch_pd = alloc_pd_single(ppgtt->base.dev);
> +	ppgtt->scratch_pd = alloc_pd(ppgtt->base.dev);
>  	if (IS_ERR(ppgtt->scratch_pd))
>  		return PTR_ERR(ppgtt->scratch_pd);
>  
> @@ -1375,7 +1375,7 @@ static int gen6_alloc_va_range(struct i915_address_space *vm,
>  		/* We've already allocated a page table */
>  		WARN_ON(!bitmap_empty(pt->used_ptes, GEN6_PTES));
>  
> -		pt = alloc_pt_single(dev);
> +		pt = alloc_pt(dev);
>  		if (IS_ERR(pt)) {
>  			ret = PTR_ERR(pt);
>  			goto unwind_out;
> @@ -1461,7 +1461,7 @@ static int gen6_ppgtt_allocate_page_directories(struct i915_hw_ppgtt *ppgtt)
>  	 * size. We allocate at the top of the GTT to avoid fragmentation.
>  	 */
>  	BUG_ON(!drm_mm_initialized(&dev_priv->gtt.base.mm));
> -	ppgtt->scratch_pt = alloc_pt_single(ppgtt->base.dev);
> +	ppgtt->scratch_pt = alloc_pt(ppgtt->base.dev);
>  	if (IS_ERR(ppgtt->scratch_pt))
>  		return PTR_ERR(ppgtt->scratch_pt);
>
Michel Thierry June 2, 2015, 9:56 a.m. UTC | #2
On 5/22/2015 6:04 PM, Mika Kuoppala wrote:
> We are always allocating a single page. No need to be verbose so
> remove the suffix.
>
> Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
I saw another of your patches will take care of 
i915_dma_map_single/i915_dma_unmap_single...

Reviewed-by: Michel Thierry <michel.thierry@intel.com>
Daniel Vetter June 15, 2015, 10:14 a.m. UTC | #3
On Tue, Jun 02, 2015 at 10:56:55AM +0100, Michel Thierry wrote:
> On 5/22/2015 6:04 PM, Mika Kuoppala wrote:
> >We are always allocating a single page. No need to be verbose so
> >remove the suffix.
> >
> >Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
> I saw another of your patches will take care of
> i915_dma_map_single/i915_dma_unmap_single...
> 
> Reviewed-by: Michel Thierry <michel.thierry@intel.com>

Queued for -next, thanks for the patch.
-Daniel
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
index a608b1b..4cf47f9 100644
--- a/drivers/gpu/drm/i915/i915_gem_gtt.c
+++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
@@ -369,7 +369,7 @@  static void gen8_initialize_pt(struct i915_address_space *vm,
 	kunmap_atomic(pt_vaddr);
 }
 
-static struct i915_page_table *alloc_pt_single(struct drm_device *dev)
+static struct i915_page_table *alloc_pt(struct drm_device *dev)
 {
 	struct i915_page_table *pt;
 	const size_t count = INTEL_INFO(dev)->gen >= 8 ?
@@ -417,7 +417,7 @@  static void unmap_and_free_pd(struct i915_page_directory *pd,
 	}
 }
 
-static struct i915_page_directory *alloc_pd_single(struct drm_device *dev)
+static struct i915_page_directory *alloc_pd(struct drm_device *dev)
 {
 	struct i915_page_directory *pd;
 	int ret = -ENOMEM;
@@ -702,7 +702,7 @@  static int gen8_ppgtt_alloc_pagetabs(struct i915_hw_ppgtt *ppgtt,
 			continue;
 		}
 
-		pt = alloc_pt_single(dev);
+		pt = alloc_pt(dev);
 		if (IS_ERR(pt))
 			goto unwind_out;
 
@@ -760,7 +760,7 @@  static int gen8_ppgtt_alloc_page_directories(struct i915_hw_ppgtt *ppgtt,
 		if (pd)
 			continue;
 
-		pd = alloc_pd_single(dev);
+		pd = alloc_pd(dev);
 		if (IS_ERR(pd))
 			goto unwind_out;
 
@@ -992,11 +992,11 @@  static int gen8_preallocate_top_level_pdps(struct i915_hw_ppgtt *ppgtt)
  */
 static int gen8_ppgtt_init(struct i915_hw_ppgtt *ppgtt)
 {
-	ppgtt->scratch_pt = alloc_pt_single(ppgtt->base.dev);
+	ppgtt->scratch_pt = alloc_pt(ppgtt->base.dev);
 	if (IS_ERR(ppgtt->scratch_pt))
 		return PTR_ERR(ppgtt->scratch_pt);
 
-	ppgtt->scratch_pd = alloc_pd_single(ppgtt->base.dev);
+	ppgtt->scratch_pd = alloc_pd(ppgtt->base.dev);
 	if (IS_ERR(ppgtt->scratch_pd))
 		return PTR_ERR(ppgtt->scratch_pd);
 
@@ -1375,7 +1375,7 @@  static int gen6_alloc_va_range(struct i915_address_space *vm,
 		/* We've already allocated a page table */
 		WARN_ON(!bitmap_empty(pt->used_ptes, GEN6_PTES));
 
-		pt = alloc_pt_single(dev);
+		pt = alloc_pt(dev);
 		if (IS_ERR(pt)) {
 			ret = PTR_ERR(pt);
 			goto unwind_out;
@@ -1461,7 +1461,7 @@  static int gen6_ppgtt_allocate_page_directories(struct i915_hw_ppgtt *ppgtt)
 	 * size. We allocate at the top of the GTT to avoid fragmentation.
 	 */
 	BUG_ON(!drm_mm_initialized(&dev_priv->gtt.base.mm));
-	ppgtt->scratch_pt = alloc_pt_single(ppgtt->base.dev);
+	ppgtt->scratch_pt = alloc_pt(ppgtt->base.dev);
 	if (IS_ERR(ppgtt->scratch_pt))
 		return PTR_ERR(ppgtt->scratch_pt);