[igt-dev] [PATCH v2] i915/gem_mocs_settings: log the engine and MOCS index

Daniele Ceraolo Spurio daniele.ceraolospurio at intel.com
Wed Jul 31 16:53:06 UTC 2019



On 7/29/19 2:28 PM, Lucas De Marchi wrote:
> This helps to identify which entry is wrong in the table.
> 
> v2: Add back the values and missing \n (from Daniele)
> 
> Signed-off-by: Lucas De Marchi <lucas.demarchi at intel.com>

Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio at intel.com>

Daniele

> ---
>   tests/i915/gem_mocs_settings.c | 10 ++++++++--
>   1 file changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/i915/gem_mocs_settings.c b/tests/i915/gem_mocs_settings.c
> index 220cdddc..3ad94149 100644
> --- a/tests/i915/gem_mocs_settings.c
> +++ b/tests/i915/gem_mocs_settings.c
> @@ -366,10 +366,16 @@ static void check_control_registers(int fd,
>   
>   	gem_set_domain(fd, dst_handle, I915_GEM_DOMAIN_CPU, 0);
>   	for (int index = 0; index < table.size; index++) {
> +		uint32_t val, read_val;
> +
>   		if (!table.table[index].used)
>   			continue;
> -		igt_assert_eq_u32(read_regs[index],
> -				  table.table[index].control_value);
> +
> +		read_val = read_regs[index];
> +		val = table.table[index].control_value;
> +		igt_assert_f(read_val == val,
> +			     "engine=%u index=%u read_value=0x%08x value=0x%08x\n",
> +			     engine, index, read_val, val);
>   	}
>   
>   	munmap(read_regs, 4096);
> 


More information about the igt-dev mailing list