gt; +/**
> + * igt_writen:
> + * @fd: the file descriptor
> + * @buf: the block with the contents to write
> + * @len: the length to write
> + *
> + * This writes @len bytes from @data to the sysfs file.
> + *
> + * Returns:
> + * -errorno on failure or bytes read on su
ection needs to be explicitly included in the docs. Squash this in:
diff --git a/docs/reference/igt-gpu-tools/igt-gpu-tools-docs.xml
b/docs/reference/igt-gpu-tools/igt-gpu-tools-docs.xml
index 189597c6..0dc5a0b7 100644
--- a/docs/reference/igt-gpu-tools/igt-gpu-tools-docs.xml
+++ b/docs/reference/igt-gpu-tools/igt-gpu-tools-docs.xml
@@ -30,6 +30,7 @@
+
--
Petri Latvala
ugfs: Add helper for writing debugfs files
> lib/igt_debugfs: Add helper for detecting debugfs files
> msm: Add helper for cmdstream building and submission
> msm: Add recovery tests
For patches 3+4, in case you're waiting for this:
Acked-by: Petri Latvala
For the record, msm-
On Mon, Nov 15, 2021 at 04:30:40PM -0800, Rob Clark wrote:
> From: Rob Clark
>
> Add a helper that can be used with, for ex, igt_require() so that tests
> can be skipped if the kernel is too old.
>
> Signed-off-by: Rob Clark
Reviewed-by: Petri Latvala
> ---
>
On Thu, Nov 11, 2021 at 09:35:16AM -0800, Rob Clark wrote:
> On Thu, Nov 11, 2021 at 4:13 AM Petri Latvala wrote:
> >
> > On Wed, Nov 10, 2021 at 11:00:41AM -0800, Rob Clark wrote:
> > > On Wed, Nov 10, 2021 at 10:37 AM Rob Clark wrote:
> > > >
> > >
On Wed, Nov 10, 2021 at 10:42:11AM -0800, Rob Clark wrote:
> From: Rob Clark
>
> Signed-off-by: Rob Clark
Reviewed-by: Petri Latvala
> ---
> v2: Fix headerdoc comments
>
> lib/igt_debugfs.c | 17 +
> lib/igt_debugfs.h | 13 +
> 2 f
*pipe = NULL;
> > +
> > + igt_fixture {
> > + dev = igt_msm_dev_open();
> > + pipe = igt_msm_pipe_open(dev, 0);
> > + scratch_bo = igt_msm_bo_new(dev, 0x1000, MSM_BO_WC);
> > + scratch =
__igt_debugfs_read(fd, (filename), (buf), sizeof(buf))
>
> +/**
> + * igt_debugfs_write:
> + * @filename: name of the debugfs file
> + * @buf: buffer to be written to the debugfs file
> + *
> + * This is just a convenience wrapper for __igt_debugfs_read. See its
&g
t somewhere.
> >
> > Rob Clark (3):
> > drmtest: Add DRIVER_MSM support
> > msm: Add helper library
> > msm: Add submit ioctl tests
>
> If there are no more comments on this series, could somebody push it?
Ah, I was expecting you to do it yourself. Merged now.
--
Petri Latvala
107,6 +107,7 @@ test_progs = [
> 'vc4_wait_seqno',
> 'vgem_basic',
> 'vgem_slow',
> + 'msm_submit',
Alphabetical order for this please.
When more msm-specific tests start appearing, consider an msm
subdirectory. Not needed f
e NULL in destructors
>
> Signed-off-by: Rob Clark
Reviewed-by: Petri Latvala
> ---
> .../igt-gpu-tools/igt-gpu-tools-docs.xml | 1 +
> lib/igt_msm.c | 211 ++
> lib/igt_msm.h
.submit_idx = 0,
> + .size = 4 * 4, /* 4 dwords in cmdbuf */
> + },
> + };
> + struct drm_msm_gem_submit req = {
> + .flags = pipe->pipe,
> + .queueid
gt; + * @title: msm
> + * @include: igt_msm.h
> + *
> + * This library provides various auxiliary helper functions for writing msm
> + * tests.
> + */
You need to add
to docs/reference/igt-gpu-tools/igt-gpu-tools-docs.xml so this gets
included, and please add
On Wed, Aug 25, 2021 at 04:31:37PM -0700, Rob Clark wrote:
> From: Rob Clark
>
> Signed-off-by: Rob Clark
Reviewed-by: Petri Latvala
> ---
> lib/drmtest.c | 3 +++
> lib/drmtest.h | 1 +
> 2 files changed, 4 insertions(+)
>
> diff --git a/lib/drmtest.c b/lib
On Thu, Aug 26, 2021 at 08:37:19AM -0700, Rob Clark wrote:
> On Wed, Aug 25, 2021 at 10:28 PM Petri Latvala
> wrote:
> >
> > On Wed, Aug 25, 2021 at 04:31:39PM -0700, Rob Clark wrote:
> > > From: Rob Clark
> > >
> > > Add an initial set of tests fo
ect 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_MSM_H
> +#define IGT_MSM_H
> +
> +#include "msm_drm.h"
> +
> +struct msm_device {
> + int fd;
> +};
Why do you need this wrapper struct?
--
Petri Latvala
;
> +
> + pipe->dev = dev;
> + pipe->pipe = MSM_PIPE_3D0;
> +
> + /* Note that kerenels prior to v4.15 did not support submitqueues.
> + * Mesa maintains support for older kernels, but I do not think
> + * that IGT needs to.
> + */
> + do_ioctl(dev->fd, DRM_IOCTL_MSM_SUBMITQUEUE_NEW, &req);
We try to maintain compatibility with older kernels to around "yay
back". If you want to be perfect, this part could produce a skip if
submitqueues don't exist, but most often such dancing is not worth the
trouble. Letting it fail "normally" on an old kernel is fine, the
error message received already points out which ioctl failed. You can
remove the uncertainty from this comment, in other words.
Also typo, kerenels -> kernels.
--
Petri Latvala
; + };
> + struct drm_msm_gem_submit req = {
> + .flags = pipe->pipe,
> + .queueid = pipe->submitqueue_id,
> + .nr_cmds= ARRAY_SIZE(cmds),
> + .cmds = VOID2U64(cmds),
> + .nr_bos = ARRAY_SIZE(bos),
> + .bos = VOID2U64(bos),
> + };
> + uint32_t *cmdstream = igt_msm_bo_map(a);
> + if (dev->gen >= 5) {
> + *(cmdstream++) = pm4_pkt7_hdr(CP_NOP, 3);
> + } else {
> + *(cmdstream++) = pm4_pkt3_hdr(CP_NOP, 3);
> + }
> + *(cmdstream++) = 0;
> + *(cmdstream++) = 0;
> + *(cmdstream++) = 0;
> +
> + do_ioctl(dev->fd, DRM_IOCTL_MSM_GEM_SUBMIT, &req);
> + }
> +
> + igt_fixture {
> + igt_msm_bo_free(a);
> + igt_msm_bo_free(b);
> + igt_msm_pipe_close(pipe);
> + igt_msm_dev_close(dev);
... crashes in here.
--
Petri Latvala
On Wed, Aug 25, 2021 at 08:37:39AM -0700, Rob Clark wrote:
> On Wed, Aug 25, 2021 at 1:44 AM Petri Latvala wrote:
> >
> > On Tue, Aug 24, 2021 at 03:49:31PM -0700, Rob Clark wrote:
> > > From: Rob Clark
> > >
> > > Handle some of the boilerplate for t
19 matches
Mail list logo