All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thierry Reding <thierry.reding@gmail.com>
To: Mikko Perttunen <cyndis@kapsi.fi>
Cc: "Michał Mirosław" <mirq-linux@rere.qmqm.pl>,
	"Dmitry Osipenko" <digetx@gmail.com>,
	dri-devel@lists.freedesktop.org, linux-tegra@vger.kernel.org
Subject: Re: [PATCH libdrm v2 20/25] tests: tegra: Add VIC 4.0 support
Date: Wed, 23 Feb 2022 15:58:04 +0100	[thread overview]
Message-ID: <YhZLfDL0TO7W8mAi@orome> (raw)
In-Reply-To: <YhZIqTCn/NmR7KAF@orome>

[-- Attachment #1: Type: text/plain, Size: 5078 bytes --]

On Wed, Feb 23, 2022 at 03:46:01PM +0100, Thierry Reding wrote:
> On Fri, Feb 18, 2022 at 11:29:34AM +0200, Mikko Perttunen wrote:
> > On 2/17/22 21:19, Thierry Reding wrote:
> > > From: Thierry Reding <treding@nvidia.com>
> > > 
> > > The Video Image Composer (VIC) 4.0 can be found on NVIDIA Tegra210 SoCs.
> > > It uses a different class (B0B6) that is slightly incompatible with the
> > > class found on earlier generations.
> > > 
> > > Signed-off-by: Thierry Reding <treding@nvidia.com>
> > > ---
> > >   tests/tegra/meson.build |   2 +
> > >   tests/tegra/vic.c       |   7 +
> > >   tests/tegra/vic40.c     | 370 ++++++++++++++++++++++++++++++++++++++++
> > >   tests/tegra/vic40.h     | 285 +++++++++++++++++++++++++++++++
> > >   4 files changed, 664 insertions(+)
> > >   create mode 100644 tests/tegra/vic40.c
> > >   create mode 100644 tests/tegra/vic40.h
> > > 
> > > diff --git a/tests/tegra/meson.build b/tests/tegra/meson.build
> > > index 1ee29d0afe1b..e9c2bc875a01 100644
> > > --- a/tests/tegra/meson.build
> > > +++ b/tests/tegra/meson.build
> > > @@ -36,6 +36,8 @@ libdrm_test_tegra = static_library(
> > >       'vic.h',
> > >       'vic30.c',
> > >       'vic30.h',
> > > +    'vic40.c',
> > > +    'vic40.h',
> > >     ), config_file ],
> > >     include_directories : [inc_root, inc_drm, inc_tegra],
> > >     link_with : libdrm,
> > > diff --git a/tests/tegra/vic.c b/tests/tegra/vic.c
> > > index f24961ac5c6d..e0a97c059eca 100644
> > > --- a/tests/tegra/vic.c
> > > +++ b/tests/tegra/vic.c
> > > @@ -134,6 +134,10 @@ void vic_image_dump(struct vic_image *image, FILE *fp)
> > >   int vic30_new(struct drm_tegra *drm, struct drm_tegra_channel *channel,
> > >                 struct vic **vicp);
> > > +/* from vic40.c */
> > > +int vic40_new(struct drm_tegra *drm, struct drm_tegra_channel *channel,
> > > +              struct vic **vicp);
> > > +
> > >   int vic_new(struct drm_tegra *drm, struct drm_tegra_channel *channel,
> > >               struct vic **vicp)
> > >   {
> > > @@ -144,6 +148,9 @@ int vic_new(struct drm_tegra *drm, struct drm_tegra_channel *channel,
> > >       switch (version) {
> > >       case 0x40:
> > >           return vic30_new(drm, channel, vicp);
> > > +
> > > +    case 0x21:
> > > +        return vic40_new(drm, channel, vicp);
> > >       }
> > >       return -ENOTSUP;
> > > diff --git a/tests/tegra/vic40.c b/tests/tegra/vic40.c
> > > new file mode 100644
> > > index 000000000000..1a5d2af6b0b6
> > > --- /dev/null
> > > +++ b/tests/tegra/vic40.c
> > > @@ -0,0 +1,370 @@
> > > +/*
> > > + * Copyright © 2018 NVIDIA Corporation
> > > + *
> > > + * 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 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 <errno.h>
> > > +#include <string.h>
> > > +
> > > +#include "private.h"
> > > +#include "tegra.h"
> > > +#include "vic.h"
> > > +#include "vic40.h"
> > > +
> > > +struct vic40 {
> > > +    struct vic base;
> > > +
> > > +    struct {
> > > +        struct drm_tegra_mapping *map;
> > > +        struct drm_tegra_bo *bo;
> > > +    } config;
> > > +
> > > +    struct {
> > > +        struct drm_tegra_mapping *map;
> > > +        struct drm_tegra_bo *bo;
> > > +    } filter;
> > > +
> > > +    struct {
> > > +        struct drm_tegra_mapping *map;
> > > +        struct drm_tegra_bo *bo;
> > > +    } hist;
> > > +};
> > 
> > Histogram buffer not necessary at least on VIC4.0 and later. (Same applies
> > to VIC4.1 and VIC4.2 patches).
> 
> I'm pretty sure that I saw SMMU faults without this on all of Tegra210,
> Tegra186 and Tegra194. I'll go and test this once more.

Nevermind, I see now that this buffer isn't used at all on VIC 4.0, 4.1
and 4.2. I misread your comment as this buffer not needing to be
supplied in the command streams.

Removed all code related to that from the newer versions of VIC.

Thierry

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: Thierry Reding <thierry.reding@gmail.com>
To: Mikko Perttunen <cyndis@kapsi.fi>
Cc: linux-tegra@vger.kernel.org, "Dmitry Osipenko" <digetx@gmail.com>,
	dri-devel@lists.freedesktop.org,
	"Michał Mirosław" <mirq-linux@rere.qmqm.pl>
Subject: Re: [PATCH libdrm v2 20/25] tests: tegra: Add VIC 4.0 support
Date: Wed, 23 Feb 2022 15:58:04 +0100	[thread overview]
Message-ID: <YhZLfDL0TO7W8mAi@orome> (raw)
In-Reply-To: <YhZIqTCn/NmR7KAF@orome>

[-- Attachment #1: Type: text/plain, Size: 5078 bytes --]

On Wed, Feb 23, 2022 at 03:46:01PM +0100, Thierry Reding wrote:
> On Fri, Feb 18, 2022 at 11:29:34AM +0200, Mikko Perttunen wrote:
> > On 2/17/22 21:19, Thierry Reding wrote:
> > > From: Thierry Reding <treding@nvidia.com>
> > > 
> > > The Video Image Composer (VIC) 4.0 can be found on NVIDIA Tegra210 SoCs.
> > > It uses a different class (B0B6) that is slightly incompatible with the
> > > class found on earlier generations.
> > > 
> > > Signed-off-by: Thierry Reding <treding@nvidia.com>
> > > ---
> > >   tests/tegra/meson.build |   2 +
> > >   tests/tegra/vic.c       |   7 +
> > >   tests/tegra/vic40.c     | 370 ++++++++++++++++++++++++++++++++++++++++
> > >   tests/tegra/vic40.h     | 285 +++++++++++++++++++++++++++++++
> > >   4 files changed, 664 insertions(+)
> > >   create mode 100644 tests/tegra/vic40.c
> > >   create mode 100644 tests/tegra/vic40.h
> > > 
> > > diff --git a/tests/tegra/meson.build b/tests/tegra/meson.build
> > > index 1ee29d0afe1b..e9c2bc875a01 100644
> > > --- a/tests/tegra/meson.build
> > > +++ b/tests/tegra/meson.build
> > > @@ -36,6 +36,8 @@ libdrm_test_tegra = static_library(
> > >       'vic.h',
> > >       'vic30.c',
> > >       'vic30.h',
> > > +    'vic40.c',
> > > +    'vic40.h',
> > >     ), config_file ],
> > >     include_directories : [inc_root, inc_drm, inc_tegra],
> > >     link_with : libdrm,
> > > diff --git a/tests/tegra/vic.c b/tests/tegra/vic.c
> > > index f24961ac5c6d..e0a97c059eca 100644
> > > --- a/tests/tegra/vic.c
> > > +++ b/tests/tegra/vic.c
> > > @@ -134,6 +134,10 @@ void vic_image_dump(struct vic_image *image, FILE *fp)
> > >   int vic30_new(struct drm_tegra *drm, struct drm_tegra_channel *channel,
> > >                 struct vic **vicp);
> > > +/* from vic40.c */
> > > +int vic40_new(struct drm_tegra *drm, struct drm_tegra_channel *channel,
> > > +              struct vic **vicp);
> > > +
> > >   int vic_new(struct drm_tegra *drm, struct drm_tegra_channel *channel,
> > >               struct vic **vicp)
> > >   {
> > > @@ -144,6 +148,9 @@ int vic_new(struct drm_tegra *drm, struct drm_tegra_channel *channel,
> > >       switch (version) {
> > >       case 0x40:
> > >           return vic30_new(drm, channel, vicp);
> > > +
> > > +    case 0x21:
> > > +        return vic40_new(drm, channel, vicp);
> > >       }
> > >       return -ENOTSUP;
> > > diff --git a/tests/tegra/vic40.c b/tests/tegra/vic40.c
> > > new file mode 100644
> > > index 000000000000..1a5d2af6b0b6
> > > --- /dev/null
> > > +++ b/tests/tegra/vic40.c
> > > @@ -0,0 +1,370 @@
> > > +/*
> > > + * Copyright © 2018 NVIDIA Corporation
> > > + *
> > > + * 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 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 <errno.h>
> > > +#include <string.h>
> > > +
> > > +#include "private.h"
> > > +#include "tegra.h"
> > > +#include "vic.h"
> > > +#include "vic40.h"
> > > +
> > > +struct vic40 {
> > > +    struct vic base;
> > > +
> > > +    struct {
> > > +        struct drm_tegra_mapping *map;
> > > +        struct drm_tegra_bo *bo;
> > > +    } config;
> > > +
> > > +    struct {
> > > +        struct drm_tegra_mapping *map;
> > > +        struct drm_tegra_bo *bo;
> > > +    } filter;
> > > +
> > > +    struct {
> > > +        struct drm_tegra_mapping *map;
> > > +        struct drm_tegra_bo *bo;
> > > +    } hist;
> > > +};
> > 
> > Histogram buffer not necessary at least on VIC4.0 and later. (Same applies
> > to VIC4.1 and VIC4.2 patches).
> 
> I'm pretty sure that I saw SMMU faults without this on all of Tegra210,
> Tegra186 and Tegra194. I'll go and test this once more.

Nevermind, I see now that this buffer isn't used at all on VIC 4.0, 4.1
and 4.2. I misread your comment as this buffer not needing to be
supplied in the command streams.

Removed all code related to that from the newer versions of VIC.

Thierry

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2022-02-23 14:58 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-17 19:19 [PATCH libdrm v2 06/25] tegra: Add PRIME support helpers Thierry Reding
2022-02-17 19:19 ` Thierry Reding
2022-02-17 19:19 ` [PATCH libdrm v2 07/25] tegra: Make API more consistent Thierry Reding
2022-02-17 19:19   ` Thierry Reding
2022-02-24 17:07   ` Dmitry Osipenko
2022-02-24 17:07     ` Dmitry Osipenko
2022-02-17 19:19 ` [PATCH libdrm v2 08/25] tegra: Install tegra-openclose test Thierry Reding
2022-02-17 19:19   ` Thierry Reding
2022-02-17 19:19 ` [PATCH libdrm v2 09/25] tegra: Update for new UABI Thierry Reding
2022-02-17 19:19   ` Thierry Reding
2022-02-17 19:19 ` [PATCH libdrm v2 10/25] tegra: Include private.h in list of source files Thierry Reding
2022-02-17 19:19   ` Thierry Reding
2022-02-17 19:19 ` [PATCH libdrm v2 11/25] tegra: Add channel APIs Thierry Reding
2022-02-17 19:19   ` Thierry Reding
2022-02-17 19:19 ` [PATCH libdrm v2 12/25] tegra: Add job and push buffer APIs Thierry Reding
2022-02-17 19:19   ` Thierry Reding
2022-02-17 19:19 ` [PATCH libdrm v2 13/25] tegra: Add syncpoint APIs Thierry Reding
2022-02-17 19:19   ` Thierry Reding
2022-02-17 19:19 ` [PATCH libdrm v2 14/25] tests: tegra: Add helper library for tests Thierry Reding
2022-02-17 19:19   ` Thierry Reding
2022-02-17 19:19 ` [PATCH libdrm v2 15/25] tests: tegra: Add gr2d-fill test Thierry Reding
2022-02-17 19:19   ` Thierry Reding
2022-02-17 19:19 ` [PATCH libdrm v2 16/25] tests: tegra: Add syncpt-wait test Thierry Reding
2022-02-17 19:19   ` Thierry Reding
2022-02-17 19:19 ` [PATCH libdrm v2 17/25] tests: tegra: Add syncpoint timeout test Thierry Reding
2022-02-17 19:19   ` Thierry Reding
2022-02-17 19:19 ` [PATCH libdrm v2 18/25] tests: tegra: Add VIC support Thierry Reding
2022-02-17 19:19   ` Thierry Reding
2022-02-17 19:19 ` [PATCH libdrm v2 19/25] tests: tegra: Add VIC 3.0 support Thierry Reding
2022-02-17 19:19   ` Thierry Reding
2022-02-17 19:19 ` [PATCH libdrm v2 20/25] tests: tegra: Add VIC 4.0 support Thierry Reding
2022-02-17 19:19   ` Thierry Reding
2022-02-18  9:29   ` Mikko Perttunen
2022-02-18  9:29     ` Mikko Perttunen
2022-02-23 14:46     ` Thierry Reding
2022-02-23 14:46       ` Thierry Reding
2022-02-23 14:58       ` Thierry Reding [this message]
2022-02-23 14:58         ` Thierry Reding
2022-02-17 19:19 ` [PATCH libdrm v2 21/25] tests: tegra: Add VIC 4.1 support Thierry Reding
2022-02-17 19:19   ` Thierry Reding
2022-02-17 19:19 ` [PATCH libdrm v2 22/25] tests: tegra: Add VIC 4.2 support Thierry Reding
2022-02-17 19:19   ` Thierry Reding
2022-02-17 19:19 ` [PATCH libdrm v2 23/25] tests: tegra: Add VIC clear test Thierry Reding
2022-02-17 19:19   ` Thierry Reding
2022-02-17 19:19 ` [PATCH libdrm v2 24/25] tests: tegra: Add VIC blit test Thierry Reding
2022-02-17 19:19   ` Thierry Reding
2022-02-17 19:19 ` [PATCH libdrm v2 25/25] tests: tegra: Add VIC flip test Thierry Reding
2022-02-17 19:19   ` Thierry Reding

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=YhZLfDL0TO7W8mAi@orome \
    --to=thierry.reding@gmail.com \
    --cc=cyndis@kapsi.fi \
    --cc=digetx@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=mirq-linux@rere.qmqm.pl \
    /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 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.