[Intel-gfx] [PATCH v2] igt/gem_trtt: Exercise the TRTT hardware
Chris Wilson
chris at chris-wilson.co.uk
Fri Jan 22 12:41:02 PST 2016
On Fri, Jan 22, 2016 at 09:07:47PM +0530, akash.goel at intel.com wrote:
> +static int emit_store_dword(int fd, uint32_t *cmd_buf, uint32_t dw_offset,
> + uint64_t vaddr, uint32_t data)
> +{
> + cmd_buf[dw_offset++] = MI_STORE_DWORD_IMM;
> + cmd_buf[dw_offset++] = vaddr & 0xFFFFFFFC;
> + cmd_buf[dw_offset++] = (vaddr >> 32) & 0xFFFF; /* bits 32:47 */
To violate this would be a severe bug in the caller. To mask it here
does something that the caller does not expect, very dangerous when
playing with PT. Either way does not serve well as a demonstration.
assert((vaddr & (-(1<<48)|3)) == 0); or hex equivalent.
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
More information about the Intel-gfx
mailing list