All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Move vm page allocation in proper place
@ 2015-04-10 12:54 Mika Kuoppala
  2015-04-10 14:20 ` Daniel Vetter
  2015-04-10 15:55 ` shuang.he
  0 siblings, 2 replies; 3+ messages in thread
From: Mika Kuoppala @ 2015-04-10 12:54 UTC (permalink / raw)
  To: intel-gfx

Move to i915_vma_bind as it is part of the binding.

Suggested-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Michel Thierry <michel.thierry@intel.com>
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
---
 drivers/gpu/drm/i915/i915_gem.c     | 11 -----------
 drivers/gpu/drm/i915/i915_gem_gtt.c | 16 +++++++++++++++-
 2 files changed, 15 insertions(+), 12 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 9fbc355..c1dbdc4 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -3550,17 +3550,6 @@ search_free:
 	if (ret)
 		goto err_remove_node;
 
-	/*  allocate before insert / bind */
-	if (vma->vm->allocate_va_range) {
-		trace_i915_va_alloc(vma->vm, vma->node.start, vma->node.size,
-				VM_TO_TRACE_NAME(vma->vm));
-		ret = vma->vm->allocate_va_range(vma->vm,
-						vma->node.start,
-						vma->node.size);
-		if (ret)
-			goto err_remove_node;
-	}
-
 	trace_i915_vma_bind(vma, flags);
 	ret = i915_vma_bind(vma, obj->cache_level,
 			    flags & PIN_GLOBAL ? GLOBAL_BIND : 0);
diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
index 19f84c5..4517de7 100644
--- a/drivers/gpu/drm/i915/i915_gem_gtt.c
+++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
@@ -2936,8 +2936,22 @@ i915_get_ggtt_vma_pages(struct i915_vma *vma)
 int i915_vma_bind(struct i915_vma *vma, enum i915_cache_level cache_level,
 		  u32 flags)
 {
+	int ret;
+
+	if (vma->vm->allocate_va_range) {
+		trace_i915_va_alloc(vma->vm, vma->node.start,
+				    vma->node.size,
+				    VM_TO_TRACE_NAME(vma->vm));
+
+		ret = vma->vm->allocate_va_range(vma->vm,
+						 vma->node.start,
+						 vma->node.size);
+		if (ret)
+			return ret;
+	}
+
 	if (i915_is_ggtt(vma->vm)) {
-		int ret = i915_get_ggtt_vma_pages(vma);
+		ret = i915_get_ggtt_vma_pages(vma);
 
 		if (ret)
 			return ret;
-- 
1.9.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/i915: Move vm page allocation in proper place
  2015-04-10 12:54 [PATCH] drm/i915: Move vm page allocation in proper place Mika Kuoppala
@ 2015-04-10 14:20 ` Daniel Vetter
  2015-04-10 15:55 ` shuang.he
  1 sibling, 0 replies; 3+ messages in thread
From: Daniel Vetter @ 2015-04-10 14:20 UTC (permalink / raw)
  To: Mika Kuoppala; +Cc: intel-gfx

On Fri, Apr 10, 2015 at 03:54:58PM +0300, Mika Kuoppala wrote:
> Move to i915_vma_bind as it is part of the binding.
> 
> Suggested-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Michel Thierry <michel.thierry@intel.com>
> Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>

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

> ---
>  drivers/gpu/drm/i915/i915_gem.c     | 11 -----------
>  drivers/gpu/drm/i915/i915_gem_gtt.c | 16 +++++++++++++++-
>  2 files changed, 15 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> index 9fbc355..c1dbdc4 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -3550,17 +3550,6 @@ search_free:
>  	if (ret)
>  		goto err_remove_node;
>  
> -	/*  allocate before insert / bind */
> -	if (vma->vm->allocate_va_range) {
> -		trace_i915_va_alloc(vma->vm, vma->node.start, vma->node.size,
> -				VM_TO_TRACE_NAME(vma->vm));
> -		ret = vma->vm->allocate_va_range(vma->vm,
> -						vma->node.start,
> -						vma->node.size);
> -		if (ret)
> -			goto err_remove_node;
> -	}
> -
>  	trace_i915_vma_bind(vma, flags);
>  	ret = i915_vma_bind(vma, obj->cache_level,
>  			    flags & PIN_GLOBAL ? GLOBAL_BIND : 0);
> diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
> index 19f84c5..4517de7 100644
> --- a/drivers/gpu/drm/i915/i915_gem_gtt.c
> +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
> @@ -2936,8 +2936,22 @@ i915_get_ggtt_vma_pages(struct i915_vma *vma)
>  int i915_vma_bind(struct i915_vma *vma, enum i915_cache_level cache_level,
>  		  u32 flags)
>  {
> +	int ret;
> +
> +	if (vma->vm->allocate_va_range) {
> +		trace_i915_va_alloc(vma->vm, vma->node.start,
> +				    vma->node.size,
> +				    VM_TO_TRACE_NAME(vma->vm));
> +
> +		ret = vma->vm->allocate_va_range(vma->vm,
> +						 vma->node.start,
> +						 vma->node.size);
> +		if (ret)
> +			return ret;
> +	}
> +
>  	if (i915_is_ggtt(vma->vm)) {
> -		int ret = i915_get_ggtt_vma_pages(vma);
> +		ret = i915_get_ggtt_vma_pages(vma);
>  
>  		if (ret)
>  			return ret;
> -- 
> 1.9.1
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/i915: Move vm page allocation in proper place
  2015-04-10 12:54 [PATCH] drm/i915: Move vm page allocation in proper place Mika Kuoppala
  2015-04-10 14:20 ` Daniel Vetter
@ 2015-04-10 15:55 ` shuang.he
  1 sibling, 0 replies; 3+ messages in thread
From: shuang.he @ 2015-04-10 15:55 UTC (permalink / raw)
  To: shuang.he, ethan.gao, intel-gfx, mika.kuoppala

Tested-By: Intel Graphics QA PRTS (Patch Regression Test System Contact: shuang.he@intel.com)
Task id: 6174
-------------------------------------Summary-------------------------------------
Platform          Delta          drm-intel-nightly          Series Applied
PNV                 -3              276/276              273/276
ILK                                  301/301              301/301
SNB                                  316/316              316/316
IVB                                  328/328              328/328
BYT                                  285/285              285/285
HSW                 -1              394/394              393/394
BDW                                  321/321              321/321
-------------------------------------Detailed-------------------------------------
Platform  Test                                drm-intel-nightly          Series Applied
 PNV  igt@gen3_render_linear_blits      FAIL(3)PASS(1)      FAIL(2)
 PNV  igt@gen3_render_tiledx_blits      FAIL(3)PASS(1)      FAIL(2)
 PNV  igt@gen3_render_tiledy_blits      FAIL(3)PASS(1)      FAIL(2)
*HSW  igt@gem_partial_pwrite_pread@write-display      PASS(2)      DMESG_WARN(1)PASS(1)
(dmesg patch applied)drm:i915_hangcheck_elapsed[i915]]*ERROR*Hangcheck_timer_elapsed...blitter_ring_idle@Hangcheck timer elapsed... blitter ring idle
Note: You need to pay more attention to line start with '*'
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-04-10 15:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-10 12:54 [PATCH] drm/i915: Move vm page allocation in proper place Mika Kuoppala
2015-04-10 14:20 ` Daniel Vetter
2015-04-10 15:55 ` shuang.he

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.