Skip to contentSkip to conversation

kms_content_protection: Fix log bug on 32-bit platforms.

PATCH In review Eric Anholt 3 participants 9 messages Nov 15, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/6 kms_content_protection: Fix log bug on 32-bit platforms.

long is different between 32 and 64 and should basically never be used. Fixes compiler warning about passing the wrong type.

v2: Use the PRId64 macros instead of long long.

---
 tests/kms_content_protection.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
tests/kms_content_protection.c +2 -1
index 801eff66c272..ef90ed4c1792 100644
@@ -89,7 +89,8 @@ wait_for_prop_value(igt_output_t *output, uint64_t expected,
 			return true;
 		usleep(1000);
 	}
-	igt_info("prop_value mismatch %ld != %ld\n", val, expected);
+	igt_info("prop_value mismatch %" PRId64 " != %" PRId64 "\n",
+		 val, expected);
 
 	return false;
 }
Signature · 6 lines
2.19.1

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
#1 lore raw

PATCH v2 2/6 meson: Drop -Wdeclaration-after-statement.

Being able to move declarations later is very useful in making clear, concise code.

---
 meson.build | 1 -
 1 file changed, 1 deletion(-)
meson.build +0 -1
index 469723dc4633..c5aab78716d5 100644
@@ -11,7 +11,6 @@ cc = meson.get_compiler('c')
 
 cc_args = [
 	'-Wbad-function-cast',
-	'-Wdeclaration-after-statement',
 	'-Wformat=2',
 # igt_assert(0) in switch statements triggers a bunch of this.
 	'-Wimplicit-fallthrough=0',
Signature · 6 lines
2.19.1

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
#2 lore raw

PATCH v2 3/6 v3d: Import the V3D DRM UAPI header.

In reply to Eric Anholt

Copied from make headers_install at drm-misc-next 783195ec1cad ("drm/syncobj: disable the timeline UAPI for now v2")

---
 include/drm-uapi/v3d_drm.h | 204 +++++++++++++++++++++++++++++++++++++
 1 file changed, 204 insertions(+)
 create mode 100644 include/drm-uapi/v3d_drm.h
include/drm-uapi/v3d_drm.h new file +204 -0
new file mode 100644
index 000000000000..f446656d00b1
@@ -0,0 +1,204 @@
+/*
+ * Copyright © 2014-2018 Broadcom
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ */
+
+#ifndef _V3D_DRM_H_
+#define _V3D_DRM_H_
+
+#include "drm.h"
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+#define DRM_V3D_SUBMIT_CL                         0x00
+#define DRM_V3D_WAIT_BO                           0x01
+#define DRM_V3D_CREATE_BO                         0x02
+#define DRM_V3D_MMAP_BO                           0x03
+#define DRM_V3D_GET_PARAM                         0x04
+#define DRM_V3D_GET_BO_OFFSET                     0x05
+
+#define DRM_IOCTL_V3D_SUBMIT_CL           DRM_IOWR(DRM_COMMAND_BASE + DRM_V3D_SUBMIT_CL, struct drm_v3d_submit_cl)
+#define DRM_IOCTL_V3D_WAIT_BO             DRM_IOWR(DRM_COMMAND_BASE + DRM_V3D_WAIT_BO, struct drm_v3d_wait_bo)
+#define DRM_IOCTL_V3D_CREATE_BO           DRM_IOWR(DRM_COMMAND_BASE + DRM_V3D_CREATE_BO, struct drm_v3d_create_bo)
+#define DRM_IOCTL_V3D_MMAP_BO             DRM_IOWR(DRM_COMMAND_BASE + DRM_V3D_MMAP_BO, struct drm_v3d_mmap_bo)
+#define DRM_IOCTL_V3D_GET_PARAM           DRM_IOWR(DRM_COMMAND_BASE + DRM_V3D_GET_PARAM, struct drm_v3d_get_param)
+#define DRM_IOCTL_V3D_GET_BO_OFFSET       DRM_IOWR(DRM_COMMAND_BASE + DRM_V3D_GET_BO_OFFSET, struct drm_v3d_get_bo_offset)
+
+/**
+ * struct drm_v3d_submit_cl - ioctl argument for submitting commands to the 3D
+ * engine.
+ *
+ * This asks the kernel to have the GPU execute an optional binner
+ * command list, and a render command list.
+ */
+struct drm_v3d_submit_cl {
+	/* Pointer to the binner command list.
+	 *
+	 * This is the first set of commands executed, which runs the
+	 * coordinate shader to determine where primitives land on the screen,
+	 * then writes out the state updates and draw calls necessary per tile
+	 * to the tile allocation BO.
+	 *
+	 * This BCL will block on any previous BCL submitted on the
+	 * same FD, but not on any RCL or BCLs submitted by other
+	 * clients -- that is left up to the submitter to control
+	 * using in_sync_bcl if necessary.
+	 */
+	__u32 bcl_start;
+
+	 /** End address of the BCL (first byte after the BCL) */
+	__u32 bcl_end;
+
+	/* Offset of the render command list.
+	 *
+	 * This is the second set of commands executed, which will either
+	 * execute the tiles that have been set up by the BCL, or a fixed set
+	 * of tiles (in the case of RCL-only blits).
+	 *
+	 * This RCL will block on this submit's BCL, and any previous
+	 * RCL submitted on the same FD, but not on any RCL or BCLs
+	 * submitted by other clients -- that is left up to the
+	 * submitter to control using in_sync_rcl if necessary.
+	 */
+	__u32 rcl_start;
+
+	 /** End address of the RCL (first byte after the RCL) */
+	__u32 rcl_end;
+
+	/** An optional sync object to wait on before starting the BCL. */
+	__u32 in_sync_bcl;
+	/** An optional sync object to wait on before starting the RCL. */
+	__u32 in_sync_rcl;
+	/** An optional sync object to place the completion fence in. */
+	__u32 out_sync;
+
+	/* Offset of the tile alloc memory
+	 *
+	 * This is optional on V3D 3.3 (where the CL can set the value) but
+	 * required on V3D 4.1.
+	 */
+	__u32 qma;
+
+	/** Size of the tile alloc memory. */
+	__u32 qms;
+
+	/** Offset of the tile state data array. */
+	__u32 qts;
+
+	/* Pointer to a u32 array of the BOs that are referenced by the job.
+	 */
+	__u64 bo_handles;
+
+	/* Number of BO handles passed in (size is that times 4). */
+	__u32 bo_handle_count;
+
+	/* Pad, must be zero-filled. */
+	__u32 pad;
+};
+
+/**
+ * struct drm_v3d_wait_bo - ioctl argument for waiting for
+ * completion of the last DRM_V3D_SUBMIT_CL on a BO.
+ *
+ * This is useful for cases where multiple processes might be
+ * rendering to a BO and you want to wait for all rendering to be
+ * completed.
+ */
+struct drm_v3d_wait_bo {
+	__u32 handle;
+	__u32 pad;
+	__u64 timeout_ns;
+};
+
+/**
+ * struct drm_v3d_create_bo - ioctl argument for creating V3D BOs.
+ *
+ * There are currently no values for the flags argument, but it may be
+ * used in a future extension.
+ */
+struct drm_v3d_create_bo {
+	__u32 size;
+	__u32 flags;
+	/** Returned GEM handle for the BO. */
+	__u32 handle;
+	/**
+	 * Returned offset for the BO in the V3D address space.  This offset
+	 * is private to the DRM fd and is valid for the lifetime of the GEM
+	 * handle.
+	 *
+	 * This offset value will always be nonzero, since various HW
+	 * units treat 0 specially.
+	 */
+	__u32 offset;
+};
+
+/**
+ * struct drm_v3d_mmap_bo - ioctl argument for mapping V3D BOs.
+ *
+ * This doesn't actually perform an mmap.  Instead, it returns the
+ * offset you need to use in an mmap on the DRM device node.  This
+ * means that tools like valgrind end up knowing about the mapped
+ * memory.
+ *
+ * There are currently no values for the flags argument, but it may be
+ * used in a future extension.
+ */
+struct drm_v3d_mmap_bo {
+	/** Handle for the object being mapped. */
+	__u32 handle;
+	__u32 flags;
+	/** offset into the drm node to use for subsequent mmap call. */
+	__u64 offset;
+};
+
+enum drm_v3d_param {
+	DRM_V3D_PARAM_V3D_UIFCFG,
+	DRM_V3D_PARAM_V3D_HUB_IDENT1,
+	DRM_V3D_PARAM_V3D_HUB_IDENT2,
+	DRM_V3D_PARAM_V3D_HUB_IDENT3,
+	DRM_V3D_PARAM_V3D_CORE0_IDENT0,
+	DRM_V3D_PARAM_V3D_CORE0_IDENT1,
+	DRM_V3D_PARAM_V3D_CORE0_IDENT2,
+};
+
+struct drm_v3d_get_param {
+	__u32 param;
+	__u32 pad;
+	__u64 value;
+};
+
+/**
+ * Returns the offset for the BO in the V3D address space for this DRM fd.
+ * This is the same value returned by drm_v3d_create_bo, if that was called
+ * from this DRM fd.
+ */
+struct drm_v3d_get_bo_offset {
+	__u32 handle;
+	__u32 offset;
+};
+
+#if defined(__cplusplus)
+}
+#endif
+
+#endif /* _V3D_DRM_H_ */
Signature · 6 lines
2.19.1

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
#3 lore raw

PATCH v2 4/6 v3d: Add a helper library

In reply to Eric Anholt

Just a few little ioctl wrappers that v3d tests will use.

v2: Move the struct above the prototypes.

---
 lib/Makefile.sources |   2 +
 lib/drmtest.c        |   3 +
 lib/drmtest.h        |   1 +
 lib/igt_v3d.c        | 130 +++++++++++++++++++++++++++++++++++++++++++
 lib/igt_v3d.h        |  46 +++++++++++++++
 lib/meson.build      |   1 +
 6 files changed, 183 insertions(+)
 create mode 100644 lib/igt_v3d.c
 create mode 100644 lib/igt_v3d.h
lib/Makefile.sources +2 -0
index e98989ff8ed9..808b9617eca2 100644
@@ -107,6 +107,8 @@ lib_source_list =	 	\
 	igt_syncobj.h		\
 	igt_psr.c		\
 	igt_psr.h		\
+	igt_v3d.c		\
+	igt_v3d.h		\
 	$(NULL)
 
 .PHONY: version.h.tmp
lib/drmtest.c +3 -0
index fee9d33ad2a5..d2aa1c19154f 100644
@@ -202,6 +202,7 @@ static const struct module {
 } modules[] = {
 	{ DRIVER_AMDGPU, "amdgpu" },
 	{ DRIVER_INTEL, "i915", modprobe_i915 },
+	{ DRIVER_V3D, "v3d" },
 	{ DRIVER_VC4, "vc4" },
 	{ DRIVER_VGEM, "vgem" },
 	{ DRIVER_VIRTIO, "virtio-gpu" },
@@ -340,6 +341,8 @@ static const char *chipset_to_str(int chipset)
 	switch (chipset) {
 	case DRIVER_INTEL:
 		return "intel";
+	case DRIVER_V3D:
+		return "v3d";
 	case DRIVER_VC4:
 		return "vc4";
 	case DRIVER_VGEM:
lib/drmtest.h +1 -0
index 949865ee54dd..96ee517e2ec1 100644
@@ -43,6 +43,7 @@
 #define DRIVER_VGEM	(1 << 2)
 #define DRIVER_VIRTIO	(1 << 3)
 #define DRIVER_AMDGPU	(1 << 4)
+#define DRIVER_V3D	(1 << 5)
 /*
  * Exclude DRVER_VGEM from DRIVER_ANY since if you run on a system
  * with vgem as well as a supported driver, you can end up with a
lib/igt_v3d.c new file +130 -0

130 lines not on this page · raw message

lib/igt_v3d.h new file +46 -0

46 lines not on this page · raw message

lib/meson.build +1 -0
index 8961ca494af8..19f5d51ceead 100644
@@ -48,6 +48,7 @@ lib_sources = [
 	'igt_dummyload.c',
 	'uwildmat/uwildmat.c',
 	'igt_kmod.c',
+	'igt_v3d.c',
 	'igt_vc4.c',
 	'igt_psr.c',
 ]
Signature · 6 lines
2.19.1

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
#4 lore raw

PATCH v2 5/6 v3d_*: Add new tests for the V3D UABI.

In reply to Eric Anholt

These are basic non-rendering tests of the UABI.

---
 lib/igt_v3d.c             |  4 --
 tests/Makefile.am         |  2 +
 tests/Makefile.sources    |  6 +++
 tests/meson.build         |  3 ++
 tests/v3d_ci/README       | 26 +++++++++++++
 tests/v3d_ci/v3d.testlist |  6 +++
 tests/v3d_get_bo_offset.c | 78 ++++++++++++++++++++++++++++++++++++++
 tests/v3d_get_param.c     | 80 +++++++++++++++++++++++++++++++++++++++
 tests/v3d_mmap.c          | 55 +++++++++++++++++++++++++++
 9 files changed, 256 insertions(+), 4 deletions(-)
 create mode 100644 tests/v3d_ci/README
 create mode 100644 tests/v3d_ci/v3d.testlist
 create mode 100644 tests/v3d_get_bo_offset.c
 create mode 100644 tests/v3d_get_param.c
 create mode 100644 tests/v3d_mmap.c
lib/igt_v3d.c +0 -4
index 1a5ede1bd5fc..619c072c0e47 100644
@@ -40,10 +40,6 @@
 #include "intel_chipset.h"
 #include "v3d_drm.h"
 
-#if NEW_CONTEXT_PARAM_NO_ERROR_CAPTURE_API
-#define LOCAL_CONTEXT_PARAM_NO_ERROR_CAPTURE 0x4
-#endif
-
 /**
  * SECTION:igt_v3d
  * @short_description: V3D support library
tests/Makefile.am +2 -0
index 3d1ce0bc1af8..a6b2ba51ea4f 100644
@@ -14,6 +14,8 @@ if BUILD_VC4
     TESTS_progs += $(VC4_TESTS)
 endif
 
+TESTS_progs += $(V3D_TESTS)
+
 if HAVE_CHAMELIUM
 TESTS_progs += \
 	kms_chamelium \
tests/Makefile.sources +6 -0
index d007ebc74ab9..3ed60e7c30c7 100644
@@ -15,6 +15,12 @@ VC4_TESTS = \
 	vc4_wait_seqno \
 	$(NULL)
 
+V3D_TESTS = \
+	v3d_get_bo_offset \
+	v3d_get_param \
+	v3d_mmap \
+	$(NULL)
+
 AMDGPU_TESTS = \
 	amdgpu/amd_basic \
 	amdgpu/amd_cs_nop \
tests/meson.build +3 -0
index 3020f7984d7a..4472536aef65 100644
@@ -85,6 +85,9 @@ test_progs = [
 	'syncobj_wait',
 	'template',
 	'tools_test',
+	'v3d_get_bo_offset',
+	'v3d_get_param',
+	'v3d_mmap',
 	'vc4_create_bo',
 	'vc4_dmabuf_poll',
 	'vc4_label_bo',
tests/v3d_ci/README new file +26 -0
new file mode 100644
index 000000000000..e03c552fb972
@@ -0,0 +1,26 @@
+This directory contains test lists to be used for v3d's DRM support. The files
+are passed to piglit with the --test-list parameter directly.
+
+The test lists are contained in the IGT repository for several
+reasons:
+
+- The lists stay synchronized with the IGT codebase.
+- Public availability. Kernel developers can see what tests are run,
+  and can see what changes are done to the set, when, and why.
+- Explicit test lists in general make it possible to implement a new
+  test without having it run by everyone else before the tests and / or setup
+  are ready for it.
+
+Changing the test lists should only happen with approval from the v3d
+maintainer, Eric Anholt ([email protected]).
+
+============
+v3d.testlist
+============
+
+This test list is meant as a general test suite without any time
+restriction for the v3d DRM driver, combining generic DRM and KMS
+tests.  As a reminder, you can run this with the meson build using:
+
+./build/runner/igt_runner --test-list tests/v3d_ci/v3d.testlist \
+  build/tests -o results
tests/v3d_ci/v3d.testlist new file +6 -0
new file mode 100644
index 000000000000..b55e8e571d7d
@@ -0,0 +1,6 @@
+igt@v3d_get_bo_offset@create-get-offsets
+igt@v3d_get_bo_offset@get-bad-handle
+igt@v3d_get_param@base-params
+igt@v3d_get_param@get-bad-param
+igt@v3d_get_param@get-bad-flags
+igt@v3d_mmap@mmap-bad-handle
tests/v3d_get_bo_offset.c new file +78 -0

78 lines not on this page · raw message

tests/v3d_get_param.c new file +80 -0

80 lines not on this page · raw message

tests/v3d_mmap.c new file +55 -0

55 lines not on this page · raw message

Signature · 6 lines
2.19.1

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
#5 lore raw

PATCH v2 6/6 v3d: Add tests for hanging V3D using an RCL.

In reply to Eric Anholt

drm-misc-next recently regressed GPU hang recovery, and these reproduce those bugs.

---
 lib/igt_v3d.c                        | 126 +++++++++++++++++++++++++++
 lib/igt_v3d.h                        |  38 ++++++++
 tests/meson.build                    |   1 +
 tests/v3d_ci/v3d.testlist            |   2 +
 lib/igt_v3d.h => tests/v3d_cl_hang.c |  61 +++++++++----
 5 files changed, 211 insertions(+), 17 deletions(-)
 copy lib/igt_v3d.h => tests/v3d_cl_hang.c (56%)
lib/igt_v3d.c +126 -0
index 619c072c0e47..9a9f32e0ced4 100644
@@ -124,3 +124,129 @@ void igt_v3d_bo_mmap(int fd, struct v3d_bo *bo)
 				  PROT_READ | PROT_WRITE);
 	igt_assert(bo->map);
 }
+
+void *
+igt_v3d_wait_bo(int fd, uint32_t handle)
+{
+	struct drm_v3d_wait_bo wait_bo = {
+		.handle = handle,
+		.timeout_ns = ~0ull,
+	};
+
+	do_ioctl(fd, DRM_IOCTL_V3D_WAIT_BO, &wait_bo);
+
+	return 0;
+}
+
+void igt_v3d_bo_wait(int fd, struct v3d_bo *bo)
+{
+	igt_v3d_wait_bo(fd, bo->handle);
+}
+
+struct v3d_cl *
+igt_v3d_cl_create(int fd, size_t size)
+{
+	struct v3d_cl *cl = calloc(1, sizeof(*cl));
+
+	cl->fd = fd;
+	cl->bo = igt_v3d_create_bo(fd, size);
+	v3d_cl_reference_bo(cl, cl->bo);
+
+	igt_v3d_bo_mmap(fd, cl->bo);
+	cl->next = cl->bo->map;
+
+	return cl;
+}
+
+/** Creates a simple CL consisting of a single NOP instruction. */
+struct v3d_cl *
+igt_v3d_cl_create_nop(int fd)
+{
+	struct v3d_cl *cl = igt_v3d_cl_create(fd, 1);
+        uint8_t nop_opcode = 1;
+
+	memcpy(cl->next, &nop_opcode, 1);
+	cl->next++;
+
+	return cl;
+}
+
+/**
+ * Creates a simple CL consisting of an infinite loop branching to itself.
+ */
+struct v3d_cl *
+igt_v3d_cl_create_infinite_loop(int fd)
+{
+	struct v3d_cl *cl = igt_v3d_cl_create(fd, 5);
+        uint8_t branch_opcode = 16;
+
+	memcpy(cl->next, &branch_opcode, 1);
+	cl->next++;
+
+	memcpy(cl->next, &cl->bo->offset, 4);
+	cl->next += 4;
+
+	return cl;
+}
+
+void
+igt_v3d_cl_free(struct v3d_cl *cl)
+{
+	igt_v3d_free_bo(cl->fd, cl->bo);
+	free(cl);
+}
+
+void
+igt_v3d_submit_cl(int fd, struct drm_v3d_submit_cl *submit)
+{
+	do_ioctl(fd, DRM_IOCTL_V3D_SUBMIT_CL, submit);
+}
+
+void
+igt_v3d_submit_rcl(struct v3d_cl *rcl)
+{
+	struct drm_v3d_submit_cl submit = {
+		.rcl_start = rcl->bo->offset,
+		.rcl_end = rcl->bo->offset + cl_offset(rcl),
+		.bo_handles = (uintptr_t)rcl->handles,
+		.bo_handle_count = rcl->handle_count,
+	};
+	igt_v3d_submit_cl(rcl->fd, &submit);
+}
+
+static bool
+handle_in_list(uint32_t *handles, int handle_count, int handle)
+{
+	for (int i = 0; i < handle_count; i++) {
+		if (handles[i] == handle)
+			return true;
+	}
+	return false;
+}
+
+void
+igt_v3d_submit_bcl_and_rcl(struct v3d_cl *bcl, struct v3d_cl *rcl)
+{
+	uint32_t handles[32];
+	int handle_count = 0;
+
+	/* Merge the two incoming handle lists. */
+	igt_assert(rcl->handle_count + bcl->handle_count <= ARRAY_SIZE(handles));
+	for (int i = 0; i < rcl->handle_count; i++)
+		handles[handle_count++] = rcl->handles[i];
+
+	for (int i = 0; i < bcl->handle_count; i++) {
+		if (!handle_in_list(handles, handle_count, bcl->handles[i]))
+			handles[handle_count++] = bcl->handles[i];
+	}
+
+	struct drm_v3d_submit_cl submit = {
+		.rcl_start = rcl->bo->offset,
+		.rcl_end = rcl->bo->offset + cl_offset(rcl),
+		.bcl_start = bcl->bo->offset,
+		.bcl_end = bcl->bo->offset + cl_offset(bcl),
+		.bo_handles = (uintptr_t)handles,
+		.bo_handle_count = handle_count,
+	};
+	igt_v3d_submit_cl(rcl->fd, &submit);
+}
lib/igt_v3d.h +38 -0
index 2042995103cc..7ddbee36a547 100644
@@ -33,6 +33,15 @@ struct v3d_bo {
 	void *map;
 };
 
+struct v3d_cl {
+	int fd;
+	struct v3d_bo *bo;
+	void *next;
+
+	uint32_t handles[32];
+	uint32_t handle_count;
+};
+
 struct v3d_bo *igt_v3d_create_bo(int fd, size_t size);
 void igt_v3d_free_bo(int fd, struct v3d_bo *bo);
 
@@ -40,7 +49,36 @@ void igt_v3d_free_bo(int fd, struct v3d_bo *bo);
 uint32_t igt_v3d_get_bo_offset(int fd, uint32_t handle);
 uint32_t igt_v3d_get_param(int fd, enum drm_v3d_param param);
 void *igt_v3d_mmap_bo(int fd, uint32_t handle, uint32_t size, unsigned prot);
+void *igt_v3d_wait_bo(int fd, uint32_t handle);
+void igt_v3d_submit_cl(int fd, struct drm_v3d_submit_cl *submit);
+void igt_v3d_submit_rcl(struct v3d_cl *rcl);
+void igt_v3d_submit_bcl_and_rcl(struct v3d_cl *bcl, struct v3d_cl *rcl);
 
 void igt_v3d_bo_mmap(int fd, struct v3d_bo *bo);
+void igt_v3d_bo_wait(int fd, struct v3d_bo *bo);
+
+static inline void v3d_cl_reference_bo(struct v3d_cl *cl,
+				       const struct v3d_bo *bo)
+{
+	if (!bo)
+		return;
+
+	for (int i = 0; i < cl->handle_count; i++) {
+		if (cl->handles[i] == bo->handle)
+			return;
+	}
+
+	cl->handles[cl->handle_count++] = bo->handle;
+}
+
+static inline uint32_t cl_offset(struct v3d_cl *cl)
+{
+	return (char *)cl->next - (char *)cl->bo->map;
+}
+
+struct v3d_cl *igt_v3d_cl_create(int fd, size_t size);
+struct v3d_cl *igt_v3d_cl_create_infinite_loop(int fd);
+struct v3d_cl *igt_v3d_cl_create_nop(int fd);
+void igt_v3d_cl_free(struct v3d_cl *cl);
 
 #endif /* IGT_V3D_H */
tests/meson.build +1 -0
index 4472536aef65..ec8ad1421b61 100644
@@ -88,6 +88,7 @@ test_progs = [
 	'v3d_get_bo_offset',
 	'v3d_get_param',
 	'v3d_mmap',
+	'v3d_cl_hang',
 	'vc4_create_bo',
 	'vc4_dmabuf_poll',
 	'vc4_label_bo',
tests/v3d_ci/v3d.testlist +2 -0
index b55e8e571d7d..bf625f788f79 100644
@@ -1,3 +1,5 @@
+igt@v3d_cl_hang@rcl-infinite-loop
+igt@v3d_cl_hang@bcl-infinite-loop
 igt@v3d_get_bo_offset@create-get-offsets
 igt@v3d_get_bo_offset@get-bad-handle
 igt@v3d_get_param@base-params
tests/v3d_cl_hang.c renamed from lib/igt_v3d.h +44 -17

70 lines not on this page · raw message

Signature · 6 lines
2.19.1

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
#6 lore raw

[igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,v2,1/6] kms_content_protection: Fix log bug on 32-bit platforms.

In reply to Eric Anholt
== Series Details ==

== Series Details ==

Series: series starting with [i-g-t,v2,1/6] kms_content_protection: Fix log bug on 32-bit platforms.
URL : https://patchwork.freedesktop.org/series/52556/
State : success

== Summary ==

= CI Bug Log - changes from IGT_4715 -> IGTPW_2067 =

== Summary - SUCCESS ==

No regressions found.

External URL: https://patchwork.freedesktop.org/api/1.0/series/52556/revisions/1/mbox/

== Known issues ==

Here are the changes found in IGTPW_2067 that come from known issues:

=== IGT changes ===

    ==== Issues hit ====

    igt@drv_module_reload@basic-reload:
      fi-blb-e6850:       PASS -> INCOMPLETE (fdo#107718)

    igt@gem_ctx_create@basic-files:
      fi-bsw-n3050:       PASS -> FAIL (fdo#108656)
      fi-icl-u2:          PASS -> DMESG-WARN (fdo#107724)
      fi-bsw-kefka:       PASS -> FAIL (fdo#108656)

    
    ==== Possible fixes ====

    igt@drv_selftest@live_execlists:
      fi-apl-guc:         INCOMPLETE (fdo#108622, fdo#103927) -> PASS

    igt@gem_exec_suspend@basic-s3:
      fi-icl-u2:          DMESG-WARN (fdo#107724) -> PASS

    igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
      fi-byt-clapper:     FAIL (fdo#103191, fdo#107362) -> PASS +1

fdo#103191 https://bugs.freedesktop.org/show_bug.cgi?id=103191
fdo#103927 https://bugs.freedesktop.org/show_bug.cgi?id=103927
fdo#107362 https://bugs.freedesktop.org/show_bug.cgi?id=107362
fdo#107718 https://bugs.freedesktop.org/show_bug.cgi?id=107718
fdo#107724 https://bugs.freedesktop.org/show_bug.cgi?id=107724
fdo#108622 https://bugs.freedesktop.org/show_bug.cgi?id=108622
fdo#108656 https://bugs.freedesktop.org/show_bug.cgi?id=108656

== Participating hosts (51 -> 44) ==

Missing (7): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-cfl-s3 fi-icl-u

== Build changes ==

* IGT: IGT_4715 -> IGTPW_2067

CI_DRM_5141: fcdadbabc3216aa16c6d8236d55c5e5c8261cc91 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_2067: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2067/
IGT_4715: 111593c49d812a4f4ff9ab0ef053a3ab88a6f73f @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Testlist changes ==

+igt@v3d_cl_hang@bcl-infinite-loop
+igt@v3d_cl_hang@rcl-infinite-loop
+igt@v3d_get_bo_offset@create-get-offsets
+igt@v3d_get_bo_offset@get-bad-handle
+igt@v3d_get_param@base-params
+igt@v3d_get_param@get-bad-flags
+igt@v3d_get_param@get-bad-param
+igt@v3d_mmap@mmap-bad-handle

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2067/issues.html
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

Reviewed-by on v2 1/6
#7 lore raw
In reply to Eric Anholt
Quoted 6 lines · Eric Anholt

long is different between 32 and 64 and should basically never be used. Fixes compiler warning about passing the wrong type.

v2: Use the PRId64 macros instead of long long.

Quoted 25 lines
---
 tests/kms_content_protection.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
tests/kms_content_protection.c +2 -1
index 801eff66c272..ef90ed4c1792 100644
@@ -89,7 +89,8 @@ wait_for_prop_value(igt_output_t *output, uint64_t expected,
 			return true;
 		usleep(1000);
 	}
-	igt_info("prop_value mismatch %ld != %ld\n", val, expected);
+	igt_info("prop_value mismatch %" PRId64 " != %" PRId64 "\n",
+		 val, expected);
 
 	return false;
 }
Signature · 6 lines
2.19.1

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Signature · 6 lines
Ville Syrjälä
Intel
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
#8 lore raw

[igt-dev] ✓ Fi.CI.IGT: success for series starting with [i-g-t,v2,1/6] kms_content_protection: Fix log bug on 32-bit platforms.

In reply to Eric Anholt
== Series Details ==

== Series Details ==

Series: series starting with [i-g-t,v2,1/6] kms_content_protection: Fix log bug on 32-bit platforms.
URL : https://patchwork.freedesktop.org/series/52556/
State : success

== Summary ==

= CI Bug Log - changes from IGT_4715_full -> IGTPW_2067_full =

== Summary - WARNING ==

Minor unknown changes coming with IGTPW_2067_full need to be verified manually.

If you think the reported changes have nothing to do with the changes introduced in IGTPW_2067_full, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.

External URL: https://patchwork.freedesktop.org/api/1.0/series/52556/revisions/1/mbox/

== Possible new issues ==

Here are the unknown changes that may have been introduced in IGTPW_2067_full:

=== IGT changes ===

    ==== Warnings ====

    igt@perf_pmu@rc6:
      shard-kbl:          PASS -> SKIP

    igt@tools_test@tools_test:
      shard-snb:          PASS -> SKIP +1

== Known issues ==

Here are the changes found in IGTPW_2067_full that come from known issues:

=== IGT changes ===

    ==== Issues hit ====

    igt@gem_ctx_isolation@vcs1-s3:
      shard-kbl:          PASS -> INCOMPLETE (fdo#103665)

    igt@gem_exec_await@wide-all:
      shard-glk:          PASS -> INCOMPLETE (k.org#198133, fdo#103359)

    igt@gem_userptr_blits@map-fixed-invalidate-busy-gup:
      shard-snb:          PASS -> INCOMPLETE (fdo#105411)

    igt@kms_busy@extended-pageflip-modeset-hang-oldfb-render-c:
      shard-glk:          PASS -> DMESG-WARN (fdo#107956)

    igt@kms_ccs@pipe-a-crc-sprite-planes-basic:
      shard-glk:          PASS -> FAIL (fdo#108145)

    igt@kms_color@pipe-a-legacy-gamma:
      shard-kbl:          PASS -> FAIL (fdo#108145, fdo#104782)
      shard-apl:          PASS -> FAIL (fdo#108145, fdo#104782)

    igt@kms_cursor_crc@cursor-256x85-onscreen:
      shard-apl:          NOTRUN -> FAIL (fdo#103232)

    igt@kms_cursor_crc@cursor-256x85-sliding:
      shard-kbl:          PASS -> FAIL (fdo#103232)

    igt@kms_cursor_crc@cursor-64x21-sliding:
      shard-apl:          PASS -> FAIL (fdo#103232) +3

    igt@kms_cursor_crc@cursor-64x64-sliding:
      shard-glk:          PASS -> FAIL (fdo#103232) +5

    igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-move:
      shard-kbl:          PASS -> FAIL (fdo#103167) +1

    igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-mmap-gtt:
      shard-apl:          PASS -> FAIL (fdo#103167) +4

    igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-fullscreen:
      shard-glk:          PASS -> FAIL (fdo#103167) +7

    igt@kms_plane_multiple@atomic-pipe-a-tiling-y:
      shard-glk:          PASS -> FAIL (fdo#103166) +2

    igt@kms_setmode@basic:
      shard-hsw:          PASS -> FAIL (fdo#99912)

    
    ==== Possible fixes ====

    igt@gem_eio@in-flight-suspend:
      shard-kbl:          INCOMPLETE (fdo#106702, fdo#103665) -> PASS

    igt@gem_ppgtt@blt-vs-render-ctx0:
      shard-kbl:          INCOMPLETE (fdo#106023, fdo#106887, fdo#103665) -> PASS

    igt@gem_tiled_blits@normal:
      shard-apl:          INCOMPLETE (fdo#103927) -> PASS

    igt@kms_available_modes_crc@available_mode_test_crc:
      shard-apl:          FAIL (fdo#106641) -> PASS

    igt@kms_busy@extended-modeset-hang-newfb-render-b:
      shard-kbl:          DMESG-WARN (fdo#107956) -> PASS

    igt@kms_color@pipe-b-degamma:
      shard-apl:          FAIL (fdo#104782) -> PASS

    igt@kms_cursor_crc@cursor-256x256-dpms:
      shard-glk:          FAIL (fdo#103232) -> PASS +4

    igt@kms_cursor_crc@cursor-256x256-suspend:
      shard-apl:          FAIL (fdo#103232, fdo#103191) -> PASS

    igt@kms_cursor_crc@cursor-256x85-random:
      shard-apl:          FAIL (fdo#103232) -> PASS +1

    igt@kms_cursor_legacy@2x-nonblocking-modeset-vs-cursor-atomic:
      shard-glk:          FAIL (fdo#106509, fdo#105454) -> PASS

    igt@kms_flip@dpms-vs-vblank-race-interruptible:
      shard-glk:          FAIL (fdo#103060) -> PASS

    igt@kms_frontbuffer_tracking@fbc-1p-indfb-fliptrack:
      shard-snb:          INCOMPLETE (fdo#105411) -> PASS

    igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-blt:
      shard-glk:          FAIL (fdo#103167) -> PASS
      shard-apl:          FAIL (fdo#103167) -> PASS +2

    igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-move:
      shard-kbl:          FAIL (fdo#103167) -> PASS +1

    igt@kms_plane_alpha_blend@pipe-c-constant-alpha-max:
      shard-glk:          FAIL (fdo#108145) -> PASS

    igt@kms_plane_multiple@atomic-pipe-b-tiling-x:
      shard-glk:          FAIL (fdo#103166) -> PASS +2

    igt@kms_plane_multiple@atomic-pipe-c-tiling-yf:
      shard-apl:          FAIL (fdo#103166) -> PASS +4
      shard-kbl:          FAIL (fdo#103166) -> PASS +2

    igt@kms_setmode@basic:
      shard-kbl:          FAIL (fdo#99912) -> PASS

fdo#103060 https://bugs.freedesktop.org/show_bug.cgi?id=103060
fdo#103166 https://bugs.freedesktop.org/show_bug.cgi?id=103166
fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
fdo#103191 https://bugs.freedesktop.org/show_bug.cgi?id=103191
fdo#103232 https://bugs.freedesktop.org/show_bug.cgi?id=103232
fdo#103359 https://bugs.freedesktop.org/show_bug.cgi?id=103359
fdo#103665 https://bugs.freedesktop.org/show_bug.cgi?id=103665
fdo#103927 https://bugs.freedesktop.org/show_bug.cgi?id=103927
fdo#104782 https://bugs.freedesktop.org/show_bug.cgi?id=104782
fdo#105411 https://bugs.freedesktop.org/show_bug.cgi?id=105411
fdo#105454 https://bugs.freedesktop.org/show_bug.cgi?id=105454
fdo#106023 https://bugs.freedesktop.org/show_bug.cgi?id=106023
fdo#106509 https://bugs.freedesktop.org/show_bug.cgi?id=106509
fdo#106641 https://bugs.freedesktop.org/show_bug.cgi?id=106641
fdo#106702 https://bugs.freedesktop.org/show_bug.cgi?id=106702
fdo#106887 https://bugs.freedesktop.org/show_bug.cgi?id=106887
fdo#107956 https://bugs.freedesktop.org/show_bug.cgi?id=107956
fdo#108145 https://bugs.freedesktop.org/show_bug.cgi?id=108145
fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912
k.org#198133 https://bugzilla.kernel.org/show_bug.cgi?id=198133

== Participating hosts (6 -> 5) ==

Missing (1): shard-skl

== Build changes ==

* IGT: IGT_4715 -> IGTPW_2067

CI_DRM_5141: fcdadbabc3216aa16c6d8236d55c5e5c8261cc91 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_2067: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2067/
IGT_4715: 111593c49d812a4f4ff9ab0ef053a3ab88a6f73f @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2067/shards.html
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev