On 3/10/2016 7:56 PM, Michel Thierry wrote:
On 3/9/2016 11:31 AM, akash.goel@xxxxxxxxx wrote:
From: Akash Goel <akash.goel@xxxxxxxxx>
This patch provides the testcase to exercise the TRTT hardware.
...
--- /dev/null
+++ b/tests/gem_trtt.c
@@ -0,0 +1,498 @@
...
+
+/* gen8_canonical_addr
+ * Used to convert any address into canonical form, i.e. [63:48] ==
[47].
+ * Based on kernel's sign_extend64 implementation.
+ * @address - a virtual address
+ */
+#define GEN8_HIGH_ADDRESS_BIT 47
+static uint64_t gen8_canonical_addr(uint64_t address)
+{
+ __u8 shift = 63 - GEN8_HIGH_ADDRESS_BIT;
+ return (__s64)(address << shift) >> shift;
+}
^^^ These came from gem_softpin, didnt they?
[https://cgit.freedesktop.org/xorg/app/intel-gpu-tools/commit/?id=7cb35109645e6495f67981b9930587c1ddfe4f90]
Yes copied as is from gem_softpin.
Would you consider moving them to lib/?
(I think igt_aux is a good place).
Can I move it to igt_aux.h then ?
Best regards
Akash
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx