* [PATCH i-g-t 1/4] kms_content_protection: Fix log bug on 32-bit platforms.
@ 2018-11-14 22:28 Eric Anholt
2018-11-14 22:28 ` [PATCH i-g-t 2/4] v3d: Import the V3D DRM UAPI header Eric Anholt
` (5 more replies)
0 siblings, 6 replies; 15+ messages in thread
From: Eric Anholt @ 2018-11-14 22:28 UTC (permalink / raw)
To: intel-gfx
long is different between 32 and 64 and should basically never be
used. Fixes compiler warning about passing the wrong type.
Signed-off-by: Eric Anholt <eric@anholt.net>
---
tests/kms_content_protection.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tests/kms_content_protection.c b/tests/kms_content_protection.c
index 801eff66c272..bb9ecd3f4cde 100644
--- a/tests/kms_content_protection.c
+++ b/tests/kms_content_protection.c
@@ -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 %lld != %lld\n",
+ (long long)val, (long long)expected);
return false;
}
--
2.19.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH i-g-t 2/4] v3d: Import the V3D DRM UAPI header.
2018-11-14 22:28 [PATCH i-g-t 1/4] kms_content_protection: Fix log bug on 32-bit platforms Eric Anholt
@ 2018-11-14 22:28 ` Eric Anholt
2018-11-21 10:15 ` Petri Latvala
2018-11-14 22:28 ` [PATCH i-g-t 3/4] Add v3d helper library Eric Anholt
` (4 subsequent siblings)
5 siblings, 1 reply; 15+ messages in thread
From: Eric Anholt @ 2018-11-14 22:28 UTC (permalink / raw)
To: intel-gfx
Copied from make headers_install at drm-misc-next 783195ec1cad
("drm/syncobj: disable the timeline UAPI for now v2")
Signed-off-by: Eric Anholt <eric@anholt.net>
---
include/drm-uapi/v3d_drm.h | 204 +++++++++++++++++++++++++++++++++++++
1 file changed, 204 insertions(+)
create mode 100644 include/drm-uapi/v3d_drm.h
diff --git a/include/drm-uapi/v3d_drm.h b/include/drm-uapi/v3d_drm.h
new file mode 100644
index 000000000000..f446656d00b1
--- /dev/null
+++ b/include/drm-uapi/v3d_drm.h
@@ -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_ */
--
2.19.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH i-g-t 3/4] Add v3d helper library
2018-11-14 22:28 [PATCH i-g-t 1/4] kms_content_protection: Fix log bug on 32-bit platforms Eric Anholt
2018-11-14 22:28 ` [PATCH i-g-t 2/4] v3d: Import the V3D DRM UAPI header Eric Anholt
@ 2018-11-14 22:28 ` Eric Anholt
2018-11-21 10:17 ` Petri Latvala
2018-11-14 22:28 ` [PATCH i-g-t 4/4] igt/v3d_*: Add new tests for the V3D UABI Eric Anholt
` (3 subsequent siblings)
5 siblings, 1 reply; 15+ messages in thread
From: Eric Anholt @ 2018-11-14 22:28 UTC (permalink / raw)
To: intel-gfx
Just a few little ioctl wrappers that v3d tests will use.
Signed-off-by: Eric Anholt <eric@anholt.net>
---
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
diff --git a/lib/Makefile.sources b/lib/Makefile.sources
index e98989ff8ed9..808b9617eca2 100644
--- a/lib/Makefile.sources
+++ b/lib/Makefile.sources
@@ -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
diff --git a/lib/drmtest.c b/lib/drmtest.c
index fee9d33ad2a5..d2aa1c19154f 100644
--- a/lib/drmtest.c
+++ b/lib/drmtest.c
@@ -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:
diff --git a/lib/drmtest.h b/lib/drmtest.h
index 949865ee54dd..96ee517e2ec1 100644
--- a/lib/drmtest.h
+++ b/lib/drmtest.h
@@ -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
diff --git a/lib/igt_v3d.c b/lib/igt_v3d.c
new file mode 100644
index 000000000000..1a5ede1bd5fc
--- /dev/null
+++ b/lib/igt_v3d.c
@@ -0,0 +1,130 @@
+/*
+ * Copyright © 2016 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.
+ */
+
+#include <assert.h>
+#include <string.h>
+#include <signal.h>
+#include <errno.h>
+#include <sys/mman.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/ioctl.h>
+#include <fcntl.h>
+
+#include "drmtest.h"
+#include "igt_aux.h"
+#include "igt_core.h"
+#include "igt_v3d.h"
+#include "ioctl_wrappers.h"
+#include "intel_reg.h"
+#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
+ * @title: V3D
+ * @include: igt.h
+ *
+ * This library provides various auxiliary helper functions for writing V3D
+ * tests.
+ */
+
+struct v3d_bo *
+igt_v3d_create_bo(int fd, size_t size)
+{
+ struct v3d_bo *bo = calloc(1, sizeof(*bo));
+
+ struct drm_v3d_create_bo create = {
+ .size = size,
+ };
+
+ do_ioctl(fd, DRM_IOCTL_V3D_CREATE_BO, &create);
+
+ bo->handle = create.handle;
+ bo->offset = create.offset;
+ bo->size = size;
+
+ return bo;
+}
+
+void
+igt_v3d_free_bo(int fd, struct v3d_bo *bo)
+{
+ if (bo->map)
+ munmap(bo->map, bo->size);
+ gem_close(fd, bo->handle);
+ free(bo);
+}
+
+uint32_t
+igt_v3d_get_bo_offset(int fd, uint32_t handle)
+{
+ struct drm_v3d_get_bo_offset get = {
+ .handle = handle,
+ };
+
+ do_ioctl(fd, DRM_IOCTL_V3D_GET_BO_OFFSET, &get);
+
+ return get.offset;
+}
+
+uint32_t
+igt_v3d_get_param(int fd, enum drm_v3d_param param)
+{
+ struct drm_v3d_get_param get = {
+ .param = param,
+ };
+
+ do_ioctl(fd, DRM_IOCTL_V3D_GET_PARAM, &get);
+
+ return get.value;
+}
+
+void *
+igt_v3d_mmap_bo(int fd, uint32_t handle, uint32_t size, unsigned prot)
+{
+ struct drm_v3d_mmap_bo mmap_bo = {
+ .handle = handle,
+ };
+ void *ptr;
+
+ do_ioctl(fd, DRM_IOCTL_V3D_MMAP_BO, &mmap_bo);
+
+ ptr = mmap(0, size, prot, MAP_SHARED, fd, mmap_bo.offset);
+ if (ptr == MAP_FAILED)
+ return NULL;
+ else
+ return ptr;
+}
+
+void igt_v3d_bo_mmap(int fd, struct v3d_bo *bo)
+{
+ bo->map = igt_v3d_mmap_bo(fd, bo->handle, bo->size,
+ PROT_READ | PROT_WRITE);
+ igt_assert(bo->map);
+}
diff --git a/lib/igt_v3d.h b/lib/igt_v3d.h
new file mode 100644
index 000000000000..bdbcb2dbc5cc
--- /dev/null
+++ b/lib/igt_v3d.h
@@ -0,0 +1,46 @@
+/*
+ * Copyright © 2016 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 IGT_V3D_H
+#define IGT_V3D_H
+
+#include "v3d_drm.h"
+
+struct v3d_bo *igt_v3d_create_bo(int fd, size_t size);
+void igt_v3d_free_bo(int fd, struct v3d_bo *bo);
+
+/* IOCTL wrappers */
+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_bo_mmap(int fd, struct v3d_bo *bo);
+
+struct v3d_bo {
+ int handle;
+ uint32_t offset;
+ uint32_t size;
+ void *map;
+};
+
+#endif /* IGT_V3D_H */
diff --git a/lib/meson.build b/lib/meson.build
index 8961ca494af8..19f5d51ceead 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -48,6 +48,7 @@ lib_sources = [
'igt_dummyload.c',
'uwildmat/uwildmat.c',
'igt_kmod.c',
+ 'igt_v3d.c',
'igt_vc4.c',
'igt_psr.c',
]
--
2.19.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH i-g-t 4/4] igt/v3d_*: Add new tests for the V3D UABI.
2018-11-14 22:28 [PATCH i-g-t 1/4] kms_content_protection: Fix log bug on 32-bit platforms Eric Anholt
2018-11-14 22:28 ` [PATCH i-g-t 2/4] v3d: Import the V3D DRM UAPI header Eric Anholt
2018-11-14 22:28 ` [PATCH i-g-t 3/4] Add v3d helper library Eric Anholt
@ 2018-11-14 22:28 ` Eric Anholt
2018-11-21 10:13 ` Petri Latvala
2018-11-14 22:50 ` ✓ Fi.CI.BAT: success for series starting with [1/4] kms_content_protection: Fix log bug on 32-bit platforms Patchwork
` (2 subsequent siblings)
5 siblings, 1 reply; 15+ messages in thread
From: Eric Anholt @ 2018-11-14 22:28 UTC (permalink / raw)
To: intel-gfx
These are basic non-rendering tests of the UABI.
Signed-off-by: Eric Anholt <eric@anholt.net>
---
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
diff --git a/lib/igt_v3d.c b/lib/igt_v3d.c
index 1a5ede1bd5fc..619c072c0e47 100644
--- a/lib/igt_v3d.c
+++ b/lib/igt_v3d.c
@@ -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
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 3d1ce0bc1af8..a6b2ba51ea4f 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -14,6 +14,8 @@ if BUILD_VC4
TESTS_progs += $(VC4_TESTS)
endif
+TESTS_progs += $(V3D_TESTS)
+
if HAVE_CHAMELIUM
TESTS_progs += \
kms_chamelium \
diff --git a/tests/Makefile.sources b/tests/Makefile.sources
index d007ebc74ab9..3ed60e7c30c7 100644
--- a/tests/Makefile.sources
+++ b/tests/Makefile.sources
@@ -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 \
diff --git a/tests/meson.build b/tests/meson.build
index 3020f7984d7a..4472536aef65 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -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',
diff --git a/tests/v3d_ci/README b/tests/v3d_ci/README
new file mode 100644
index 000000000000..e03c552fb972
--- /dev/null
+++ b/tests/v3d_ci/README
@@ -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 (eric@anholt.net).
+
+============
+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
diff --git a/tests/v3d_ci/v3d.testlist b/tests/v3d_ci/v3d.testlist
new file mode 100644
index 000000000000..b55e8e571d7d
--- /dev/null
+++ b/tests/v3d_ci/v3d.testlist
@@ -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
diff --git a/tests/v3d_get_bo_offset.c b/tests/v3d_get_bo_offset.c
new file mode 100644
index 000000000000..0923dc85f0d0
--- /dev/null
+++ b/tests/v3d_get_bo_offset.c
@@ -0,0 +1,78 @@
+/*
+ * Copyright © 2017 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.
+ */
+
+#include "igt.h"
+#include "igt_v3d.h"
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <fcntl.h>
+#include <inttypes.h>
+#include <errno.h>
+#include <sys/stat.h>
+#include <sys/ioctl.h>
+#include <poll.h>
+#include "v3d_drm.h"
+#include "igt_v3d.h"
+
+igt_main
+{
+ int fd;
+
+ igt_fixture
+ fd = drm_open_driver(DRIVER_V3D);
+
+ igt_subtest("create-get-offsets") {
+ struct v3d_bo *bos[2] = {
+ igt_v3d_create_bo(fd, 4096),
+ igt_v3d_create_bo(fd, 4096),
+ };
+ uint32_t offsets[2] = {
+ igt_v3d_get_bo_offset(fd, bos[0]->handle),
+ igt_v3d_get_bo_offset(fd, bos[1]->handle),
+ };
+
+ igt_assert_neq(bos[0]->handle, bos[1]->handle);
+ igt_assert_neq(bos[0]->offset, bos[1]->offset);
+ igt_assert_eq(bos[0]->offset, offsets[0]);
+ igt_assert_eq(bos[1]->offset, offsets[1]);
+
+ /* 0 is an invalid offset for BOs to be placed at. */
+ igt_assert_neq(bos[0]->offset, 0);
+ igt_assert_neq(bos[1]->offset, 0);
+
+ igt_v3d_free_bo(fd, bos[0]);
+ igt_v3d_free_bo(fd, bos[1]);
+ }
+
+ igt_subtest("get-bad-handle") {
+ struct drm_v3d_get_bo_offset get = {
+ .handle = 0xd0d0d0d0,
+ };
+ do_ioctl_err(fd, DRM_IOCTL_V3D_GET_BO_OFFSET, &get, ENOENT);
+ }
+
+ igt_fixture
+ close(fd);
+}
diff --git a/tests/v3d_get_param.c b/tests/v3d_get_param.c
new file mode 100644
index 000000000000..76563406c0a1
--- /dev/null
+++ b/tests/v3d_get_param.c
@@ -0,0 +1,80 @@
+/*
+ * Copyright © 2017 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.
+ */
+
+#include "igt.h"
+#include "igt_v3d.h"
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <fcntl.h>
+#include <inttypes.h>
+#include <errno.h>
+#include <sys/stat.h>
+#include <sys/ioctl.h>
+#include <poll.h>
+#include "v3d_drm.h"
+#include "igt_v3d.h"
+
+igt_main
+{
+ int fd;
+
+ igt_fixture
+ fd = drm_open_driver(DRIVER_V3D);
+
+ igt_subtest("base-params") {
+ enum drm_v3d_param last_base_param =
+ DRM_V3D_PARAM_V3D_CORE0_IDENT2;
+
+ uint32_t results[last_base_param];
+
+ for (int i = 0; i < ARRAY_SIZE(results); i++)
+ results[i] = igt_v3d_get_param(fd, i);
+
+ /* HUB TVER field */
+ igt_assert_lte(3, results[DRM_V3D_PARAM_V3D_HUB_IDENT1] & 0xf);
+
+ /* CORE's ident, has VER field but also an ID. */
+ igt_assert_eq(results[DRM_V3D_PARAM_V3D_CORE0_IDENT0] & 0xffffff,
+ 0x443356 /* "V3D" */);
+ }
+
+ igt_subtest("get-bad-param") {
+ struct drm_v3d_get_param get = {
+ .param = 0xd0d0d0d0,
+ };
+ do_ioctl_err(fd, DRM_IOCTL_V3D_GET_PARAM, &get, EINVAL);
+ }
+
+ igt_subtest("get-bad-flags") {
+ struct drm_v3d_get_param get = {
+ .param = DRM_V3D_PARAM_V3D_HUB_IDENT1,
+ .pad = 1,
+ };
+ do_ioctl_err(fd, DRM_IOCTL_V3D_GET_PARAM, &get, EINVAL);
+ }
+
+ igt_fixture
+ close(fd);
+}
diff --git a/tests/v3d_mmap.c b/tests/v3d_mmap.c
new file mode 100644
index 000000000000..a6fe7e5a7322
--- /dev/null
+++ b/tests/v3d_mmap.c
@@ -0,0 +1,55 @@
+/*
+ * Copyright © 2017 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.
+ */
+
+#include "igt.h"
+#include "igt_v3d.h"
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <fcntl.h>
+#include <inttypes.h>
+#include <errno.h>
+#include <sys/stat.h>
+#include <sys/ioctl.h>
+#include <poll.h>
+#include "v3d_drm.h"
+#include "igt_v3d.h"
+
+igt_main
+{
+ int fd;
+
+ igt_fixture
+ fd = drm_open_driver(DRIVER_V3D);
+
+ igt_subtest("mmap-bad-handle") {
+ struct drm_v3d_mmap_bo get = {
+ .handle = 0xd0d0d0d0,
+ };
+ do_ioctl_err(fd, DRM_IOCTL_V3D_MMAP_BO, &get, ENOENT);
+ }
+
+ igt_fixture
+ close(fd);
+}
--
2.19.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 15+ messages in thread
* ✓ Fi.CI.BAT: success for series starting with [1/4] kms_content_protection: Fix log bug on 32-bit platforms.
2018-11-14 22:28 [PATCH i-g-t 1/4] kms_content_protection: Fix log bug on 32-bit platforms Eric Anholt
` (2 preceding siblings ...)
2018-11-14 22:28 ` [PATCH i-g-t 4/4] igt/v3d_*: Add new tests for the V3D UABI Eric Anholt
@ 2018-11-14 22:50 ` Patchwork
2018-11-15 6:24 ` ✗ Fi.CI.IGT: failure " Patchwork
2018-11-15 11:17 ` [PATCH i-g-t 1/4] " Ville Syrjälä
5 siblings, 0 replies; 15+ messages in thread
From: Patchwork @ 2018-11-14 22:50 UTC (permalink / raw)
To: Eric Anholt; +Cc: intel-gfx
== Series Details ==
Series: series starting with [1/4] kms_content_protection: Fix log bug on 32-bit platforms.
URL : https://patchwork.freedesktop.org/series/52505/
State : success
== Summary ==
= CI Bug Log - changes from IGT_4714 -> IGTPW_2062 =
== Summary - WARNING ==
Minor unknown changes coming with IGTPW_2062 need to be verified
manually.
If you think the reported changes have nothing to do with the changes
introduced in IGTPW_2062, 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/52505/revisions/1/mbox/
== Possible new issues ==
Here are the unknown changes that may have been introduced in IGTPW_2062:
=== IGT changes ===
==== Possible regressions ====
igt@kms_chamelium@hdmi-edid-read:
{fi-kbl-7567u}: SKIP -> FAIL +3
==== Warnings ====
igt@kms_chamelium@hdmi-hpd-fast:
fi-icl-u2: SKIP -> PASS +3
igt@kms_flip@basic-flip-vs-modeset:
fi-kbl-x1275: SKIP -> PASS +36
igt@prime_vgem@basic-fence-flip:
fi-cfl-s3: SKIP -> PASS
== Known issues ==
Here are the changes found in IGTPW_2062 that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@drv_selftest@live_contexts:
fi-icl-u: NOTRUN -> INCOMPLETE (fdo#108315) +1
igt@drv_selftest@live_hangcheck:
fi-bwr-2160: PASS -> DMESG-FAIL (fdo#108735)
igt@kms_chamelium@common-hpd-after-suspend:
fi-skl-6700k2: PASS -> WARN (fdo#108680)
fi-icl-u2: SKIP -> DMESG-FAIL (fdo#103375, fdo#107732, fdo#108070)
igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic:
fi-icl-u2: PASS -> DMESG-WARN (fdo#107732)
==== Possible fixes ====
igt@drv_module_reload@basic-reload:
fi-blb-e6850: INCOMPLETE (fdo#107718) -> PASS
igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
fi-byt-clapper: FAIL (fdo#107362, fdo#103191) -> PASS
==== Warnings ====
igt@drv_selftest@live_contexts:
fi-icl-u2: INCOMPLETE (fdo#108315) -> DMESG-FAIL (fdo#108569)
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
fdo#103191 https://bugs.freedesktop.org/show_bug.cgi?id=103191
fdo#103375 https://bugs.freedesktop.org/show_bug.cgi?id=103375
fdo#107362 https://bugs.freedesktop.org/show_bug.cgi?id=107362
fdo#107718 https://bugs.freedesktop.org/show_bug.cgi?id=107718
fdo#107732 https://bugs.freedesktop.org/show_bug.cgi?id=107732
fdo#108070 https://bugs.freedesktop.org/show_bug.cgi?id=108070
fdo#108315 https://bugs.freedesktop.org/show_bug.cgi?id=108315
fdo#108569 https://bugs.freedesktop.org/show_bug.cgi?id=108569
fdo#108680 https://bugs.freedesktop.org/show_bug.cgi?id=108680
fdo#108735 https://bugs.freedesktop.org/show_bug.cgi?id=108735
== Participating hosts (53 -> 47) ==
Additional (1): fi-icl-u
Missing (7): fi-kbl-soraka fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-snb-2520m fi-ctg-p8600
== Build changes ==
* IGT: IGT_4714 -> IGTPW_2062
CI_DRM_5106: 852b9329fbb6ea8bdbb3dac78328aae73d919305 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_2062: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2062/
IGT_4714: cab148ca3ec904a94d0cd43476cf7e1f8663f906 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
== Testlist changes ==
+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_2062/issues.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 15+ messages in thread
* ✗ Fi.CI.IGT: failure for series starting with [1/4] kms_content_protection: Fix log bug on 32-bit platforms.
2018-11-14 22:28 [PATCH i-g-t 1/4] kms_content_protection: Fix log bug on 32-bit platforms Eric Anholt
` (3 preceding siblings ...)
2018-11-14 22:50 ` ✓ Fi.CI.BAT: success for series starting with [1/4] kms_content_protection: Fix log bug on 32-bit platforms Patchwork
@ 2018-11-15 6:24 ` Patchwork
2018-11-15 11:17 ` [PATCH i-g-t 1/4] " Ville Syrjälä
5 siblings, 0 replies; 15+ messages in thread
From: Patchwork @ 2018-11-15 6:24 UTC (permalink / raw)
To: Eric Anholt; +Cc: intel-gfx
== Series Details ==
Series: series starting with [1/4] kms_content_protection: Fix log bug on 32-bit platforms.
URL : https://patchwork.freedesktop.org/series/52505/
State : failure
== Summary ==
= CI Bug Log - changes from IGT_4714_full -> IGTPW_2062_full =
== Summary - FAILURE ==
Serious unknown changes coming with IGTPW_2062_full absolutely need to be
verified manually.
If you think the reported changes have nothing to do with the changes
introduced in IGTPW_2062_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/52505/revisions/1/mbox/
== Possible new issues ==
Here are the unknown changes that may have been introduced in IGTPW_2062_full:
=== IGT changes ===
==== Possible regressions ====
igt@gem_exec_reuse@baggage:
shard-apl: PASS -> DMESG-WARN
==== Warnings ====
igt@kms_cursor_legacy@2x-flip-vs-cursor-legacy:
shard-hsw: PASS -> SKIP
== Known issues ==
Here are the changes found in IGTPW_2062_full that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@gem_ppgtt@blt-vs-render-ctxn:
shard-kbl: PASS -> INCOMPLETE (fdo#106887, fdo#106023, fdo#103665)
igt@gem_workarounds@suspend-resume:
shard-kbl: PASS -> DMESG-WARN (fdo#103313)
igt@kms_atomic@plane_overlay_legacy:
shard-apl: PASS -> INCOMPLETE (fdo#103927)
igt@kms_busy@extended-modeset-hang-newfb-with-reset-render-c:
shard-kbl: NOTRUN -> DMESG-WARN (fdo#107956) +1
igt@kms_busy@extended-pageflip-modeset-hang-oldfb-render-a:
shard-apl: PASS -> DMESG-WARN (fdo#107956)
igt@kms_busy@extended-pageflip-modeset-hang-oldfb-render-c:
shard-glk: NOTRUN -> DMESG-WARN (fdo#107956) +1
igt@kms_ccs@pipe-b-crc-sprite-planes-basic:
shard-glk: PASS -> FAIL (fdo#108145)
shard-kbl: NOTRUN -> FAIL (fdo#107725, fdo#108145)
igt@kms_color@pipe-b-degamma:
shard-apl: PASS -> FAIL (fdo#104782)
igt@kms_color@pipe-c-ctm-blue-to-red:
shard-kbl: PASS -> DMESG-WARN (fdo#103313, fdo#105345)
igt@kms_cursor_crc@cursor-256x256-sliding:
shard-glk: PASS -> FAIL (fdo#103232)
shard-kbl: NOTRUN -> FAIL (fdo#103232)
igt@kms_cursor_crc@cursor-256x85-random:
shard-apl: PASS -> FAIL (fdo#103232) +5
igt@kms_cursor_crc@cursor-64x64-dpms:
shard-kbl: PASS -> FAIL (fdo#103232) +4
igt@kms_flip@2x-modeset-vs-vblank-race-interruptible:
shard-glk: PASS -> FAIL (fdo#103060)
igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-mmap-cpu:
shard-glk: PASS -> FAIL (fdo#103167)
shard-apl: PASS -> FAIL (fdo#103167)
igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-pwrite:
shard-glk: NOTRUN -> FAIL (fdo#103167) +2
igt@kms_plane@plane-position-covered-pipe-a-planes:
shard-glk: NOTRUN -> FAIL (fdo#103166) +2
shard-kbl: PASS -> FAIL (fdo#103166) +2
igt@kms_plane@plane-position-covered-pipe-b-planes:
shard-glk: PASS -> FAIL (fdo#103166) +1
igt@kms_plane_alpha_blend@pipe-c-alpha-transparant-fb:
shard-glk: NOTRUN -> FAIL (fdo#108145) +8
igt@kms_plane_multiple@atomic-pipe-a-tiling-x:
shard-apl: PASS -> FAIL (fdo#103166) +5
igt@kms_properties@connector-properties-atomic:
shard-glk: NOTRUN -> FAIL (fdo#108642)
shard-hsw: NOTRUN -> FAIL (fdo#108642)
igt@kms_setmode@basic:
shard-apl: PASS -> FAIL (fdo#99912)
==== Possible fixes ====
igt@drv_suspend@forcewake:
shard-kbl: INCOMPLETE (fdo#103665) -> PASS
igt@drv_suspend@shrink:
shard-snb: INCOMPLETE (fdo#105411, fdo#106886) -> PASS
igt@gem_ppgtt@blt-vs-render-ctx0:
shard-kbl: INCOMPLETE (fdo#106887, fdo#106023, fdo#103665) -> PASS
igt@kms_busy@extended-modeset-hang-newfb-with-reset-render-a:
shard-hsw: DMESG-WARN (fdo#107956) -> PASS
igt@kms_cursor_crc@cursor-128x42-sliding:
shard-kbl: FAIL (fdo#103232) -> PASS +3
igt@kms_cursor_crc@cursor-256x85-random:
shard-glk: FAIL (fdo#103232) -> PASS +1
igt@kms_cursor_crc@cursor-64x21-sliding:
shard-apl: FAIL (fdo#103232) -> PASS +3
igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-pwrite:
shard-apl: FAIL (fdo#103167) -> PASS
igt@kms_frontbuffer_tracking@fbc-2p-primscrn-spr-indfb-onoff:
shard-glk: FAIL (fdo#103167) -> PASS +4
igt@kms_plane_multiple@atomic-pipe-b-tiling-y:
shard-apl: FAIL (fdo#103166) -> PASS
igt@kms_plane_multiple@atomic-pipe-b-tiling-yf:
shard-kbl: FAIL (fdo#103166) -> PASS
igt@kms_universal_plane@universal-plane-pipe-a-functional:
shard-glk: FAIL (fdo#103166) -> PASS +2
igt@kms_vblank@pipe-a-query-busy:
shard-snb: INCOMPLETE (fdo#105411) -> PASS
igt@perf_pmu@busy-start-vcs0:
shard-apl: DMESG-WARN (fdo#105602, fdo#103558) -> 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#103232 https://bugs.freedesktop.org/show_bug.cgi?id=103232
fdo#103313 https://bugs.freedesktop.org/show_bug.cgi?id=103313
fdo#103558 https://bugs.freedesktop.org/show_bug.cgi?id=103558
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#105345 https://bugs.freedesktop.org/show_bug.cgi?id=105345
fdo#105411 https://bugs.freedesktop.org/show_bug.cgi?id=105411
fdo#105602 https://bugs.freedesktop.org/show_bug.cgi?id=105602
fdo#106023 https://bugs.freedesktop.org/show_bug.cgi?id=106023
fdo#106886 https://bugs.freedesktop.org/show_bug.cgi?id=106886
fdo#106887 https://bugs.freedesktop.org/show_bug.cgi?id=106887
fdo#107725 https://bugs.freedesktop.org/show_bug.cgi?id=107725
fdo#107956 https://bugs.freedesktop.org/show_bug.cgi?id=107956
fdo#108145 https://bugs.freedesktop.org/show_bug.cgi?id=108145
fdo#108642 https://bugs.freedesktop.org/show_bug.cgi?id=108642
fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912
== Participating hosts (6 -> 5) ==
Missing (1): shard-skl
== Build changes ==
* IGT: IGT_4714 -> IGTPW_2062
CI_DRM_5106: 852b9329fbb6ea8bdbb3dac78328aae73d919305 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_2062: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2062/
IGT_4714: cab148ca3ec904a94d0cd43476cf7e1f8663f906 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2062/shards.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH i-g-t 1/4] kms_content_protection: Fix log bug on 32-bit platforms.
2018-11-14 22:28 [PATCH i-g-t 1/4] kms_content_protection: Fix log bug on 32-bit platforms Eric Anholt
` (4 preceding siblings ...)
2018-11-15 6:24 ` ✗ Fi.CI.IGT: failure " Patchwork
@ 2018-11-15 11:17 ` Ville Syrjälä
2018-11-15 18:51 ` Eric Anholt
5 siblings, 1 reply; 15+ messages in thread
From: Ville Syrjälä @ 2018-11-15 11:17 UTC (permalink / raw)
To: Eric Anholt; +Cc: intel-gfx
On Wed, Nov 14, 2018 at 02:28:29PM -0800, Eric Anholt wrote:
> long is different between 32 and 64 and should basically never be
> used. Fixes compiler warning about passing the wrong type.
>
> Signed-off-by: Eric Anholt <eric@anholt.net>
> ---
> tests/kms_content_protection.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/tests/kms_content_protection.c b/tests/kms_content_protection.c
> index 801eff66c272..bb9ecd3f4cde 100644
> --- a/tests/kms_content_protection.c
> +++ b/tests/kms_content_protection.c
> @@ -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 %lld != %lld\n",
> + (long long)val, (long long)expected);
We use the ugly PRId64 & co. elsewhere for this.
Also FYI we have an igt-dev list now, so should post there rather than
on intel-gfx.
>
> return false;
> }
> --
> 2.19.1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH i-g-t 1/4] kms_content_protection: Fix log bug on 32-bit platforms.
2018-11-15 11:17 ` [PATCH i-g-t 1/4] " Ville Syrjälä
@ 2018-11-15 18:51 ` Eric Anholt
2018-11-15 20:40 ` Ville Syrjälä
0 siblings, 1 reply; 15+ messages in thread
From: Eric Anholt @ 2018-11-15 18:51 UTC (permalink / raw)
To: Ville Syrjälä; +Cc: intel-gfx
[-- Attachment #1.1: Type: text/plain, Size: 1341 bytes --]
Ville Syrjälä <ville.syrjala@linux.intel.com> writes:
> On Wed, Nov 14, 2018 at 02:28:29PM -0800, Eric Anholt wrote:
>> long is different between 32 and 64 and should basically never be
>> used. Fixes compiler warning about passing the wrong type.
>>
>> Signed-off-by: Eric Anholt <eric@anholt.net>
>> ---
>> tests/kms_content_protection.c | 3 ++-
>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/tests/kms_content_protection.c b/tests/kms_content_protection.c
>> index 801eff66c272..bb9ecd3f4cde 100644
>> --- a/tests/kms_content_protection.c
>> +++ b/tests/kms_content_protection.c
>> @@ -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 %lld != %lld\n",
>> + (long long)val, (long long)expected);
>
> We use the ugly PRId64 & co. elsewhere for this.
My experience with those ugly macros is that people have a flinch when
trying to remember how they work and just ignore the issue instead,
leaving it for those that have to compile for 32. I'll switch it,
though.
Hopefully i-g-t will get cross-compiling CI and merge requests at some
point so that these bugs can just never land in the first place.
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH i-g-t 1/4] kms_content_protection: Fix log bug on 32-bit platforms.
2018-11-15 18:51 ` Eric Anholt
@ 2018-11-15 20:40 ` Ville Syrjälä
0 siblings, 0 replies; 15+ messages in thread
From: Ville Syrjälä @ 2018-11-15 20:40 UTC (permalink / raw)
To: Eric Anholt; +Cc: intel-gfx
On Thu, Nov 15, 2018 at 10:51:51AM -0800, Eric Anholt wrote:
> Ville Syrjälä <ville.syrjala@linux.intel.com> writes:
>
> > On Wed, Nov 14, 2018 at 02:28:29PM -0800, Eric Anholt wrote:
> >> long is different between 32 and 64 and should basically never be
> >> used. Fixes compiler warning about passing the wrong type.
> >>
> >> Signed-off-by: Eric Anholt <eric@anholt.net>
> >> ---
> >> tests/kms_content_protection.c | 3 ++-
> >> 1 file changed, 2 insertions(+), 1 deletion(-)
> >>
> >> diff --git a/tests/kms_content_protection.c b/tests/kms_content_protection.c
> >> index 801eff66c272..bb9ecd3f4cde 100644
> >> --- a/tests/kms_content_protection.c
> >> +++ b/tests/kms_content_protection.c
> >> @@ -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 %lld != %lld\n",
> >> + (long long)val, (long long)expected);
> >
> > We use the ugly PRId64 & co. elsewhere for this.
>
> My experience with those ugly macros is that people have a flinch when
> trying to remember how they work and just ignore the issue instead,
> leaving it for those that have to compile for 32. I'll switch it,
> though.
>
> Hopefully i-g-t will get cross-compiling CI and merge requests at some
> point so that these bugs can just never land in the first place.
I thought we already did 32bit builds. Hmm. I guess we enabled that
only for the kernel builds.
--
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH i-g-t 4/4] igt/v3d_*: Add new tests for the V3D UABI.
2018-11-14 22:28 ` [PATCH i-g-t 4/4] igt/v3d_*: Add new tests for the V3D UABI Eric Anholt
@ 2018-11-21 10:13 ` Petri Latvala
2018-11-26 20:46 ` Eric Anholt
0 siblings, 1 reply; 15+ messages in thread
From: Petri Latvala @ 2018-11-21 10:13 UTC (permalink / raw)
To: Eric Anholt; +Cc: intel-gfx
On Wed, Nov 14, 2018 at 02:28:32PM -0800, Eric Anholt wrote:
> These are basic non-rendering tests of the UABI.
>
> Signed-off-by: Eric Anholt <eric@anholt.net>
> ---
> 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 +++++++++++++++++++++++++++
Do you need a separate directory for v3d or can you use the vc4
directory for v3d as well? Renamed to 'broadcom-ci' maybe?
> 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
>
> diff --git a/lib/igt_v3d.c b/lib/igt_v3d.c
> index 1a5ede1bd5fc..619c072c0e47 100644
> --- a/lib/igt_v3d.c
> +++ b/lib/igt_v3d.c
> @@ -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
> diff --git a/tests/Makefile.am b/tests/Makefile.am
> index 3d1ce0bc1af8..a6b2ba51ea4f 100644
> --- a/tests/Makefile.am
> +++ b/tests/Makefile.am
> @@ -14,6 +14,8 @@ if BUILD_VC4
> TESTS_progs += $(VC4_TESTS)
> endif
>
> +TESTS_progs += $(V3D_TESTS)
> +
> if HAVE_CHAMELIUM
> TESTS_progs += \
> kms_chamelium \
> diff --git a/tests/Makefile.sources b/tests/Makefile.sources
> index d007ebc74ab9..3ed60e7c30c7 100644
> --- a/tests/Makefile.sources
> +++ b/tests/Makefile.sources
> @@ -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 \
> diff --git a/tests/meson.build b/tests/meson.build
> index 3020f7984d7a..4472536aef65 100644
> --- a/tests/meson.build
> +++ b/tests/meson.build
> @@ -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',
> diff --git a/tests/v3d_ci/README b/tests/v3d_ci/README
> new file mode 100644
> index 000000000000..e03c552fb972
> --- /dev/null
> +++ b/tests/v3d_ci/README
> @@ -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.
Note to self: Change this piglit reference to igt_runner (or both) in
intel-ci/README...
--
Petri Latvala
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH i-g-t 2/4] v3d: Import the V3D DRM UAPI header.
2018-11-14 22:28 ` [PATCH i-g-t 2/4] v3d: Import the V3D DRM UAPI header Eric Anholt
@ 2018-11-21 10:15 ` Petri Latvala
0 siblings, 0 replies; 15+ messages in thread
From: Petri Latvala @ 2018-11-21 10:15 UTC (permalink / raw)
To: Eric Anholt; +Cc: intel-gfx
On Wed, Nov 14, 2018 at 02:28:30PM -0800, Eric Anholt wrote:
> Copied from make headers_install at drm-misc-next 783195ec1cad
> ("drm/syncobj: disable the timeline UAPI for now v2")
>
> Signed-off-by: Eric Anholt <eric@anholt.net>
Acked-by: Petri Latvala <petri.latvala@intel.com>
> ---
> include/drm-uapi/v3d_drm.h | 204 +++++++++++++++++++++++++++++++++++++
> 1 file changed, 204 insertions(+)
> create mode 100644 include/drm-uapi/v3d_drm.h
>
> diff --git a/include/drm-uapi/v3d_drm.h b/include/drm-uapi/v3d_drm.h
> new file mode 100644
> index 000000000000..f446656d00b1
> --- /dev/null
> +++ b/include/drm-uapi/v3d_drm.h
> @@ -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_ */
> --
> 2.19.1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH i-g-t 3/4] Add v3d helper library
2018-11-14 22:28 ` [PATCH i-g-t 3/4] Add v3d helper library Eric Anholt
@ 2018-11-21 10:17 ` Petri Latvala
0 siblings, 0 replies; 15+ messages in thread
From: Petri Latvala @ 2018-11-21 10:17 UTC (permalink / raw)
To: Eric Anholt; +Cc: intel-gfx
On Wed, Nov 14, 2018 at 02:28:31PM -0800, Eric Anholt wrote:
> Just a few little ioctl wrappers that v3d tests will use.
>
> Signed-off-by: Eric Anholt <eric@anholt.net>
Acked-by: Petri Latvala <petri.latvala@intel.com>
> ---
> 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
>
> diff --git a/lib/Makefile.sources b/lib/Makefile.sources
> index e98989ff8ed9..808b9617eca2 100644
> --- a/lib/Makefile.sources
> +++ b/lib/Makefile.sources
> @@ -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
> diff --git a/lib/drmtest.c b/lib/drmtest.c
> index fee9d33ad2a5..d2aa1c19154f 100644
> --- a/lib/drmtest.c
> +++ b/lib/drmtest.c
> @@ -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:
> diff --git a/lib/drmtest.h b/lib/drmtest.h
> index 949865ee54dd..96ee517e2ec1 100644
> --- a/lib/drmtest.h
> +++ b/lib/drmtest.h
> @@ -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
> diff --git a/lib/igt_v3d.c b/lib/igt_v3d.c
> new file mode 100644
> index 000000000000..1a5ede1bd5fc
> --- /dev/null
> +++ b/lib/igt_v3d.c
> @@ -0,0 +1,130 @@
> +/*
> + * Copyright © 2016 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.
> + */
> +
> +#include <assert.h>
> +#include <string.h>
> +#include <signal.h>
> +#include <errno.h>
> +#include <sys/mman.h>
> +#include <sys/types.h>
> +#include <sys/stat.h>
> +#include <sys/ioctl.h>
> +#include <fcntl.h>
> +
> +#include "drmtest.h"
> +#include "igt_aux.h"
> +#include "igt_core.h"
> +#include "igt_v3d.h"
> +#include "ioctl_wrappers.h"
> +#include "intel_reg.h"
> +#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
> + * @title: V3D
> + * @include: igt.h
> + *
> + * This library provides various auxiliary helper functions for writing V3D
> + * tests.
> + */
> +
> +struct v3d_bo *
> +igt_v3d_create_bo(int fd, size_t size)
> +{
> + struct v3d_bo *bo = calloc(1, sizeof(*bo));
> +
> + struct drm_v3d_create_bo create = {
> + .size = size,
> + };
> +
> + do_ioctl(fd, DRM_IOCTL_V3D_CREATE_BO, &create);
> +
> + bo->handle = create.handle;
> + bo->offset = create.offset;
> + bo->size = size;
> +
> + return bo;
> +}
> +
> +void
> +igt_v3d_free_bo(int fd, struct v3d_bo *bo)
> +{
> + if (bo->map)
> + munmap(bo->map, bo->size);
> + gem_close(fd, bo->handle);
> + free(bo);
> +}
> +
> +uint32_t
> +igt_v3d_get_bo_offset(int fd, uint32_t handle)
> +{
> + struct drm_v3d_get_bo_offset get = {
> + .handle = handle,
> + };
> +
> + do_ioctl(fd, DRM_IOCTL_V3D_GET_BO_OFFSET, &get);
> +
> + return get.offset;
> +}
> +
> +uint32_t
> +igt_v3d_get_param(int fd, enum drm_v3d_param param)
> +{
> + struct drm_v3d_get_param get = {
> + .param = param,
> + };
> +
> + do_ioctl(fd, DRM_IOCTL_V3D_GET_PARAM, &get);
> +
> + return get.value;
> +}
> +
> +void *
> +igt_v3d_mmap_bo(int fd, uint32_t handle, uint32_t size, unsigned prot)
> +{
> + struct drm_v3d_mmap_bo mmap_bo = {
> + .handle = handle,
> + };
> + void *ptr;
> +
> + do_ioctl(fd, DRM_IOCTL_V3D_MMAP_BO, &mmap_bo);
> +
> + ptr = mmap(0, size, prot, MAP_SHARED, fd, mmap_bo.offset);
> + if (ptr == MAP_FAILED)
> + return NULL;
> + else
> + return ptr;
> +}
> +
> +void igt_v3d_bo_mmap(int fd, struct v3d_bo *bo)
> +{
> + bo->map = igt_v3d_mmap_bo(fd, bo->handle, bo->size,
> + PROT_READ | PROT_WRITE);
> + igt_assert(bo->map);
> +}
> diff --git a/lib/igt_v3d.h b/lib/igt_v3d.h
> new file mode 100644
> index 000000000000..bdbcb2dbc5cc
> --- /dev/null
> +++ b/lib/igt_v3d.h
> @@ -0,0 +1,46 @@
> +/*
> + * Copyright © 2016 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 IGT_V3D_H
> +#define IGT_V3D_H
> +
> +#include "v3d_drm.h"
> +
> +struct v3d_bo *igt_v3d_create_bo(int fd, size_t size);
> +void igt_v3d_free_bo(int fd, struct v3d_bo *bo);
> +
> +/* IOCTL wrappers */
> +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_bo_mmap(int fd, struct v3d_bo *bo);
> +
> +struct v3d_bo {
> + int handle;
> + uint32_t offset;
> + uint32_t size;
> + void *map;
> +};
> +
> +#endif /* IGT_V3D_H */
> diff --git a/lib/meson.build b/lib/meson.build
> index 8961ca494af8..19f5d51ceead 100644
> --- a/lib/meson.build
> +++ b/lib/meson.build
> @@ -48,6 +48,7 @@ lib_sources = [
> 'igt_dummyload.c',
> 'uwildmat/uwildmat.c',
> 'igt_kmod.c',
> + 'igt_v3d.c',
> 'igt_vc4.c',
> 'igt_psr.c',
> ]
> --
> 2.19.1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH i-g-t 4/4] igt/v3d_*: Add new tests for the V3D UABI.
2018-11-21 10:13 ` Petri Latvala
@ 2018-11-26 20:46 ` Eric Anholt
2018-11-27 10:16 ` Petri Latvala
0 siblings, 1 reply; 15+ messages in thread
From: Eric Anholt @ 2018-11-26 20:46 UTC (permalink / raw)
To: Petri Latvala; +Cc: intel-gfx
[-- Attachment #1.1: Type: text/plain, Size: 1059 bytes --]
Petri Latvala <petri.latvala@intel.com> writes:
> On Wed, Nov 14, 2018 at 02:28:32PM -0800, Eric Anholt wrote:
>> These are basic non-rendering tests of the UABI.
>>
>> Signed-off-by: Eric Anholt <eric@anholt.net>
>> ---
>> 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 +++++++++++++++++++++++++++
>
>
> Do you need a separate directory for v3d or can you use the vc4
> directory for v3d as well? Renamed to 'broadcom-ci' maybe?
Do we really need to introduce the vendor name separate from the driver
name? I guess intel_ci makes some sense if it's used by Intel's CI, but
these are just the test lists for anyone that happens to use igt for
this driver.
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH i-g-t 4/4] igt/v3d_*: Add new tests for the V3D UABI.
2018-11-26 20:46 ` Eric Anholt
@ 2018-11-27 10:16 ` Petri Latvala
2018-11-27 20:46 ` Eric Anholt
0 siblings, 1 reply; 15+ messages in thread
From: Petri Latvala @ 2018-11-27 10:16 UTC (permalink / raw)
To: Eric Anholt; +Cc: intel-gfx
On Mon, Nov 26, 2018 at 12:46:46PM -0800, Eric Anholt wrote:
> Petri Latvala <petri.latvala@intel.com> writes:
>
> > On Wed, Nov 14, 2018 at 02:28:32PM -0800, Eric Anholt wrote:
> >> These are basic non-rendering tests of the UABI.
> >>
> >> Signed-off-by: Eric Anholt <eric@anholt.net>
> >> ---
> >> 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 +++++++++++++++++++++++++++
> >
> >
> > Do you need a separate directory for v3d or can you use the vc4
> > directory for v3d as well? Renamed to 'broadcom-ci' maybe?
>
> Do we really need to introduce the vendor name separate from the driver
> name? I guess intel_ci makes some sense if it's used by Intel's CI, but
> these are just the test lists for anyone that happens to use igt for
> this driver.
Fair enough, I was assuming there's an active CI somewhere that used
both at the same time.
Acked-by: Petri Latvala <petri.latvala@intel.com>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH i-g-t 4/4] igt/v3d_*: Add new tests for the V3D UABI.
2018-11-27 10:16 ` Petri Latvala
@ 2018-11-27 20:46 ` Eric Anholt
0 siblings, 0 replies; 15+ messages in thread
From: Eric Anholt @ 2018-11-27 20:46 UTC (permalink / raw)
To: Petri Latvala; +Cc: intel-gfx
[-- Attachment #1.1: Type: text/plain, Size: 1466 bytes --]
Petri Latvala <petri.latvala@intel.com> writes:
> On Mon, Nov 26, 2018 at 12:46:46PM -0800, Eric Anholt wrote:
>> Petri Latvala <petri.latvala@intel.com> writes:
>>
>> > On Wed, Nov 14, 2018 at 02:28:32PM -0800, Eric Anholt wrote:
>> >> These are basic non-rendering tests of the UABI.
>> >>
>> >> Signed-off-by: Eric Anholt <eric@anholt.net>
>> >> ---
>> >> 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 +++++++++++++++++++++++++++
>> >
>> >
>> > Do you need a separate directory for v3d or can you use the vc4
>> > directory for v3d as well? Renamed to 'broadcom-ci' maybe?
>>
>> Do we really need to introduce the vendor name separate from the driver
>> name? I guess intel_ci makes some sense if it's used by Intel's CI, but
>> these are just the test lists for anyone that happens to use igt for
>> this driver.
>
> Fair enough, I was assuming there's an active CI somewhere that used
> both at the same time.
>
>
>
> Acked-by: Petri Latvala <petri.latvala@intel.com>
Thanks for taking a look at these and acking them!
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2018-11-27 20:46 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-14 22:28 [PATCH i-g-t 1/4] kms_content_protection: Fix log bug on 32-bit platforms Eric Anholt
2018-11-14 22:28 ` [PATCH i-g-t 2/4] v3d: Import the V3D DRM UAPI header Eric Anholt
2018-11-21 10:15 ` Petri Latvala
2018-11-14 22:28 ` [PATCH i-g-t 3/4] Add v3d helper library Eric Anholt
2018-11-21 10:17 ` Petri Latvala
2018-11-14 22:28 ` [PATCH i-g-t 4/4] igt/v3d_*: Add new tests for the V3D UABI Eric Anholt
2018-11-21 10:13 ` Petri Latvala
2018-11-26 20:46 ` Eric Anholt
2018-11-27 10:16 ` Petri Latvala
2018-11-27 20:46 ` Eric Anholt
2018-11-14 22:50 ` ✓ Fi.CI.BAT: success for series starting with [1/4] kms_content_protection: Fix log bug on 32-bit platforms Patchwork
2018-11-15 6:24 ` ✗ Fi.CI.IGT: failure " Patchwork
2018-11-15 11:17 ` [PATCH i-g-t 1/4] " Ville Syrjälä
2018-11-15 18:51 ` Eric Anholt
2018-11-15 20:40 ` Ville Syrjälä
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.