[Intel-gfx] [PATCH igt 2/7] igt/gem_workarounds: Read the workaround registers from the active context

Chris Wilson chris at chris-wilson.co.uk
Tue Oct 3 12:53:04 UTC 2017


Quoting Chris Wilson (2017-09-29 16:26:37)
> +       out = gem_mmap__cpu(fd, obj[0].handle, 0, result_sz, PROT_READ);
> +       for (int i = 0; i < num_wa_regs; i++) {
> +               const bool ok =
> +                       (wa_regs[i].value & wa_regs[i].mask) ==
> +                       (out[i] & wa_regs[i].mask);
> +               char buf[80];
>  
> -               igt_debug("0x%05X    0x%08X    0x%08X    0x%08X    %s\n",
> -                         wa_regs[i].addr, wa_regs[i].value, wa_regs[i].mask,
> -                         val, ok ? "OK" : "FAIL");
> +               snprintf(buf, sizeof(buf),
> +                        "0x%05X    0x%08X    0x%08X    0x%08X",
> +                        wa_regs[i].addr, wa_regs[i].value, wa_regs[i].mask,
> +                        out[i]);
>  
>                 if (write_only(wa_regs[i].addr))
>                         continue;

For fun I think we shouldn't skip the igt_debug here.
-Chris


More information about the Intel-gfx mailing list