mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sarah Walker <Sarah.Walker@imgtec.com>
To: "faith@gfxstrand.net" <faith@gfxstrand.net>
Cc: "tzimmermann@suse.de" <tzimmermann@suse.de>,
	"afd@ti.com" <afd@ti.com>, Matt Coster <Matt.Coster@imgtec.com>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	"matthew.brost@intel.com" <matthew.brost@intel.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"luben.tuikov@amd.com" <luben.tuikov@amd.com>,
	"boris.brezillon@collabora.com" <boris.brezillon@collabora.com>,
	"faith.ekstrand@collabora.com" <faith.ekstrand@collabora.com>,
	"dakr@redhat.com" <dakr@redhat.com>,
	"mripard@kernel.org" <mripard@kernel.org>,
	Donald Robson <Donald.Robson@imgtec.com>,
	"hns@goldelico.com" <hns@goldelico.com>,
	"christian.koenig@amd.com" <christian.koenig@amd.com>
Subject: Re: [EXTERNAL] Re: [PATCH v5 03/17] drm/imagination/uapi: Add PowerVR driver UAPI
Date: Fri, 18 Aug 2023 13:49:28 +0000	[thread overview]
Message-ID: <eef53f6b6ac4405cf26320390eef6c62aadacdda.camel@imgtec.com> (raw)
In-Reply-To: <CAOFGe94OtnfKY+ZWzWOGz8kjKQhihzSOrLKrB_M=JE-i4cEMVg@mail.gmail.com>

On Thu, 2023-08-17 at 19:43 -0500, Faith Ekstrand wrote:
> On Wed, Aug 16, 2023 at 3:26 AM Sarah Walker <sarah.walker@imgtec.com> wrote:
> > 
> > +/**
> > + * struct drm_pvr_dev_query_runtime_info - Container used to fetch information
> > + * about the graphics runtime.
> > + *
> > + * When fetching this type &struct drm_pvr_ioctl_dev_query_args.type must be set
> > + * to %DRM_PVR_DEV_QUERY_RUNTIME_INFO_GET.
> > + */
> > +struct drm_pvr_dev_query_runtime_info {
> > +       /**
> > +        * @free_list_min_pages: Minimum allowed free list size,
> > +        * in PM physical pages.
> > +        */
> > +       __u64 free_list_min_pages;
> > +
> > +       /**
> > +        * @free_list_max_pages: Maximum allowed free list size,
> > +        * in PM physical pages.
> > +        */
> > +       __u64 free_list_max_pages;
> > +
> > +       /**
> > +        * @common_store_alloc_region_size: Size of the Allocation
> > +        * Region within the Common Store used for coefficient and shared
> > +        * registers, in dwords.
> > +        */
> > +       __u32 common_store_alloc_region_size;
> 
> Any reason why this is in dwords?  It's not really my place to have an opinion but that seems like kind-of a funny unit for the size of an allocation region. Why not just bytes?

This is a holdover from the closed source driver. It can be changed to bytes if
that is particularly desired?

> +/**
> > + * struct drm_pvr_dev_query_quirks - Container used to fetch information about
> > + * hardware fixes for which the device may require support in the user mode
> > + * driver.
> > + *
> > + * When fetching this type &struct drm_pvr_ioctl_dev_query_args.type must be set
> > + * to %DRM_PVR_DEV_QUERY_QUIRKS_GET.
> > + */
> > +struct drm_pvr_dev_query_quirks {
> > +       /**
> > +        * @quirks: A userspace address for the hardware quirks __u32 array.
> > +        *
> > +        * The first @musthave_count items in the list are quirks that the
> > +        * client must support for this device. If userspace does not support
> > +        * all these quirks then functionality is not guaranteed and client
> > +        * initialisation must fail.
> > +        * The remaining quirks in the list affect userspace and the kernel or
> > +        * firmware. They are disabled by default and require userspace to
> > +        * opt-in. The opt-in mechanism depends on the quirk.
> > +        */
> > +       __u64 quirks;
> 
> Where are these quirk IDs defined and where do they come from? If they're effectively coming from hardware, possibly via firmware, that's probably okay.  The important thing is that quirks should only ever get removed for any given piece of hardware otherwise you risk breaking userspace.

Quirks are defined in the firmware header. The actual IDs are from our issue
tracking system; they're shared with the closed source driver. We are aware of
the need to not remove quirks for a given GPU.

> > +/**
> > + * struct drm_pvr_dev_query_enhancements - Container used to fetch information
> > + * about optional enhancements supported by the device that require support in
> > + * the user mode driver.
> > + *
> > + * When fetching this type &struct drm_pvr_ioctl_dev_query_args.type must be set
> > + * to %DRM_PVR_DEV_ENHANCEMENTS_GET.
> > + */
> > +struct drm_pvr_dev_query_enhancements {
> > +       /**
> > +        * @enhancements: A userspace address for the hardware enhancements
> > +        * __u32 array.
> > +        *
> > +        * These enhancements affect userspace and the kernel or firmware. They
> > +        * are disabled by default and require userspace to opt-in. The opt-in
> > +        * mechanism depends on the quirk.
> > +        */
> > +       __u64 enhancements;
> 
> Can you provide some examples of "enhancements"? Not that you need to put it in the docs. I'm just trying to understand what this API is doing so I can better review. Again, where do these come from? Also, how is an enhancement different from a quirk?

Enhancements are comparatively minor improvements in GPU subrevisions that don't
qualify as a full "product feature". A couple of examples would be 35421, which
improves compute thread barrier support, and 42064, which adds mask support for
the pixel backend. As with quirks, enhancements are defined in the firmware
header, with the IDs coming from our issue tracker.

Thanks,
Sarah


  parent reply	other threads:[~2023-08-18 13:50 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-16  8:25 [PATCH v5 00/17] Imagination Technologies PowerVR DRM driver Sarah Walker
2023-08-16  8:25 ` [PATCH v5 01/17] sizes.h: Add entries between 32G and 64T Sarah Walker
2023-08-16  8:25 ` [PATCH v5 02/17] dt-bindings: gpu: Add Imagination Technologies PowerVR GPU Sarah Walker
2023-08-18  9:36   ` Linus Walleij
2023-08-18 10:33     ` Krzysztof Kozlowski
2023-09-05 16:32     ` Frank Binns
2023-08-18 10:32   ` Krzysztof Kozlowski
2023-08-16  8:25 ` [PATCH v5 03/17] drm/imagination/uapi: Add PowerVR driver UAPI Sarah Walker
     [not found]   ` <CAOFGe94OtnfKY+ZWzWOGz8kjKQhihzSOrLKrB_M=JE-i4cEMVg@mail.gmail.com>
2023-08-18 13:49     ` Sarah Walker [this message]
2023-08-16  8:25 ` [PATCH v5 04/17] drm/imagination: Add skeleton PowerVR driver Sarah Walker
2023-08-16  8:25 ` [PATCH v5 05/17] drm/imagination: Get GPU resources Sarah Walker
2023-08-16  8:25 ` [PATCH v5 06/17] drm/imagination: Add GPU register and FWIF headers Sarah Walker
2023-08-16  8:25 ` [PATCH v5 07/17] drm/imagination: Add GPU ID parsing and firmware loading Sarah Walker
2023-08-16  8:25 ` [PATCH v5 08/17] drm/imagination: Add GEM and VM related code Sarah Walker
2023-08-17 22:42   ` Jann Horn
2023-08-18 14:19     ` [EXTERNAL] " Sarah Walker
2023-08-18 15:30   ` Danilo Krummrich
2023-08-21  8:30     ` [EXTERNAL] " Donald Robson
2023-08-21 11:05       ` Danilo Krummrich
2023-08-18 22:59   ` Jann Horn
2023-08-16  8:25 ` [PATCH v5 09/17] drm/imagination: Implement power management Sarah Walker
2023-08-16 10:56   ` Paul Cercueil
2023-09-05 16:34     ` Frank Binns
2023-08-16  8:25 ` [PATCH v5 10/17] drm/imagination: Implement firmware infrastructure and META FW support Sarah Walker
2023-08-16  8:25 ` [PATCH v5 11/17] drm/imagination: Implement MIPS firmware processor and MMU support Sarah Walker
2023-08-16  8:25 ` [PATCH v5 12/17] drm/imagination: Implement free list and HWRT create and destroy ioctls Sarah Walker
2023-08-16  8:25 ` [PATCH v5 13/17] drm/imagination: Implement context creation/destruction ioctls Sarah Walker
2023-08-17 22:42   ` Jann Horn
2023-08-18 11:00     ` [EXTERNAL] " Sarah Walker
2023-08-16  8:25 ` [PATCH v5 14/17] drm/imagination: Implement job submission and scheduling Sarah Walker
2023-08-17 22:42   ` Jann Horn
2023-08-16  8:25 ` [PATCH v5 15/17] drm/imagination: Add firmware trace to debugfs Sarah Walker
2023-08-16  8:25 ` [PATCH v5 16/17] drm/imagination: Add driver documentation Sarah Walker
2023-08-16  8:25 ` [PATCH v5 17/17] arm64: dts: ti: k3-am62-main: Add GPU device node [DO NOT MERGE] Sarah Walker
2023-08-18 10:34   ` Krzysztof Kozlowski
2023-08-23 22:31 ` [PATCH v5 00/17] Imagination Technologies PowerVR DRM driver Masahiro Yamada
2023-08-24  8:08   ` Sarah Walker
2023-08-24  8:14     ` Sarah Walker

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=eef53f6b6ac4405cf26320390eef6c62aadacdda.camel@imgtec.com \
    --to=sarah.walker@imgtec.com \
    --cc=Donald.Robson@imgtec.com \
    --cc=Matt.Coster@imgtec.com \
    --cc=afd@ti.com \
    --cc=boris.brezillon@collabora.com \
    --cc=christian.koenig@amd.com \
    --cc=dakr@redhat.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=faith.ekstrand@collabora.com \
    --cc=faith@gfxstrand.net \
    --cc=hns@goldelico.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luben.tuikov@amd.com \
    --cc=matthew.brost@intel.com \
    --cc=mripard@kernel.org \
    --cc=tzimmermann@suse.de \
    /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

all inboxes | Powered by JetHome®