Re: [PATCH v2 00/37] drm/nouveau: misc. cleanups and removal of unused apis

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]<

 



Hi Ben,

On Fri, Jul 05, 2024 at 04:36:44AM +1000, Ben Skeggs wrote:
> This series is a smaller subset of the prior series I posted, that aimed
> to remove the ioctl layer between NVKM and the nouveau DRM driver.
> 
> Whilst this series doesn't go the full way, it aims to remove a bunch of
> internal APIs that aren't useful anymore so they don't have to be ported,
> and to cleanup a few paths in the DRM driver that have suffered from bit-
> rot over the years to ensure it's safe to remove the ioctl layer next.
> 
> There's more details of the specific changes in the relevant commits.
> 
> A git tree is available at [1], and the remaining commits that were in
> the prior series, but not this one, are available at [2].
> 
> v2:
> - prepended a couple of patches that begin to cleanup pci vs tegra
>   paths, addressing some comments about variable naming, more in a
>   future series
> - rebased on current drm-misc-next
> - other changes mentioned in their relevant commits
> 
> [1] https://gitlab.freedesktop.org/bskeggs/nouveau/-/tree/00.00-cleanup
> [2] https://gitlab.freedesktop.org/bskeggs/nouveau/-/tree/00.01-remove-ioctl

Thanks for the follow-up.

There are quite some checkpatch errors and warnings. It looks like most of them
originate from moving around existing code.

Did you check if you introduce new ones? Also, it's probably fine to fix
existing ones when changing things up (where appropriate).

> 
> Ben Skeggs (37):
>   drm/nouveau: move nouveau_drm_device_fini() above init()
>   drm/nouveau: handle pci/tegra drm_dev_{alloc,register} from common
>     code
>   drm/nouveau: replace drm_device* with nouveau_drm* as dev drvdata
>   drm/nouveau: create pci device once
>   drm/nouveau: store nvkm_device pointer in nouveau_drm
>   drm/nouveau: move allocation of root client out of nouveau_cli_init()
>   drm/nouveau: add nouveau_cli to nouveau_abi16
>   drm/nouveau: handle limited nvif ioctl in abi16
>   drm/nouveau: remove abi16->device
>   drm/nouveau: remove abi16->handles
>   drm/nouveau/nvkm: remove detect/mmio/subdev_mask from device args
>   drm/nouveau/nvkm: remove perfmon
>   drm/nouveau/nvkm: remove nvkm_client_search()
>   drm/nouveau/nvif: remove support for userspace backends
>   drm/nouveau/nvif: remove route/token
>   drm/nouveau/nvif: remove nvxx_object()
>   drm/nouveau/nvif: remove nvxx_client()
>   drm/nouveau/nvif: remove driver keep/fini
>   drm/nouveau/nvif: remove client device arg
>   drm/nouveau/nvif: remove client version
>   drm/nouveau/nvif: remove client devlist
>   drm/nouveau/nvif: remove client fini
>   drm/nouveau/nvif: remove device args
>   drm/nouveau: always map device
>   drm/nouveau/nvif: remove device rd/wr
>   drm/nouveau/nvif: remove disp chan rd/wr
>   drm/nouveau: move nvxx_* definitions to nouveau_drv.h
>   drm/nouveau: add nvif_mmu to nouveau_drm
>   drm/nouveau: pass drm to nouveau_mem_new(), instead of cli
>   drm/nouveau: pass drm to nv50_dmac_create(), rather than device+disp
>   drm/nouveau: pass cli to nouveau_channel_new() instead of drm+device
>   drm/nouveau: remove nouveau_chan.device
>   drm/nouveau: remove chan->drm
>   drm/nouveau: remove master
>   drm/nouveau: remove push pointer from nouveau_channel
>   drm/nouveau/kms: remove a few unused struct members and fn decls
>   drm/nouveau/kms: remove push pointer from nv50_dmac
> 
>  drivers/gpu/drm/nouveau/Kbuild                |   1 -
>  drivers/gpu/drm/nouveau/dispnv04/crtc.c       |  14 +-
>  drivers/gpu/drm/nouveau/dispnv04/dac.c        |   2 +-
>  drivers/gpu/drm/nouveau/dispnv04/dfp.c        |   2 +-
>  drivers/gpu/drm/nouveau/dispnv04/disp.c       |   7 +-
>  drivers/gpu/drm/nouveau/dispnv04/disp.h       |   2 +-
>  drivers/gpu/drm/nouveau/dispnv04/hw.c         |   9 +-
>  drivers/gpu/drm/nouveau/dispnv04/tvnv04.c     |   4 +-
>  drivers/gpu/drm/nouveau/dispnv04/tvnv17.c     |   6 +-
>  drivers/gpu/drm/nouveau/dispnv50/base507c.c   |  21 +-
>  drivers/gpu/drm/nouveau/dispnv50/base827c.c   |   2 +-
>  drivers/gpu/drm/nouveau/dispnv50/base907c.c   |  10 +-
>  drivers/gpu/drm/nouveau/dispnv50/core507d.c   |   8 +-
>  drivers/gpu/drm/nouveau/dispnv50/corec37d.c   |   6 +-
>  drivers/gpu/drm/nouveau/dispnv50/corec57d.c   |   2 +-
>  drivers/gpu/drm/nouveau/dispnv50/crc907d.c    |   4 +-
>  drivers/gpu/drm/nouveau/dispnv50/crcc37d.c    |   4 +-
>  drivers/gpu/drm/nouveau/dispnv50/crcc57d.c    |   2 +-
>  drivers/gpu/drm/nouveau/dispnv50/dac507d.c    |   2 +-
>  drivers/gpu/drm/nouveau/dispnv50/dac907d.c    |   2 +-
>  drivers/gpu/drm/nouveau/dispnv50/disp.c       |  74 +-
>  drivers/gpu/drm/nouveau/dispnv50/disp.h       |  14 +-
>  drivers/gpu/drm/nouveau/dispnv50/head507d.c   |  24 +-
>  drivers/gpu/drm/nouveau/dispnv50/head827d.c   |  10 +-
>  drivers/gpu/drm/nouveau/dispnv50/head907d.c   |  26 +-
>  drivers/gpu/drm/nouveau/dispnv50/head917d.c   |   6 +-
>  drivers/gpu/drm/nouveau/dispnv50/headc37d.c   |  18 +-
>  drivers/gpu/drm/nouveau/dispnv50/headc57d.c   |  12 +-
>  drivers/gpu/drm/nouveau/dispnv50/ovly507e.c   |   6 +-
>  drivers/gpu/drm/nouveau/dispnv50/ovly827e.c   |   2 +-
>  drivers/gpu/drm/nouveau/dispnv50/ovly907e.c   |   2 +-
>  drivers/gpu/drm/nouveau/dispnv50/pior507d.c   |   2 +-
>  drivers/gpu/drm/nouveau/dispnv50/sor507d.c    |   2 +-
>  drivers/gpu/drm/nouveau/dispnv50/sor907d.c    |   2 +-
>  drivers/gpu/drm/nouveau/dispnv50/sorc37d.c    |   2 +-
>  drivers/gpu/drm/nouveau/dispnv50/wimmc37b.c   |   7 +-
>  drivers/gpu/drm/nouveau/dispnv50/wndwc37e.c   |  24 +-
>  drivers/gpu/drm/nouveau/dispnv50/wndwc57e.c   |  10 +-
>  drivers/gpu/drm/nouveau/dispnv50/wndwc67e.c   |   2 +-
>  drivers/gpu/drm/nouveau/include/nvif/cl0080.h |   7 -
>  drivers/gpu/drm/nouveau/include/nvif/class.h  |   3 -
>  drivers/gpu/drm/nouveau/include/nvif/client.h |  11 +-
>  drivers/gpu/drm/nouveau/include/nvif/device.h |  37 +-
>  drivers/gpu/drm/nouveau/include/nvif/driver.h |   5 -
>  drivers/gpu/drm/nouveau/include/nvif/if0000.h |  10 -
>  drivers/gpu/drm/nouveau/include/nvif/if0002.h |  39 -
>  drivers/gpu/drm/nouveau/include/nvif/if0003.h |  34 -
>  drivers/gpu/drm/nouveau/include/nvif/ioctl.h  |  27 -
>  drivers/gpu/drm/nouveau/include/nvif/object.h |  26 +-
>  drivers/gpu/drm/nouveau/include/nvif/os.h     |  19 +
>  .../drm/nouveau/include/nvkm/core/client.h    |   1 -
>  .../drm/nouveau/include/nvkm/core/device.h    |   1 -
>  .../drm/nouveau/include/nvkm/core/layout.h    |   1 -
>  .../drm/nouveau/include/nvkm/core/object.h    |  14 -
>  .../drm/nouveau/include/nvkm/core/oclass.h    |   2 -
>  .../gpu/drm/nouveau/include/nvkm/core/os.h    |  19 -
>  .../gpu/drm/nouveau/include/nvkm/core/pci.h   |   1 -
>  .../gpu/drm/nouveau/include/nvkm/core/tegra.h |   1 -
>  .../gpu/drm/nouveau/include/nvkm/engine/pm.h  |  29 -
>  drivers/gpu/drm/nouveau/nouveau_abi16.c       | 321 +++++--
>  drivers/gpu/drm/nouveau/nouveau_abi16.h       |   6 +-
>  drivers/gpu/drm/nouveau/nouveau_bios.c        |   4 +-
>  drivers/gpu/drm/nouveau/nouveau_bios.h        |   1 +
>  drivers/gpu/drm/nouveau/nouveau_bo.c          |  10 +-
>  drivers/gpu/drm/nouveau/nouveau_bo0039.c      |   6 +-
>  drivers/gpu/drm/nouveau/nouveau_bo5039.c      |   6 +-
>  drivers/gpu/drm/nouveau/nouveau_bo74c1.c      |   2 +-
>  drivers/gpu/drm/nouveau/nouveau_bo85b5.c      |   2 +-
>  drivers/gpu/drm/nouveau/nouveau_bo9039.c      |   4 +-
>  drivers/gpu/drm/nouveau/nouveau_bo90b5.c      |   2 +-
>  drivers/gpu/drm/nouveau/nouveau_boa0b5.c      |   4 +-
>  drivers/gpu/drm/nouveau/nouveau_chan.c        |  96 +-
>  drivers/gpu/drm/nouveau/nouveau_chan.h        |   8 +-
>  drivers/gpu/drm/nouveau/nouveau_display.c     |   4 +-
>  drivers/gpu/drm/nouveau/nouveau_display.h     |   2 +-
>  drivers/gpu/drm/nouveau/nouveau_dma.c         |   2 +-
>  drivers/gpu/drm/nouveau/nouveau_dmem.c        |   4 +-
>  drivers/gpu/drm/nouveau/nouveau_drm.c         | 395 ++++----
>  drivers/gpu/drm/nouveau/nouveau_drv.h         |  51 +-
>  drivers/gpu/drm/nouveau/nouveau_fence.c       |  17 +-
>  drivers/gpu/drm/nouveau/nouveau_gem.c         |  21 +-
>  drivers/gpu/drm/nouveau/nouveau_hwmon.c       |  46 +-
>  drivers/gpu/drm/nouveau/nouveau_led.c         |   2 +-
>  drivers/gpu/drm/nouveau/nouveau_mem.c         |  38 +-
>  drivers/gpu/drm/nouveau/nouveau_mem.h         |   4 +-
>  drivers/gpu/drm/nouveau/nouveau_nvif.c        |   2 -
>  drivers/gpu/drm/nouveau/nouveau_platform.c    |  11 +-
>  drivers/gpu/drm/nouveau/nouveau_sgdma.c       |   2 +-
>  drivers/gpu/drm/nouveau/nouveau_ttm.c         |  12 +-
>  drivers/gpu/drm/nouveau/nouveau_usif.c        | 194 ----
>  drivers/gpu/drm/nouveau/nouveau_usif.h        |  10 -
>  drivers/gpu/drm/nouveau/nouveau_vga.c         |  14 +-
>  drivers/gpu/drm/nouveau/nv04_fence.c          |   2 +-
>  drivers/gpu/drm/nouveau/nv10_fence.c          |   2 +-
>  drivers/gpu/drm/nouveau/nv17_fence.c          |  10 +-
>  drivers/gpu/drm/nouveau/nv50_fence.c          |   2 +-
>  drivers/gpu/drm/nouveau/nv84_fence.c          |  12 +-
>  drivers/gpu/drm/nouveau/nvc0_fence.c          |   4 +-
>  drivers/gpu/drm/nouveau/nvif/client.c         |  32 +-
>  drivers/gpu/drm/nouveau/nvif/device.c         |  15 +-
>  drivers/gpu/drm/nouveau/nvif/driver.c         |  32 +-
>  drivers/gpu/drm/nouveau/nvif/object.c         |  40 -
>  drivers/gpu/drm/nouveau/nvkm/core/client.c    |  64 +-
>  drivers/gpu/drm/nouveau/nvkm/core/ioctl.c     |  91 +-
>  drivers/gpu/drm/nouveau/nvkm/core/object.c    |  50 -
>  drivers/gpu/drm/nouveau/nvkm/core/oproxy.c    |  42 -
>  drivers/gpu/drm/nouveau/nvkm/core/uevent.c    |   4 +-
>  drivers/gpu/drm/nouveau/nvkm/engine/Kbuild    |   1 -
>  .../gpu/drm/nouveau/nvkm/engine/device/base.c | 479 +++++-----
>  .../gpu/drm/nouveau/nvkm/engine/device/pci.c  |   4 +-
>  .../gpu/drm/nouveau/nvkm/engine/device/priv.h |   2 -
>  .../drm/nouveau/nvkm/engine/device/tegra.c    |   5 +-
>  .../gpu/drm/nouveau/nvkm/engine/device/user.c |  93 +-
>  .../gpu/drm/nouveau/nvkm/engine/disp/chan.c   |  24 -
>  drivers/gpu/drm/nouveau/nvkm/engine/pm/Kbuild |  11 -
>  drivers/gpu/drm/nouveau/nvkm/engine/pm/base.c | 867 ------------------
>  drivers/gpu/drm/nouveau/nvkm/engine/pm/g84.c  | 165 ----
>  .../gpu/drm/nouveau/nvkm/engine/pm/gf100.c    | 243 -----
>  .../gpu/drm/nouveau/nvkm/engine/pm/gf100.h    |  20 -
>  .../gpu/drm/nouveau/nvkm/engine/pm/gf108.c    |  66 --
>  .../gpu/drm/nouveau/nvkm/engine/pm/gf117.c    |  80 --
>  .../gpu/drm/nouveau/nvkm/engine/pm/gk104.c    | 184 ----
>  .../gpu/drm/nouveau/nvkm/engine/pm/gt200.c    | 157 ----
>  .../gpu/drm/nouveau/nvkm/engine/pm/gt215.c    | 138 ---
>  drivers/gpu/drm/nouveau/nvkm/engine/pm/nv40.c | 123 ---
>  drivers/gpu/drm/nouveau/nvkm/engine/pm/nv40.h |  15 -
>  drivers/gpu/drm/nouveau/nvkm/engine/pm/nv50.c | 175 ----
>  drivers/gpu/drm/nouveau/nvkm/engine/pm/priv.h | 105 ---
>  128 files changed, 1105 insertions(+), 4199 deletions(-)
>  delete mode 100644 drivers/gpu/drm/nouveau/include/nvif/if0002.h
>  delete mode 100644 drivers/gpu/drm/nouveau/include/nvif/if0003.h
>  delete mode 100644 drivers/gpu/drm/nouveau/include/nvkm/engine/pm.h
>  delete mode 100644 drivers/gpu/drm/nouveau/nouveau_usif.c
>  delete mode 100644 drivers/gpu/drm/nouveau/nouveau_usif.h
>  delete mode 100644 drivers/gpu/drm/nouveau/nvkm/engine/pm/Kbuild
>  delete mode 100644 drivers/gpu/drm/nouveau/nvkm/engine/pm/base.c
>  delete mode 100644 drivers/gpu/drm/nouveau/nvkm/engine/pm/g84.c
>  delete mode 100644 drivers/gpu/drm/nouveau/nvkm/engine/pm/gf100.c
>  delete mode 100644 drivers/gpu/drm/nouveau/nvkm/engine/pm/gf100.h
>  delete mode 100644 drivers/gpu/drm/nouveau/nvkm/engine/pm/gf108.c
>  delete mode 100644 drivers/gpu/drm/nouveau/nvkm/engine/pm/gf117.c
>  delete mode 100644 drivers/gpu/drm/nouveau/nvkm/engine/pm/gk104.c
>  delete mode 100644 drivers/gpu/drm/nouveau/nvkm/engine/pm/gt200.c
>  delete mode 100644 drivers/gpu/drm/nouveau/nvkm/engine/pm/gt215.c
>  delete mode 100644 drivers/gpu/drm/nouveau/nvkm/engine/pm/nv40.c
>  delete mode 100644 drivers/gpu/drm/nouveau/nvkm/engine/pm/nv40.h
>  delete mode 100644 drivers/gpu/drm/nouveau/nvkm/engine/pm/nv50.c
>  delete mode 100644 drivers/gpu/drm/nouveau/nvkm/engine/pm/priv.h
> 
> -- 
> 2.45.1
> 




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux