dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [RFC v7 00/11] drm/nouveau: Introduce CRC support for gf119+
@ 2020-06-24 23:03 Lyude Paul
  2020-06-24 23:03 ` [RFC v7 01/11] drm/vblank: Register drmm cleanup action once per drm_vblank_crtc Lyude Paul
                   ` (10 more replies)
  0 siblings, 11 replies; 14+ messages in thread
From: Lyude Paul @ 2020-06-24 23:03 UTC (permalink / raw)
  To: dri-devel, nouveau

Nvidia released some documentation on how CRC support works on their
GPUs, hooray!

So: this patch series implements said CRC support in nouveau, along with
adding some special debugfs interfaces for some relevant igt-gpu-tools
tests (already on the ML).

First - we add some new functionality to kthread_work in the kernel, and
then use this to add a new feature to DRM that Ville Syrjälä came up
with: vblank workers. Basically, this is just a generic DRM interface
that allows for scheduling high-priority workers that start on a given
vblank interrupt. Note that while we're currently only using this in
nouveau, Intel has plans to use this for i915 as well (hence why they
came up with it!).

And finally: in order to implement the last feature, we expose some new
functions in the kernel's kthread_worker infrastructure so that we can
de-complicate our implementation of this.

Anyway-welcome to the future! :)

Major changes since v6:
* Move vblank_work related functions into their own files
* Write documentation
* Simplify work flushing and cancellation by getting rid of seqcounts
  and ->pending
Major changes since v4:
* Remove the interfaces we tried adding to kthread_worker and use a wait
  queue + seqcount in order to implement flushing vblank workers.
* Rebase
Major changes since v3:
* Style fixes on nouveau patches from checkpatch, no functional changes
* Don't integrate so tightly with kthread_work (and use our own lock),
  instead introduce some new functions for doing simple async flushing
  and cancelling. I think this interface looks a lot more acceptable
  then what I was previously trying.
* Apply some changes requested by danvet
Major changes since v2:
* Use kthread_worker instead of kthreadd for vblank workers
* Don't check debugfs return values

Lyude Paul (11):
  drm/vblank: Register drmm cleanup action once per drm_vblank_crtc
  drm/vblank: Use spin_(un)lock_irq() in drm_crtc_vblank_off()
  drm/vblank: Add vblank works
  drm/nouveau/kms/nv50-: Unroll error cleanup in nv50_head_create()
  drm/nouveau/kms/nv140-: Don't modify depth in state during atomic
    commit
  drm/nouveau/kms/nv50-: Fix disabling dithering
  drm/nouveau/kms/nv50-: s/harm/armh/g
  drm/nouveau/kms/nv140-: Track wndw mappings in nv50_head_atom
  drm/nouveau/kms/nv50-: Expose nv50_outp_atom in disp.h
  drm/nouveau/kms/nv50-: Move hard-coded object handles into header
  drm/nouveau/kms/nvd9-: Add CRC support

 Documentation/gpu/drm-kms.rst               |  15 +
 drivers/gpu/drm/Makefile                    |   2 +-
 drivers/gpu/drm/drm_vblank.c                |  83 ++-
 drivers/gpu/drm/drm_vblank_internal.h       |  19 +
 drivers/gpu/drm/drm_vblank_work.c           | 259 +++++++
 drivers/gpu/drm/drm_vblank_work_internal.h  |  24 +
 drivers/gpu/drm/nouveau/dispnv04/crtc.c     |  25 +-
 drivers/gpu/drm/nouveau/dispnv50/Kbuild     |   4 +
 drivers/gpu/drm/nouveau/dispnv50/atom.h     |  21 +
 drivers/gpu/drm/nouveau/dispnv50/core.h     |   4 +
 drivers/gpu/drm/nouveau/dispnv50/core907d.c |   3 +
 drivers/gpu/drm/nouveau/dispnv50/core917d.c |   3 +
 drivers/gpu/drm/nouveau/dispnv50/corec37d.c |   3 +
 drivers/gpu/drm/nouveau/dispnv50/corec57d.c |   3 +
 drivers/gpu/drm/nouveau/dispnv50/crc.c      | 714 ++++++++++++++++++++
 drivers/gpu/drm/nouveau/dispnv50/crc.h      | 125 ++++
 drivers/gpu/drm/nouveau/dispnv50/crc907d.c  | 139 ++++
 drivers/gpu/drm/nouveau/dispnv50/crcc37d.c  | 153 +++++
 drivers/gpu/drm/nouveau/dispnv50/disp.c     |  58 +-
 drivers/gpu/drm/nouveau/dispnv50/disp.h     |  24 +
 drivers/gpu/drm/nouveau/dispnv50/handles.h  |  16 +
 drivers/gpu/drm/nouveau/dispnv50/head.c     | 134 +++-
 drivers/gpu/drm/nouveau/dispnv50/head.h     |  12 +-
 drivers/gpu/drm/nouveau/dispnv50/head907d.c |  14 +-
 drivers/gpu/drm/nouveau/dispnv50/headc37d.c |  27 +-
 drivers/gpu/drm/nouveau/dispnv50/headc57d.c |  20 +-
 drivers/gpu/drm/nouveau/dispnv50/wndw.c     |  15 +-
 drivers/gpu/drm/nouveau/nouveau_display.c   |  60 +-
 include/drm/drm_vblank.h                    |  20 +
 include/drm/drm_vblank_work.h               |  71 ++
 30 files changed, 1910 insertions(+), 160 deletions(-)
 create mode 100644 drivers/gpu/drm/drm_vblank_internal.h
 create mode 100644 drivers/gpu/drm/drm_vblank_work.c
 create mode 100644 drivers/gpu/drm/drm_vblank_work_internal.h
 create mode 100644 drivers/gpu/drm/nouveau/dispnv50/crc.c
 create mode 100644 drivers/gpu/drm/nouveau/dispnv50/crc.h
 create mode 100644 drivers/gpu/drm/nouveau/dispnv50/crc907d.c
 create mode 100644 drivers/gpu/drm/nouveau/dispnv50/crcc37d.c
 create mode 100644 drivers/gpu/drm/nouveau/dispnv50/handles.h
 create mode 100644 include/drm/drm_vblank_work.h

-- 
2.26.2

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2020-06-26 21:18 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-24 23:03 [RFC v7 00/11] drm/nouveau: Introduce CRC support for gf119+ Lyude Paul
2020-06-24 23:03 ` [RFC v7 01/11] drm/vblank: Register drmm cleanup action once per drm_vblank_crtc Lyude Paul
2020-06-24 23:03 ` [RFC v7 02/11] drm/vblank: Use spin_(un)lock_irq() in drm_crtc_vblank_off() Lyude Paul
2020-06-26 20:47   ` Daniel Vetter
2020-06-24 23:03 ` [RFC v7 03/11] drm/vblank: Add vblank works Lyude Paul
2020-06-26 21:18   ` Daniel Vetter
2020-06-24 23:03 ` [RFC v7 04/11] drm/nouveau/kms/nv50-: Unroll error cleanup in nv50_head_create() Lyude Paul
2020-06-24 23:03 ` [RFC v7 05/11] drm/nouveau/kms/nv140-: Don't modify depth in state during atomic commit Lyude Paul
2020-06-24 23:03 ` [RFC v7 06/11] drm/nouveau/kms/nv50-: Fix disabling dithering Lyude Paul
2020-06-24 23:03 ` [RFC v7 07/11] drm/nouveau/kms/nv50-: s/harm/armh/g Lyude Paul
2020-06-24 23:03 ` [RFC v7 08/11] drm/nouveau/kms/nv140-: Track wndw mappings in nv50_head_atom Lyude Paul
2020-06-24 23:03 ` [RFC v7 09/11] drm/nouveau/kms/nv50-: Expose nv50_outp_atom in disp.h Lyude Paul
2020-06-24 23:03 ` [RFC v7 10/11] drm/nouveau/kms/nv50-: Move hard-coded object handles into header Lyude Paul
2020-06-24 23:03 ` [RFC v7 11/11] drm/nouveau/kms/nvd9-: Add CRC support Lyude Paul

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).