Commit 729b3c15 authored by Dave Airlie's avatar Dave Airlie
Browse files

Merge tag 'drm-habanalabs-next-2023-01-26' of...

Merge tag 'drm-habanalabs-next-2023-01-26' of https://git.kernel.org/pub/scm/linux/kernel/git/ogabbay/linux

 into drm-next

This tag contains habanalabs driver and accel changes for v6.3:

- Moved the driver to the accel subsystem. Currently only the files were
  moved (including the uapi file which was also renamed). This doesn't
  include registering to the accel subsystem. This will probably be only
  in the next kernel version.

- In case of decoder error (axi error) in Gaudi2, we can now find the exact
  IP that initiated the erroneous transaction and print the details for
  better debug.

- Add more trace events. We now can trace mmio transactions and communication
  with the preboot firmware.

- Add to Gaudi2 support for abrupt reset that is done by the firmware. This
  was support so far only for Gaudi1.

- Add uAPI to flush memory transactions (to the device memory). This is
  needed by the communications library in case of doing p2p with a host NIC
  which access our HBM directly through the PCI BAR.

- Add uAPI to pass-through a request from user-space to firmware and get the
  result back to user-space. This will allow the driver code to avoid the
  need to add new packet (in the communication channel with the firmware) for
  every new request type.

- Remove the option to export dma-buf by memory allocation handle in our uAPI.
  This was planned for Gaudi2 but was never used. Instead, we will do export
  by memory address (same as Gaudi1). In addition, we added the option to
  specify an offset to the address. This is needed in Gaudi2 because there
  the user allocates the entire HBM in one allocation, but would like to
  export only small part of it.

- Multiple bug fixes, refactors and small optimizations.

Signed-off-by: default avatarDave Airlie <airlied@redhat.com>

From: Oded Gabbay <ogabbay@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230126213317.GA1520525@ogabbay-vm-u20.habana-labs.com
parents 2e2245ef 4dc7c580
Loading
Loading
Loading
Loading
+13 −1
Original line number Diff line number Diff line
@@ -201,7 +201,19 @@ What: /sys/class/habanalabs/hl<n>/status
Date:           Jan 2019
KernelVersion:  5.1
Contact:        ogabbay@kernel.org
Description:    Status of the card: "Operational", "Malfunction", "In reset".
Description:    Status of the card:

                  * "operational" - Device is available for work.
                  * "in reset" - Device is going through reset, will be
                    available shortly.
                  * "disabled" - Device is not usable.
                  * "needs reset" - Device is not usable until a hard reset
                    is initiated.
                  * "in device creation" - Device is not available yet, as it
                    is still initializing.
                  * "in reset after device release" - Device is going through
                    a compute-reset which is executed after a device release
                    (relevant for Gaudi2 only).

What:           /sys/class/habanalabs/hl<n>/thermal_ver
Date:           Jan 2019
+3 −3
Original line number Diff line number Diff line
@@ -67,9 +67,9 @@ tree - drivers/accel/.
The accelerator devices will be exposed to the user space with the dedicated
261 major number and will have the following convention:

- device char files - /dev/accel/accel*
- sysfs             - /sys/class/accel/accel*/
- debugfs           - /sys/kernel/debug/accel/accel*/
- device char files - /dev/accel/accel\*
- sysfs             - /sys/class/accel/accel\*/
- debugfs           - /sys/kernel/debug/accel/\*/

Getting Started
===============
+5 −2
Original line number Diff line number Diff line
@@ -6893,6 +6893,7 @@ C: irc://irc.oftc.net/dri-devel
T:	git https://git.kernel.org/pub/scm/linux/kernel/git/ogabbay/accel.git
F:	Documentation/accel/
F:	drivers/accel/
F:	include/drm/drm_accel.h
DRM ACCEL DRIVERS FOR INTEL VPU
M:	Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
@@ -9032,13 +9033,15 @@ F: block/partitions/efi.*
HABANALABS PCI DRIVER
M:	Oded Gabbay <ogabbay@kernel.org>
L:	dri-devel@lists.freedesktop.org
S:	Supported
C:	irc://irc.oftc.net/dri-devel
T:	git https://git.kernel.org/pub/scm/linux/kernel/git/ogabbay/linux.git
F:	Documentation/ABI/testing/debugfs-driver-habanalabs
F:	Documentation/ABI/testing/sysfs-driver-habanalabs
F:	drivers/misc/habanalabs/
F:	drivers/accel/habanalabs/
F:	include/trace/events/habanalabs.h
F:	include/uapi/misc/habanalabs.h
F:	include/uapi/drm/habanalabs_accel.h
HACKRF MEDIA DRIVER
M:	Antti Palosaari <crope@iki.fi>
+1 −0
Original line number Diff line number Diff line
@@ -23,4 +23,5 @@ menuconfig DRM_ACCEL
	  different device files, called accel/accel* (in /dev, sysfs
	  and debugfs).

source "drivers/accel/habanalabs/Kconfig"
source "drivers/accel/ivpu/Kconfig"
+1 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0-only

obj-y	+= habanalabs/
obj-y	+= ivpu/
Loading