Re: [PATCH v2] igt/gem_trtt: Exercise the TRTT hardware

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

 



On Fri, Jan 22, 2016 at 09:07:47PM +0530, akash.goel@xxxxxxxxx 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
_______________________________________________
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