mbox series

[RFC,00/14] QAIC DRM accelerator driver

Message ID 1660588956-24027-1-git-send-email-quic_jhugo@quicinc.com (mailing list archive)
Headers show
Series QAIC DRM accelerator driver | expand

Message

Jeffrey Hugo Aug. 15, 2022, 6:42 p.m. UTC
This patchset introduces a Linux Kernel driver (QAIC - Qualcomm AIC) for the
Qualcomm Cloud AI 100 product (AIC100).

Qualcomm Cloud AI 100 is a PCIe adapter card that hosts a dedicated machine
learning inference accelerator.  Tons of documentation in the first patch of
the series.

The driver was a misc device until recently.  In accordance with the 2021
Ksummit (per LWN), it has been converted to a DRM driver due to the use of
dma_buf.

For historical purposes, the last revision that was on list is:
https://lore.kernel.org/all/1589897645-17088-1-git-send-email-jhugo@codeaurora.org/
The driver has evolved quite a bit in the two years since.

Regarding the open userspace, it is currently a work in progress (WIP) but will
be delivered.  The motivation for this RFC series is to get some early feedback
on the driver since Daniel Vetter and David Airlie indicated that would good
idea while the userspace is being worked on.

We are a bit new to the DRM area, and appreciate all guidence/feedback.

Questions we are hoping to get an answer to:

1. Does Qualcomm Cloud AI 100 fit in DRM?

2. Would a "QAIC" directory in the GPU documentation be acceptable?
   We'd like to split up the documentation into multiple files as we feel that
   would make it more organized.  It looks like only AMD has a directory,
   everyone else has a single file.

Things that are still a todo (in no particular order):

-Open userspace (see above)

-Figure out what to do with the device partitioning feature.  The uAPI for it
 is clunky.  Seems like perhaps it should fall under a cgroup.  The intent is
 to start a discussion over in the cgroup area to see what the experts say.

-Add proper documentation for our sysfs additions

-Extend the driver to export a few of the MHI channels to userspace.  We are
 currently using an old driver which was proposed and rejected.  Need to
 refactor and make something QAIC specific.

-Covert the documentation (patch 1) to proper rst syntax

Jeffrey Hugo (14):
  drm/qaic: Add documentation for AIC100 accelerator driver
  drm/qaic: Add uapi and core driver file
  drm/qaic: Add qaic.h internal header
  drm/qaic: Add MHI controller
  drm/qaic: Add control path
  drm/qaic: Add datapath
  drm/qaic: Add debugfs
  drm/qaic: Add RAS component
  drm/qaic: Add ssr component
  drm/qaic: Add sysfs
  drm/qaic: Add telemetry
  drm/qaic: Add tracepoints
  drm/qaic: Add qaic driver to the build system
  MAINTAINERS: Add entry for QAIC driver

 Documentation/gpu/drivers.rst         |    1 +
 Documentation/gpu/qaic.rst            |  567 +++++++++
 MAINTAINERS                           |    7 +
 drivers/gpu/drm/Kconfig               |    2 +
 drivers/gpu/drm/Makefile              |    1 +
 drivers/gpu/drm/qaic/Kconfig          |   33 +
 drivers/gpu/drm/qaic/Makefile         |   17 +
 drivers/gpu/drm/qaic/mhi_controller.c |  575 +++++++++
 drivers/gpu/drm/qaic/mhi_controller.h |   18 +
 drivers/gpu/drm/qaic/qaic.h           |  396 ++++++
 drivers/gpu/drm/qaic/qaic_control.c   | 1788 +++++++++++++++++++++++++++
 drivers/gpu/drm/qaic/qaic_data.c      | 2152 +++++++++++++++++++++++++++++++++
 drivers/gpu/drm/qaic/qaic_debugfs.c   |  335 +++++
 drivers/gpu/drm/qaic/qaic_debugfs.h   |   33 +
 drivers/gpu/drm/qaic/qaic_drv.c       |  825 +++++++++++++
 drivers/gpu/drm/qaic/qaic_ras.c       |  653 ++++++++++
 drivers/gpu/drm/qaic/qaic_ras.h       |   11 +
 drivers/gpu/drm/qaic/qaic_ssr.c       |  889 ++++++++++++++
 drivers/gpu/drm/qaic/qaic_ssr.h       |   13 +
 drivers/gpu/drm/qaic/qaic_sysfs.c     |  113 ++
 drivers/gpu/drm/qaic/qaic_telemetry.c |  851 +++++++++++++
 drivers/gpu/drm/qaic/qaic_telemetry.h |   14 +
 drivers/gpu/drm/qaic/qaic_trace.h     |  493 ++++++++
 include/uapi/drm/qaic_drm.h           |  283 +++++
 24 files changed, 10070 insertions(+)
 create mode 100644 Documentation/gpu/qaic.rst
 create mode 100644 drivers/gpu/drm/qaic/Kconfig
 create mode 100644 drivers/gpu/drm/qaic/Makefile
 create mode 100644 drivers/gpu/drm/qaic/mhi_controller.c
 create mode 100644 drivers/gpu/drm/qaic/mhi_controller.h
 create mode 100644 drivers/gpu/drm/qaic/qaic.h
 create mode 100644 drivers/gpu/drm/qaic/qaic_control.c
 create mode 100644 drivers/gpu/drm/qaic/qaic_data.c
 create mode 100644 drivers/gpu/drm/qaic/qaic_debugfs.c
 create mode 100644 drivers/gpu/drm/qaic/qaic_debugfs.h
 create mode 100644 drivers/gpu/drm/qaic/qaic_drv.c
 create mode 100644 drivers/gpu/drm/qaic/qaic_ras.c
 create mode 100644 drivers/gpu/drm/qaic/qaic_ras.h
 create mode 100644 drivers/gpu/drm/qaic/qaic_ssr.c
 create mode 100644 drivers/gpu/drm/qaic/qaic_ssr.h
 create mode 100644 drivers/gpu/drm/qaic/qaic_sysfs.c
 create mode 100644 drivers/gpu/drm/qaic/qaic_telemetry.c
 create mode 100644 drivers/gpu/drm/qaic/qaic_telemetry.h
 create mode 100644 drivers/gpu/drm/qaic/qaic_trace.h
 create mode 100644 include/uapi/drm/qaic_drm.h