All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zhi Wang <zhiw@nvidia.com>
To: Ben Skeggs <bskeggs@nvidia.com>
Cc: <nouveau@lists.freedesktop.org>, <zhiwang@kernel.org>
Subject: Re: [PATCH v3 20/37] drm/nouveau/nvif: remove client version
Date: Wed, 31 Jul 2024 20:08:46 +0300	[thread overview]
Message-ID: <20240731200846.000008ce.zhiw@nvidia.com> (raw)
In-Reply-To: <20240726043828.58966-21-bskeggs@nvidia.com>

On Fri, 26 Jul 2024 14:38:11 +1000
Ben Skeggs <bskeggs@nvidia.com> wrote:

Reviewed-by: Zhi Wang <zhiw@nvidia.com>

The patch LGTM. What was the original purpose of having this version?

> This is not, and has never, been used for anything.  Remove it.
> 
> Signed-off-by: Ben Skeggs <bskeggs@nvidia.com>
> ---
>  drivers/gpu/drm/nouveau/include/nvif/client.h |  2 --
>  drivers/gpu/drm/nouveau/include/nvif/ioctl.h  |  7 -------
>  drivers/gpu/drm/nouveau/nvif/client.c         | 20
> +------------------ drivers/gpu/drm/nouveau/nvkm/core/ioctl.c     |
> 13 +----------- 4 files changed, 2 insertions(+), 40 deletions(-)
> 
> diff --git a/drivers/gpu/drm/nouveau/include/nvif/client.h
> b/drivers/gpu/drm/nouveau/include/nvif/client.h index
> 2c8e9bec3f79..03f1d564eb12 100644 ---
> a/drivers/gpu/drm/nouveau/include/nvif/client.h +++
> b/drivers/gpu/drm/nouveau/include/nvif/client.h @@ -7,12 +7,10 @@
>  struct nvif_client {
>  	struct nvif_object object;
>  	const struct nvif_driver *driver;
> -	u64 version;
>  };
>  
>  int  nvif_client_ctor(struct nvif_client *parent, const char *name,
> struct nvif_client *); void nvif_client_dtor(struct nvif_client *);
> -int  nvif_client_ioctl(struct nvif_client *, void *, u32);
>  int  nvif_client_suspend(struct nvif_client *);
>  int  nvif_client_resume(struct nvif_client *);
>  
> diff --git a/drivers/gpu/drm/nouveau/include/nvif/ioctl.h
> b/drivers/gpu/drm/nouveau/include/nvif/ioctl.h index
> 4e047bb1fc07..1e74245621e0 100644 ---
> a/drivers/gpu/drm/nouveau/include/nvif/ioctl.h +++
> b/drivers/gpu/drm/nouveau/include/nvif/ioctl.h @@ -2,11 +2,8 @@
>  #ifndef __NVIF_IOCTL_H__
>  #define __NVIF_IOCTL_H__
>  
> -#define NVIF_VERSION_LATEST
> 0x0000000000000100ULL -
>  struct nvif_ioctl_v0 {
>  	__u8  version;
> -#define NVIF_IOCTL_V0_NOP
>       0x00 #define NVIF_IOCTL_V0_SCLASS
>                 0x01 #define NVIF_IOCTL_V0_NEW
>                           0x02 #define NVIF_IOCTL_V0_DEL
>                                     0x03 @@ -28,10 +25,6 @@ struct
> nvif_ioctl_v0 { __u8  data[];		/* ioctl data (below) */
>  };
>  
> -struct nvif_ioctl_nop_v0 {
> -	__u64 version;
> -};
> -
>  struct nvif_ioctl_sclass_v0 {
>  	/* nvif_ioctl ... */
>  	__u8  version;
> diff --git a/drivers/gpu/drm/nouveau/nvif/client.c
> b/drivers/gpu/drm/nouveau/nvif/client.c index
> bbfc80fcff43..fdf5054ed7d8 100644 ---
> a/drivers/gpu/drm/nouveau/nvif/client.c +++
> b/drivers/gpu/drm/nouveau/nvif/client.c @@ -29,12 +29,6 @@
>  #include <nvif/class.h>
>  #include <nvif/if0000.h>
>  
> -int
> -nvif_client_ioctl(struct nvif_client *client, void *data, u32 size)
> -{
> -	return client->driver->ioctl(client->object.priv, data,
> size, NULL); -}
> -
>  int
>  nvif_client_suspend(struct nvif_client *client)
>  {
> @@ -58,10 +52,6 @@ int
>  nvif_client_ctor(struct nvif_client *parent, const char *name,
> struct nvif_client *client) {
>  	struct nvif_client_v0 args = {};
> -	struct {
> -		struct nvif_ioctl_v0 ioctl;
> -		struct nvif_ioctl_nop_v0 nop;
> -	} nop = {};
>  	int ret;
>  
>  	strscpy_pad(args.name, name, sizeof(args.name));
> @@ -75,13 +65,5 @@ nvif_client_ctor(struct nvif_client *parent, const
> char *name, struct nvif_clien client->object.client = client;
>  	client->object.handle = ~0;
>  	client->driver = parent->driver;
> -
> -	if (ret == 0) {
> -		ret = nvif_client_ioctl(client, &nop, sizeof(nop));
> -		client->version = nop.nop.version;
> -	}
> -
> -	if (ret)
> -		nvif_client_dtor(client);
> -	return ret;
> +	return 0;
>  }
> diff --git a/drivers/gpu/drm/nouveau/nvkm/core/ioctl.c
> b/drivers/gpu/drm/nouveau/nvkm/core/ioctl.c index
> 39d5c9700867..584fc43c0d75 100644 ---
> a/drivers/gpu/drm/nouveau/nvkm/core/ioctl.c +++
> b/drivers/gpu/drm/nouveau/nvkm/core/ioctl.c @@ -33,18 +33,7 @@ static
> int nvkm_ioctl_nop(struct nvkm_client *client,
>  	       struct nvkm_object *object, void *data, u32 size)
>  {
> -	union {
> -		struct nvif_ioctl_nop_v0 v0;
> -	} *args = data;
> -	int ret = -ENOSYS;
> -
> -	nvif_ioctl(object, "nop size %d\n", size);
> -	if (!(ret = nvif_unpack(ret, &data, &size, args->v0, 0, 0,
> false))) {
> -		nvif_ioctl(object, "nop vers %lld\n",
> args->v0.version);
> -		args->v0.version = NVIF_VERSION_LATEST;
> -	}
> -
> -	return ret;
> +	return -ENOSYS;
>  }
>  
>  #include <nvif/class.h>


  reply	other threads:[~2024-09-29 21:29 UTC|newest]

Thread overview: 70+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-26  4:37 [PATCH v3 00/37] drm/nouveau: misc. cleanups and removal of unused apis Ben Skeggs
2024-07-26  4:37 ` [PATCH v3 01/37] drm/nouveau: move nouveau_drm_device_fini() above init() Ben Skeggs
2024-07-31 10:10   ` Zhi Wang
2024-07-26  4:37 ` [PATCH v3 02/37] drm/nouveau: handle pci/tegra drm_dev_{alloc, register} from common code Ben Skeggs
2024-07-31 10:08   ` Zhi Wang
2024-07-31 10:09   ` Zhi Wang
2024-07-26  4:37 ` [PATCH v3 03/37] drm/nouveau: replace drm_device* with nouveau_drm* as dev drvdata Ben Skeggs
2024-07-31 10:13   ` Zhi Wang
2024-07-26  4:37 ` [PATCH v3 04/37] drm/nouveau: create pci device once Ben Skeggs
2024-07-31 10:20   ` Zhi Wang
2024-07-26  4:37 ` [PATCH v3 05/37] drm/nouveau: store nvkm_device pointer in nouveau_drm Ben Skeggs
2024-07-31 10:33   ` Zhi Wang
2024-07-26  4:37 ` [PATCH v3 06/37] drm/nouveau: move allocation of root client out of nouveau_cli_init() Ben Skeggs
2024-07-31 16:53   ` Zhi Wang
2024-07-26  4:37 ` [PATCH v3 07/37] drm/nouveau: add nouveau_cli to nouveau_abi16 Ben Skeggs
2024-07-31 11:05   ` Zhi Wang
2024-07-26  4:37 ` [PATCH v3 08/37] drm/nouveau: handle limited nvif ioctl in abi16 Ben Skeggs
2024-07-26  4:38 ` [PATCH v3 09/37] drm/nouveau: remove abi16->device Ben Skeggs
2024-07-31 11:19   ` Zhi Wang
2024-07-26  4:38 ` [PATCH v3 10/37] drm/nouveau: remove abi16->handles Ben Skeggs
2024-07-31 11:20   ` Zhi Wang
2024-07-26  4:38 ` [PATCH v3 11/37] drm/nouveau/nvkm: remove detect/mmio/subdev_mask from device args Ben Skeggs
2024-07-31 11:25   ` Zhi Wang
2024-07-26  4:38 ` [PATCH v3 12/37] drm/nouveau/nvkm: remove perfmon Ben Skeggs
2024-07-26  4:38 ` [PATCH v3 13/37] drm/nouveau/nvkm: remove nvkm_client_search() Ben Skeggs
2024-07-31 11:27   ` Zhi Wang
2024-07-26  4:38 ` [PATCH v3 14/37] drm/nouveau/nvif: remove support for userspace backends Ben Skeggs
2024-07-26  4:38 ` [PATCH v3 15/37] drm/nouveau/nvif: remove route/token Ben Skeggs
2024-07-26  4:38 ` [PATCH v3 16/37] drm/nouveau/nvif: remove nvxx_object() Ben Skeggs
2024-07-31 11:42   ` Zhi Wang
2024-07-26  4:38 ` [PATCH v3 17/37] drm/nouveau/nvif: remove nvxx_client() Ben Skeggs
2024-07-31 11:43   ` Zhi Wang
2024-07-26  4:38 ` [PATCH v3 18/37] drm/nouveau/nvif: remove driver keep/fini Ben Skeggs
2024-07-31 17:04   ` Zhi Wang
2024-07-26  4:38 ` [PATCH v3 19/37] drm/nouveau/nvif: remove client device arg Ben Skeggs
2024-07-26  4:38 ` [PATCH v3 20/37] drm/nouveau/nvif: remove client version Ben Skeggs
2024-07-31 17:08   ` Zhi Wang [this message]
2024-07-26  4:38 ` [PATCH v3 21/37] drm/nouveau/nvif: remove client devlist Ben Skeggs
2024-07-26  4:38 ` [PATCH v3 22/37] drm/nouveau/nvif: remove client fini Ben Skeggs
2024-07-31 11:49   ` Zhi Wang
2024-07-26  4:38 ` [PATCH v3 23/37] drm/nouveau/nvif: remove device args Ben Skeggs
2024-07-26  4:38 ` [PATCH v3 24/37] drm/nouveau: always map device Ben Skeggs
2024-07-31 17:21   ` Zhi Wang
2024-07-26  4:38 ` [PATCH v3 25/37] drm/nouveau/nvif: remove device rd/wr Ben Skeggs
2024-07-31 17:38   ` Zhi Wang
2024-07-26  4:38 ` [PATCH v3 26/37] drm/nouveau/nvif: remove disp chan rd/wr Ben Skeggs
2024-07-26  4:38 ` [PATCH v3 27/37] drm/nouveau: move nvxx_* definitions to nouveau_drv.h Ben Skeggs
2024-07-31 17:46   ` Zhi Wang
2024-07-26  4:38 ` [PATCH v3 28/37] drm/nouveau: add nvif_mmu to nouveau_drm Ben Skeggs
2024-07-31 17:55   ` Zhi Wang
2024-07-26  4:38 ` [PATCH v3 29/37] drm/nouveau: pass drm to nouveau_mem_new(), instead of cli Ben Skeggs
2024-07-31 17:58   ` Zhi Wang
2024-07-26  4:38 ` [PATCH v3 30/37] drm/nouveau: pass drm to nv50_dmac_create(), rather than device+disp Ben Skeggs
2024-07-31 18:00   ` Zhi Wang
2024-07-26  4:38 ` [PATCH v3 31/37] drm/nouveau: pass cli to nouveau_channel_new() instead of drm+device Ben Skeggs
2024-07-31 18:06   ` Zhi Wang
2024-07-26  4:38 ` [PATCH v3 32/37] drm/nouveau: remove nouveau_chan.device Ben Skeggs
2024-07-31 18:08   ` Zhi Wang
2024-07-26  4:38 ` [PATCH v3 33/37] drm/nouveau: remove chan->drm Ben Skeggs
2024-07-31 18:13   ` Zhi Wang
2024-07-26  4:38 ` [PATCH v3 34/37] drm/nouveau: remove master Ben Skeggs
2024-07-31 18:16   ` Zhi Wang
2024-07-26  4:38 ` [PATCH v3 35/37] drm/nouveau: remove push pointer from nouveau_channel Ben Skeggs
2024-07-31 18:21   ` Zhi Wang
2024-07-26  4:38 ` [PATCH v3 36/37] drm/nouveau/kms: remove a few unused struct members and fn decls Ben Skeggs
2024-07-31 18:23   ` Zhi Wang
2024-07-26  4:38 ` [PATCH v3 37/37] drm/nouveau/kms: remove push pointer from nv50_dmac Ben Skeggs
2024-07-31 18:24   ` Zhi Wang
2024-07-27  1:58 ` [PATCH v3 00/37] drm/nouveau: misc. cleanups and removal of unused apis Danilo Krummrich
2024-07-31 18:33 ` Zhi Wang

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=20240731200846.000008ce.zhiw@nvidia.com \
    --to=zhiw@nvidia.com \
    --cc=bskeggs@nvidia.com \
    --cc=nouveau@lists.freedesktop.org \
    --cc=zhiwang@kernel.org \
    /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.