public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH i-g-t] i915/gem_cpu_reloc: Do the can-store-dword check at start
@ 2019-01-30 16:21 Chris Wilson
  2019-01-31  9:41 ` [igt-dev] " Tvrtko Ursulin
  0 siblings, 1 reply; 2+ messages in thread
From: Chris Wilson @ 2019-01-30 16:21 UTC (permalink / raw)
  To: intel-gfx; +Cc: igt-dev

igt doesn't handle skipping from inside igt_fork very gracefully and
crashes instead of reporting the lack of requirements. One solution
would be to fix igt, but far easier is to just move the requirement
checking around to do it before we even fork.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109493
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 tests/i915/gem_cpu_reloc.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tests/i915/gem_cpu_reloc.c b/tests/i915/gem_cpu_reloc.c
index 48cc7ddc6..470998628 100644
--- a/tests/i915/gem_cpu_reloc.c
+++ b/tests/i915/gem_cpu_reloc.c
@@ -158,9 +158,6 @@ create_tmpl(int i915, struct drm_i915_gem_relocation_entry *reloc)
 				   struct drm_i915_gem_relocation_entry *reloc);
 	void *tmpl;
 
-	/* could use BLT_FILL instead for gen2 */
-	igt_require(gem_can_store_dword(i915, 0));
-
 	if (gen >= 8)
 		emit_store_addr = gen8_emit_store_addr;
 	else if (gen >= 4)
@@ -276,6 +273,9 @@ igt_main
 		i915 = drm_open_driver(DRIVER_INTEL);
 		igt_require_gem(i915);
 
+		/* could use BLT_FILL instead for gen2 */
+		igt_require(gem_can_store_dword(i915, 0));
+
 		igt_fork_hang_detector(i915);
 	}
 
-- 
2.20.1

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

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

* Re: [igt-dev] [PATCH i-g-t] i915/gem_cpu_reloc: Do the can-store-dword check at start
  2019-01-30 16:21 [PATCH i-g-t] i915/gem_cpu_reloc: Do the can-store-dword check at start Chris Wilson
@ 2019-01-31  9:41 ` Tvrtko Ursulin
  0 siblings, 0 replies; 2+ messages in thread
From: Tvrtko Ursulin @ 2019-01-31  9:41 UTC (permalink / raw)
  To: Chris Wilson, intel-gfx; +Cc: igt-dev


On 30/01/2019 16:21, Chris Wilson wrote:
> igt doesn't handle skipping from inside igt_fork very gracefully and
> crashes instead of reporting the lack of requirements. One solution
> would be to fix igt, but far easier is to just move the requirement
> checking around to do it before we even fork.
> 
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109493
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
>   tests/i915/gem_cpu_reloc.c | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/tests/i915/gem_cpu_reloc.c b/tests/i915/gem_cpu_reloc.c
> index 48cc7ddc6..470998628 100644
> --- a/tests/i915/gem_cpu_reloc.c
> +++ b/tests/i915/gem_cpu_reloc.c
> @@ -158,9 +158,6 @@ create_tmpl(int i915, struct drm_i915_gem_relocation_entry *reloc)
>   				   struct drm_i915_gem_relocation_entry *reloc);
>   	void *tmpl;
>   
> -	/* could use BLT_FILL instead for gen2 */
> -	igt_require(gem_can_store_dword(i915, 0));
> -
>   	if (gen >= 8)
>   		emit_store_addr = gen8_emit_store_addr;
>   	else if (gen >= 4)
> @@ -276,6 +273,9 @@ igt_main
>   		i915 = drm_open_driver(DRIVER_INTEL);
>   		igt_require_gem(i915);
>   
> +		/* could use BLT_FILL instead for gen2 */
> +		igt_require(gem_can_store_dword(i915, 0));
> +
>   		igt_fork_hang_detector(i915);
>   	}
>   
> 

Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Regards,

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

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

end of thread, other threads:[~2019-01-31  9:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-30 16:21 [PATCH i-g-t] i915/gem_cpu_reloc: Do the can-store-dword check at start Chris Wilson
2019-01-31  9:41 ` [igt-dev] " Tvrtko Ursulin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox