All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH v2 00/17] Host1x/TegraDRM UAPI
@ 2020-09-05 10:34 ` Mikko Perttunen
  0 siblings, 0 replies; 128+ messages in thread
From: Mikko Perttunen @ 2020-09-05 10:34 UTC (permalink / raw)
  To: thierry.reding, jonathanh, digetx, airlied, daniel
  Cc: linux-tegra, dri-devel, talho, bhuntsman, Mikko Perttunen

Hi all,

here's a second revision of the Host1x/TegraDRM UAPI proposal,
hopefully with most issues from v1 resolved, and also with
an implementation. There are still open issues with the
implementation:

* Relocs are now handled on TegraDRM side instead of Host1x,
  so the firewall is not aware of them, causing submission
  failure where the firewall is enabled. Proposed solution
  is to move the firewall to TegraDRM side, but this hasn't
  been done yet.
* For the new UAPI, syncpoint recovery on job timeout is
  disabled. What this means is that upon job timeout,
  all further jobs using that syncpoint are cancelled,
  and the syncpoint is marked unusable until it is freed.
  However, there is currently a race between the timeout
  handler and job submission, where submission can observe
  the syncpoint in non-locked state and yet the job
  cancellations won't cancel the new job.
* Waiting for DMA reservation fences is not implemented yet.
* I have only tested on Tegra186.

The series consists of three parts:

* The first part contains some fixes and improvements to
  the Host1x driver of more general nature,
* The second part adds the Host1x side UAPI, as well as
  Host1x-side changes needed for the new TegraDRM UAPI,
* The third part adds the new TegraDRM UAPI.

I have written some tests to test the new interface,
see https://github.com/cyndis/uapi-test. Porting of proper
userspace (e.g. opentegra, vdpau-tegra) will come once
there is some degree of conclusion on the UAPI definition.

The series can be also found in
https://github.com/cyndis/linux/commits/work/host1x-uapi.

Older versions:
v1: https://www.spinics.net/lists/linux-tegra/msg51000.html

Thank you,
Mikko

Mikko Perttunen (17):
  gpu: host1x: Use different lock classes for each client
  gpu: host1x: Allow syncpoints without associated client
  gpu: host1x: Show number of pending waiters in debugfs
  gpu: host1x: Remove cancelled waiters immediately
  gpu: host1x: Use HW-equivalent syncpoint expiration check
  gpu: host1x: Cleanup and refcounting for syncpoints
  gpu: host1x: Introduce UAPI header
  gpu: host1x: Implement /dev/host1x device node
  gpu: host1x: DMA fences and userspace fence creation
  WIP: gpu: host1x: Add no-recovery mode
  gpu: host1x: Add job release callback
  gpu: host1x: Add support for syncpoint waits in CDMA pushbuffer
  gpu: host1x: Reset max value when freeing a syncpoint
  drm/tegra: Add new UAPI to header
  drm/tegra: Add power_on/power_off engine callbacks
  drm/tegra: Allocate per-engine channel in core code
  WIP: drm/tegra: Implement new UAPI

 drivers/gpu/drm/tegra/Makefile      |   2 +
 drivers/gpu/drm/tegra/dc.c          |   4 +-
 drivers/gpu/drm/tegra/drm.c         |  75 ++-
 drivers/gpu/drm/tegra/drm.h         |  20 +-
 drivers/gpu/drm/tegra/gr2d.c        |   4 +-
 drivers/gpu/drm/tegra/gr3d.c        |   4 +-
 drivers/gpu/drm/tegra/uapi.h        |  59 +++
 drivers/gpu/drm/tegra/uapi/submit.c | 687 ++++++++++++++++++++++++++++
 drivers/gpu/drm/tegra/uapi/uapi.c   | 328 +++++++++++++
 drivers/gpu/drm/tegra/vic.c         | 131 +++---
 drivers/gpu/host1x/Makefile         |   2 +
 drivers/gpu/host1x/bus.c            |   7 +-
 drivers/gpu/host1x/cdma.c           |  53 ++-
 drivers/gpu/host1x/debug.c          |  14 +-
 drivers/gpu/host1x/dev.c            |   9 +
 drivers/gpu/host1x/dev.h            |  10 +-
 drivers/gpu/host1x/fence.c          | 207 +++++++++
 drivers/gpu/host1x/fence.h          |  15 +
 drivers/gpu/host1x/hw/cdma_hw.c     |   2 +-
 drivers/gpu/host1x/hw/channel_hw.c  |  67 ++-
 drivers/gpu/host1x/hw/debug_hw.c    |  11 +-
 drivers/gpu/host1x/intr.c           |  23 +-
 drivers/gpu/host1x/intr.h           |   2 +
 drivers/gpu/host1x/job.c            |  79 +++-
 drivers/gpu/host1x/job.h            |  14 +
 drivers/gpu/host1x/syncpt.c         | 137 +++---
 drivers/gpu/host1x/syncpt.h         |  21 +-
 drivers/gpu/host1x/uapi.c           | 381 +++++++++++++++
 drivers/gpu/host1x/uapi.h           |  22 +
 include/linux/host1x.h              |  40 +-
 include/uapi/drm/tegra_drm.h        | 431 +++++++++++++++--
 include/uapi/linux/host1x.h         | 134 ++++++
 32 files changed, 2718 insertions(+), 277 deletions(-)
 create mode 100644 drivers/gpu/drm/tegra/uapi.h
 create mode 100644 drivers/gpu/drm/tegra/uapi/submit.c
 create mode 100644 drivers/gpu/drm/tegra/uapi/uapi.c
 create mode 100644 drivers/gpu/host1x/fence.c
 create mode 100644 drivers/gpu/host1x/fence.h
 create mode 100644 drivers/gpu/host1x/uapi.c
 create mode 100644 drivers/gpu/host1x/uapi.h
 create mode 100644 include/uapi/linux/host1x.h

-- 
2.28.0


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

end of thread, other threads:[~2020-09-17  8:08 UTC | newest]

Thread overview: 128+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-05 10:34 [RFC PATCH v2 00/17] Host1x/TegraDRM UAPI Mikko Perttunen
2020-09-05 10:34 ` Mikko Perttunen
2020-09-05 10:34 ` [RFC PATCH v2 01/17] gpu: host1x: Use different lock classes for each client Mikko Perttunen
2020-09-05 10:34   ` Mikko Perttunen
2020-09-05 10:34 ` [RFC PATCH v2 02/17] gpu: host1x: Allow syncpoints without associated client Mikko Perttunen
2020-09-05 10:34   ` Mikko Perttunen
2020-09-05 10:34 ` [RFC PATCH v2 03/17] gpu: host1x: Show number of pending waiters in debugfs Mikko Perttunen
2020-09-05 10:34   ` Mikko Perttunen
2020-09-05 10:34 ` [RFC PATCH v2 04/17] gpu: host1x: Remove cancelled waiters immediately Mikko Perttunen
2020-09-05 10:34   ` Mikko Perttunen
2020-09-05 10:34 ` [RFC PATCH v2 05/17] gpu: host1x: Use HW-equivalent syncpoint expiration check Mikko Perttunen
2020-09-05 10:34   ` Mikko Perttunen
2020-09-05 10:34 ` [RFC PATCH v2 06/17] gpu: host1x: Cleanup and refcounting for syncpoints Mikko Perttunen
2020-09-05 10:34   ` Mikko Perttunen
2020-09-05 14:30   ` Dmitry Osipenko
2020-09-05 14:30     ` Dmitry Osipenko
2020-09-05 14:53     ` Mikko Perttunen
2020-09-05 14:53       ` Mikko Perttunen
2020-09-09  0:07       ` Dmitry Osipenko
2020-09-09  0:07         ` Dmitry Osipenko
2020-09-09  8:03         ` Mikko Perttunen
2020-09-09  8:03           ` Mikko Perttunen
2020-09-05 10:34 ` [RFC PATCH v2 07/17] gpu: host1x: Introduce UAPI header Mikko Perttunen
2020-09-05 10:34   ` Mikko Perttunen
2020-09-05 10:34 ` [RFC PATCH v2 08/17] gpu: host1x: Implement /dev/host1x device node Mikko Perttunen
2020-09-05 10:34   ` Mikko Perttunen
2020-09-05 10:34 ` [RFC PATCH v2 09/17] gpu: host1x: DMA fences and userspace fence creation Mikko Perttunen
2020-09-05 10:34   ` Mikko Perttunen
2020-09-10 22:00   ` Dmitry Osipenko
2020-09-10 22:00     ` Dmitry Osipenko
2020-09-11  9:07     ` Mikko Perttunen
2020-09-11  9:07       ` Mikko Perttunen
2020-09-05 10:34 ` [RFC PATCH v2 10/17] WIP: gpu: host1x: Add no-recovery mode Mikko Perttunen
2020-09-05 10:34   ` Mikko Perttunen
2020-09-11 16:40   ` Dmitry Osipenko
2020-09-11 16:40     ` Dmitry Osipenko
2020-09-11 22:11     ` Mikko Perttunen
2020-09-11 22:11       ` Mikko Perttunen
2020-09-12 12:53       ` Dmitry Osipenko
2020-09-12 12:53         ` Dmitry Osipenko
2020-09-12 13:31         ` Mikko Perttunen
2020-09-12 13:31           ` Mikko Perttunen
2020-09-12 21:51           ` Dmitry Osipenko
2020-09-12 21:51             ` Dmitry Osipenko
2020-09-13  9:51             ` Mikko Perttunen
2020-09-13  9:51               ` Mikko Perttunen
2020-09-13 18:37               ` Dmitry Osipenko
2020-09-13 18:37                 ` Dmitry Osipenko
2020-09-15 10:57                 ` Mikko Perttunen
2020-09-15 10:57                   ` Mikko Perttunen
2020-09-05 10:34 ` [RFC PATCH v2 11/17] gpu: host1x: Add job release callback Mikko Perttunen
2020-09-05 10:34   ` Mikko Perttunen
2020-09-05 10:34 ` [RFC PATCH v2 12/17] gpu: host1x: Add support for syncpoint waits in CDMA pushbuffer Mikko Perttunen
2020-09-05 10:34   ` Mikko Perttunen
2020-09-05 10:34 ` [RFC PATCH v2 13/17] gpu: host1x: Reset max value when freeing a syncpoint Mikko Perttunen
2020-09-05 10:34   ` Mikko Perttunen
2020-09-16 19:44   ` Dmitry Osipenko
2020-09-16 19:44     ` Dmitry Osipenko
2020-09-16 20:43     ` Mikko Perttunen
2020-09-16 20:43       ` Mikko Perttunen
2020-09-16 21:37       ` Dmitry Osipenko
2020-09-16 21:37         ` Dmitry Osipenko
2020-09-17  7:25         ` Mikko Perttunen
2020-09-17  7:25           ` Mikko Perttunen
2020-09-05 10:34 ` [RFC PATCH v2 14/17] drm/tegra: Add new UAPI to header Mikko Perttunen
2020-09-05 10:34   ` Mikko Perttunen
2020-09-08 23:45   ` DRM_TEGRA_SUBMIT_BUF_WRITE_RELOC Dmitry Osipenko
2020-09-08 23:45     ` DRM_TEGRA_SUBMIT_BUF_WRITE_RELOC Dmitry Osipenko
2020-09-09  8:10     ` DRM_TEGRA_SUBMIT_BUF_WRITE_RELOC Mikko Perttunen
2020-09-09  8:10       ` DRM_TEGRA_SUBMIT_BUF_WRITE_RELOC Mikko Perttunen
2020-09-10 22:15       ` DRM_TEGRA_SUBMIT_BUF_WRITE_RELOC Dmitry Osipenko
2020-09-10 22:15         ` DRM_TEGRA_SUBMIT_BUF_WRITE_RELOC Dmitry Osipenko
2020-09-11  9:52         ` DRM_TEGRA_SUBMIT_BUF_WRITE_RELOC Mikko Perttunen
2020-09-11  9:52           ` DRM_TEGRA_SUBMIT_BUF_WRITE_RELOC Mikko Perttunen
2020-09-05 10:34 ` [RFC PATCH v2 15/17] drm/tegra: Add power_on/power_off engine callbacks Mikko Perttunen
2020-09-05 10:34   ` Mikko Perttunen
2020-09-09  0:16   ` Dmitry Osipenko
2020-09-09  0:16     ` Dmitry Osipenko
2020-09-09  8:11     ` Mikko Perttunen
2020-09-09  8:11       ` Mikko Perttunen
2020-09-05 10:34 ` [RFC PATCH v2 16/17] drm/tegra: Allocate per-engine channel in core code Mikko Perttunen
2020-09-05 10:34   ` Mikko Perttunen
2020-09-05 10:34 ` [RFC PATCH v2 17/17] WIP: drm/tegra: Implement new UAPI Mikko Perttunen
2020-09-05 10:34   ` Mikko Perttunen
2020-09-09  0:47   ` Dmitry Osipenko
2020-09-09  0:47     ` Dmitry Osipenko
2020-09-09  8:19     ` Mikko Perttunen
2020-09-09  8:19       ` Mikko Perttunen
2020-09-10 21:59       ` Dmitry Osipenko
2020-09-10 21:59         ` Dmitry Osipenko
2020-09-09  1:13   ` [RFC PATCH v2 17/17] WIP: drm/tegra: Implement new UAPI (submit_handle_syncpts) Dmitry Osipenko
2020-09-09  1:13     ` Dmitry Osipenko
2020-09-09  1:24     ` Dmitry Osipenko
2020-09-09  1:24       ` Dmitry Osipenko
2020-09-09  8:26       ` Mikko Perttunen
2020-09-09  8:26         ` Mikko Perttunen
2020-09-10 21:58         ` Dmitry Osipenko
2020-09-10 21:58           ` Dmitry Osipenko
2020-09-09  2:06   ` [RFC PATCH v2 17/17] WIP: drm/tegra: Implement new UAPI Dmitry Osipenko
2020-09-09  2:06     ` Dmitry Osipenko
2020-09-09  8:26     ` Mikko Perttunen
2020-09-09  8:26       ` Mikko Perttunen
2020-09-09  2:10   ` Dmitry Osipenko
2020-09-09  2:10     ` Dmitry Osipenko
2020-09-09  2:34     ` Dmitry Osipenko
2020-09-09  2:34       ` Dmitry Osipenko
2020-09-09  8:36       ` Mikko Perttunen
2020-09-09  8:36         ` Mikko Perttunen
2020-09-10 21:57         ` Dmitry Osipenko
2020-09-10 21:57           ` Dmitry Osipenko
2020-09-11  9:59           ` Mikko Perttunen
2020-09-11  9:59             ` Mikko Perttunen
2020-09-11 16:30             ` Dmitry Osipenko
2020-09-11 16:30               ` Dmitry Osipenko
2020-09-15 11:08               ` Mikko Perttunen
2020-09-15 11:08                 ` Mikko Perttunen
2020-09-08 23:36 ` [RFC PATCH v2 00/17] Host1x/TegraDRM UAPI Dmitry Osipenko
2020-09-08 23:36   ` Dmitry Osipenko
2020-09-09  8:40   ` Mikko Perttunen
2020-09-09  8:40     ` Mikko Perttunen
2020-09-10 22:09     ` Dmitry Osipenko
2020-09-10 22:09       ` Dmitry Osipenko
2020-09-09  2:20 ` Dmitry Osipenko
2020-09-09  2:20   ` Dmitry Osipenko
2020-09-09  8:44   ` Mikko Perttunen
2020-09-09  8:44     ` Mikko Perttunen
2020-09-10 21:53     ` Dmitry Osipenko
2020-09-10 21:53       ` Dmitry Osipenko

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.