All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
To: Jeffrey Hugo <quic_jhugo@quicinc.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>,
	Oded Gabbay <ogabbay@kernel.org>,
	Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>,
	dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 4/6] accel/ivpu: Add param ioctl to identify capabilities
Date: Thu, 3 Aug 2023 10:37:37 +0200	[thread overview]
Message-ID: <20230803083737.GA3023441@linux.intel.com> (raw)
In-Reply-To: <4d8e7269-f6d4-4d1a-8af3-70718adc0647@quicinc.com>

Hi

On Wed, Aug 02, 2023 at 11:07:09AM -0600, Jeffrey Hugo wrote:
> On 7/31/2023 10:12 AM, Stanislaw Gruszka wrote:
> > Add DRM_IVPU_PARAM_CAPABILITIES ioctl to query driver capabilities.
> > For now use it for identify metric streamer and new dma memory range
> > features. Currently upstream version of intel_vpu does not have those,
> > they will be added it the future.
> 
> Hmm.  So I happened to remember this from Oded in the reviews for the first
> iVPU series -
> 
> "btw, I talked to Daniel about this and he told me this
> major/minor/patchlevel is legacy in drm and should be deprecated, so
> I'm going to send a patch to document that it is deprecated and how to
> use getcap ioctl to find out the features the driver support."
> 
> So, I went to look at DRM_IOCTL_GET_CAP and it feels like something you
> should be using as it fits the purpose I see in this patch, but also I don't
> see how given that it doesn't hook to the driver.

Indeed it does not have such extension. I considered DRM_IOCTL_GET_CAP, but
did not use it because of that. Seems that DRM drivers that need provide
set of capabilities just create own "getcap" ioctl.

> I suspect at some point, QAIC would have its own need for a "getcap" API.
> Feels like something we should have a common entry in uAPI for
> (ACCEL_IOCTL_GET_CAP ? ), but I don't yet see that we'll have a lot a
> commonality of the capabilities across Accel drivers.  I don't think the DRM
> method of globally defined caps is useful for Accel.
> 
> Does it make sense to have a framework level ioctl, but something that calls
> into the drivers and would allow the drivers to advertise custom
> capabilities?

Perhaps such thing would make sense, resembles to me ethtool for network
devices. But not sure, maybe just having separate ioctls per driver and one
common for common features is simpler.

> Seems like we might want to decide this now, because if we define a iVPU
> specific ioctl as proposed here, but then switch to an Accel-wide mechanism
> later, iVPU is going to be stuck supporting both.

For the record, we do not add new ioctl in this patch, we just extend
existing DRM_IOCTL_IVPU_GET_PARAM one.

> What do you think?

My understating was that this is more like design patter, i.e. drivers
that have to advertise supported features should not use minor/major
numbers but "getcap" ioctl. And that not necessary mean we should have
common ioctl for that for all ACCEL/DRM drivers.

Regards
Stanislaw

  reply	other threads:[~2023-08-03  8:38 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-31 16:12 [PATCH 0/6] accel/ivpu: Refactor driver code and support new hardware Stanislaw Gruszka
2023-07-31 16:12 ` [PATCH 1/6] accel/ivpu: Rename sources to use generation based names Stanislaw Gruszka
2023-08-02 16:40   ` Jeffrey Hugo
2023-07-31 16:12 ` [PATCH 2/6] accel/ivpu: Use generation based function and registers names Stanislaw Gruszka
2023-08-02 16:43   ` Jeffrey Hugo
2023-07-31 16:12 ` [PATCH 3/6] accel/ivpu: Switch to generation based FW names Stanislaw Gruszka
2023-08-02 16:47   ` Jeffrey Hugo
2023-07-31 16:12 ` [PATCH 4/6] accel/ivpu: Add param ioctl to identify capabilities Stanislaw Gruszka
2023-08-02 17:07   ` Jeffrey Hugo
2023-08-03  8:37     ` Stanislaw Gruszka [this message]
2023-08-08  8:52       ` Stanislaw Gruszka
2023-08-09  0:45         ` Jeffrey Hugo
2023-08-09 11:24           ` Stanislaw Gruszka
2023-08-09 14:02             ` Jeffrey Hugo
2023-07-31 16:12 ` [PATCH 5/6] accel/ivpu: Refactor memory ranges logic Stanislaw Gruszka
2023-07-31 16:12 ` [PATCH 6/6] accel/ivpu: Add initial support for VPU 4 Stanislaw Gruszka

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=20230803083737.GA3023441@linux.intel.com \
    --to=stanislaw.gruszka@linux.intel.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jacek.lawrynowicz@linux.intel.com \
    --cc=ogabbay@kernel.org \
    --cc=quic_jhugo@quicinc.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 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.