Re: [PATCH] tests/gem_tiled_swapping: Skip on L-shaped memory

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

 



On Tue, Nov 18, 2014 at 02:40:28PM +0100, Daniel Vetter wrote:
> The only thing the kernel can do is pin the buffers, which essentially
> means no swapped tiled objects.
> 
> Signed-off-by: Daniel Vetter <daniel.vetter@xxxxxxxxx>
> ---
>  tests/gem_tiled_swapping.c | 22 ++++++++++++++++++++++
>  1 file changed, 22 insertions(+)
> 
> diff --git a/tests/gem_tiled_swapping.c b/tests/gem_tiled_swapping.c
> index 69d1cfae94d2..0839df00151e 100644
> --- a/tests/gem_tiled_swapping.c
> +++ b/tests/gem_tiled_swapping.c
> @@ -61,6 +61,7 @@
>  #include "drmtest.h"
>  #include "intel_io.h"
>  #include "igt_aux.h"
> +#include "igt_debugfs.h"
>  
>  #define WIDTH 512
>  #define HEIGHT 512
> @@ -143,6 +144,25 @@ static void thread_fini(struct thread *t)
>  	free(t->idx_arr);
>  }
>  
> +static void check_memory_layout(void)
> +{
> +	FILE *tiling_debugfs_file;
> +	char *line = NULL;
> +	size_t sz = 0;
> +
> +	tiling_debugfs_file = igt_debugfs_fopen("i915_swizzle_info", "r");
> +	igt_assert(tiling_debugfs_file);
> +
> +	while (getline(&line, &sz, tiling_debugfs_file) > 0) {
> +		if (strstr(line, "L-shaped") != 0)
> +			continue;
> +
> +		igt_skip("L-shaped memory configuration detected\n");
> +	}
> +
> +	igt_debug("normal memory configuration detected, continuing\n");
> +}

igt_check_memory():
  if (flags & CHECK_SWAP && !check_memory_layout())
    skip()

That should then cover us for all tests that want to use swap. (And if
not, we are missing some more igt_check_memory/igt_require_memory.)
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
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