public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Rob Herring <robh@kernel.org>
Cc: Development mailing list for IGT GPU Tools
	<igt-dev@lists.freedesktop.org>,
	Tomeu Vizoso <tomeu.vizoso@collabora.com>
Subject: Re: [igt-dev] [PATCH i-g-t 3/5] lib/panfrost: Add panfrost helpers
Date: Thu, 25 Apr 2019 09:41:13 +0200	[thread overview]
Message-ID: <20190425074113.GD9857@phenom.ffwll.local> (raw)
In-Reply-To: <CAL_JsqLBZi1PEtG4N1ofO5LLfc8uA6j4r6wMQCOS0wPE45QoRQ@mail.gmail.com>

On Wed, Apr 24, 2019 at 10:37:58AM -0500, Rob Herring wrote:
> On Wed, Apr 24, 2019 at 10:25 AM Tomeu Vizoso
> <tomeu.vizoso@collabora.com> wrote:
> >
> > I also needed to copy two headers from Mesa so we have the struct
> > definitions involved in a trivial clear job. These headers were
> > unchanged.
> >
> > Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
> > ---
> >  lib/igt_panfrost.c  |  244 +++++++
> >  lib/igt_panfrost.h  |   60 ++
> >  lib/meson.build     |    1 +
> >  lib/panfrost-job.h  | 1516 +++++++++++++++++++++++++++++++++++++++++++
> >  lib/panfrost-misc.h |   47 ++
> >  5 files changed, 1868 insertions(+)
> >  create mode 100644 lib/igt_panfrost.c
> >  create mode 100644 lib/igt_panfrost.h
> >  create mode 100644 lib/panfrost-job.h
> >  create mode 100644 lib/panfrost-misc.h
> >
> > diff --git a/lib/igt_panfrost.c b/lib/igt_panfrost.c
> > new file mode 100644
> > index 000000000000..df7ebc4f7c9b
> > --- /dev/null
> > +++ b/lib/igt_panfrost.c
> > @@ -0,0 +1,244 @@
> > +/*
> > + * Copyright © 2016 Broadcom
> > + * Copyright © 2019 Collabora, Ltd.
> > + *
> > + * 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_panfrost.h"
> > +#include "ioctl_wrappers.h"
> > +#include "intel_reg.h"
> > +#include "intel_chipset.h"
> > +#include "panfrost_drm.h"
> > +#include "panfrost-job.h"
> > +
> > +/**
> > + * SECTION:igt_panfrost
> > + * @short_description: PANFROST support library
> > + * @title: PANFROST
> > + * @include: igt.h
> > + *
> > + * This library provides various auxiliary helper functions for writing PANFROST
> > + * tests.
> > + */
> > +
> > +struct panfrost_bo *
> > +igt_panfrost_gem_new(int fd, size_t size)
> > +{
> 
> For the record, I really hate this pattern of propagating the ioctl
> differences and driver name in the api. It would be nice if the ioctl
> wrappers implemented a common api so at least simple tests like alloc
> and mmap buffers and prime import/export tests work just by
> implementing the wrappers. Otherwise, we're stuck with the 10 out of
> 6000 tests running. Not asking you to do that now though.

Is there really that much common tests for basic gem features that would
benefit from a common dumb gem allocator wrapper?

For kms we obviously need it, but for kms we already have the igt_fb
library (plus the option to fall back to dumb alloc as the least common
option).

But if there's really a good use for this I guess we could make a
simple_gem library happen in igt ... I wouldn't put it terribly high on
the wishlist though.
-Daniel

> However, we have these wrappers, but they aren't used by patch 5.
> 
> Rob
> _______________________________________________
> igt-dev mailing list
> igt-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

  reply	other threads:[~2019-04-25  7:41 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-24 15:25 [igt-dev] [PATCH i-g-t 0/5] Add tests for panfrost driver Tomeu Vizoso
2019-04-24 15:25 ` [igt-dev] [PATCH i-g-t 1/5] lib: Check for -ETIME, not ETIME Tomeu Vizoso
2019-04-24 15:25 ` [igt-dev] [PATCH i-g-t 2/5] drm-uapi: Add panfrost header Tomeu Vizoso
2019-04-24 15:25 ` [igt-dev] [PATCH i-g-t 3/5] lib/panfrost: Add panfrost helpers Tomeu Vizoso
2019-04-24 15:37   ` Rob Herring
2019-04-25  7:41     ` Daniel Vetter [this message]
2019-04-24 15:25 ` [igt-dev] [PATCH i-g-t 4/5] lib: Add support for opening panfrost devices Tomeu Vizoso
2019-04-25 10:03   ` Petri Latvala
2019-04-24 15:25 ` [igt-dev] [PATCH i-g-t 5/5] tests/panfrost: Add initial tests for panfrost Tomeu Vizoso
2019-04-24 16:12 ` [igt-dev] ✗ Fi.CI.BAT: failure for Add tests for panfrost driver Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190425074113.GD9857@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=robh@kernel.org \
    --cc=tomeu.vizoso@collabora.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox