[igt-dev] [PATCH i-g-t v4 2/2] tests/i915/gem_lmem_swapping: Add ccs subtests

Dixit, Ashutosh ashutosh.dixit at intel.com
Wed Mar 30 04:55:07 UTC 2022


On Tue, 29 Mar 2022 21:49:15 -0700, Ramalingam C wrote:
>
> @@ -174,13 +324,26 @@ static void __do_evict(int i915,
>						    region->memory_instance);
>	const unsigned int max_swap_in = params->count / 100 + 1;
>	struct object *objects, *obj, *list;
> +	const uint32_t bpp = 32;
> +	uint32_t width, height, stride;
> +	const intel_ctx_t *blt_ctx;
> +	struct blt_copy_object *tmp;
>	unsigned int engine = 0;
>	unsigned int i, l;
> -	uint64_t size;
> +	uint64_t size, ahnd;
>	struct timespec t = {};
>	unsigned int num;
>
> -	size = 4096;
> +	width = PAGE_SIZE / (bpp / 8);
> +	height = params->size.max / (bpp / 8) /  width;
> +	stride = width * 4;
> +
> +	tmp = calloc(1, sizeof(*tmp));
> +	__gem_context_set_persistence(i915, 0, false);

Setting context 0 as non-persistent?

> +	if (params->flags & TEST_CCS)
> +		blt_ctx = intel_ctx_create_for_engine(i915,
> +						      I915_ENGINE_CLASS_COPY,
> +						      0);


More information about the igt-dev mailing list