[PATCH 2/2] MAINTAINERS: update Xe driver maintainers

2024-05-15 Thread Oded Gabbay
Because I left Intel, I'm removing myself from the list of Xe driver maintainers. Signed-off-by: Oded Gabbay --- MAINTAINERS | 1 - 1 file changed, 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index 5bd45a919aff..2469607ff5b7 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -10863,7

[PATCH 0/2] Update on habanalabs, Xe maintainer status

2024-05-15 Thread Oded Gabbay
someone in the near future. Although I'm not going to do full-time kernel development in my next role, I will remain as the accel maintainer and will probably continue to participate in discussions from time to time. Thanks, Oded Oded Gabbay (2): MAINTAINERS: Change habanalabs maintainer and git

[PATCH 1/2] MAINTAINERS: Change habanalabs maintainer and git repo path

2024-05-15 Thread Oded Gabbay
Because I left habana, Ofir Bitton is now the habanalabs driver maintainer. The git repo also changed location to the Habana GitHub website. Signed-off-by: Oded Gabbay --- MAINTAINERS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index

Re: [PATCH] drm/etnaviv: Create an accel device node if compute-only

2024-05-09 Thread Oded Gabbay
t; > > > Before we bring the device up we don't know whether it is capable of > > > > rendering or not (depends on the features of its blocks), so first try > > > > to probe a rendering node, and if we find out that there is no rendering > > > > hardwar

Re: About upstreaming ArmChina NPU driver

2024-04-03 Thread Oded Gabbay
On Thu, Mar 28, 2024 at 10:01 AM Dejia Shang wrote: > > Dear Kernel Maintainers, > > I am a driver developer and would like to upstream the ArmChina Zhouyi NPU > driver ("Zhouyi" is the brand) to accel subsystem. > > The driver is already open sourced (both UMD and KMD) and anyone can find the

[git pull] habanalabs for drm-next-6.9

2024-02-26 Thread Oded Gabbay
Hi Dave, Sima. Habanalabs pull request for 6.9. No uapi changes this time. Just minor features, improvements, code cleanups and bug fixes. Also one small change in accel subsystem file. Full details are in the signed tag. Thanks, Oded The following changes since commit

Re: [PATCH] accel: constify the struct device_type usage

2024-02-26 Thread Oded Gabbay
On Mon, Feb 19, 2024 at 04:48:28PM -0300, Ricardo B. Marliere wrote: > Since commit aed65af1cc2f ("drivers: make device_type const"), the driver > core can properly handle constant struct device_type. Move the > accel_sysfs_device_minor variable to be a constant structure as well, > placing it

[PATCH 2/3] accel/habanalabs/gaudi2: drop support for never released firmware

2024-02-25 Thread Oded Gabbay
From: Ohad Sharabi Firmware files below 1.11 were never released to customers so no need to support them externally. Signed-off-by: Ohad Sharabi Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/accel/habanalabs/gaudi2/gaudi2.c | 47 ++-- 1 file changed, 3

[PATCH 3/3] accel/habanalabs/gaudi2: use single function to compare FW versions

2024-02-25 Thread Oded Gabbay
Sharabi Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/accel/habanalabs/common/firmware_if.c | 25 +++ drivers/accel/habanalabs/common/habanalabs.h | 20 +-- drivers/accel/habanalabs/gaudi2/gaudi2.c | 6 ++--- 3 files changed, 29 insertions

[PATCH 1/3] accel/habanalabs/gaudi2: initialize field in correct function

2024-02-25 Thread Oded Gabbay
From: Ohad Sharabi supports_advanced_cpucp_rc is an asic property which should be initialized in the gaudi2_set_fixed_properties(), where all of the asic properties are initialized. Signed-off-by: Ohad Sharabi Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/accel/habanalabs

[PATCH 12/13] accel/habanalabs: keep explicit size of reserved memory for FW

2024-02-20 Thread Oded Gabbay
. Modify the property to hold the size in bytes. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/accel/habanalabs/common/firmware_if.c | 2 +- drivers/accel/habanalabs/common/habanalabs.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH 10/13] accel/habanalabs/hwmon: rate limit errors user can generate

2024-02-20 Thread Oded Gabbay
From: Ofir Bitton Fetching sensor data can fail due to various reasons. In order not to pollute the kernel log, those error prints must be rate limited. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/accel/habanalabs/common/hwmon.c | 29

[PATCH 09/13] accel/habanalabs/gaudi2: drain event lacks rd/wr indication

2024-02-20 Thread Oded Gabbay
From: Ofir Bitton Due to a H/W issue, AXI drain event does not include a read/write indication, hence we remove this print. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/accel/habanalabs/gaudi2/gaudi2.c | 14 +++--- 1 file changed, 3

[PATCH 07/13] accel/habanalabs: initialize maybe-uninitialized variables

2024-02-20 Thread Oded Gabbay
From: Tal Risin Prevent static analysis warning. Signed-off-by: Tal Risin Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/accel/habanalabs/common/debugfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/accel/habanalabs/common/debugfs.c b

[PATCH 05/13] accel/habanalabs: fix glbl error cause handling

2024-02-20 Thread Oded Gabbay
From: Tomer Tayar The glbl error cause handling has a wrong assumption that all error bits are consecutive. Fix the handling to check all relevant error bits per ASIC. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/accel/habanalabs/common

[PATCH 02/13] accel/habanalabs: remove hop size from asic properties

2024-02-20 Thread Oded Gabbay
From: Farah Kassabri The hop size related properties is a MMU properties and not asic properties. As for PMMU and HMMU we could have different sizes. Signed-off-by: Farah Kassabri Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/accel/habanalabs/common/habanalabs.h | 4

[PATCH 11/13] accel/habanalabs: handle reserved memory request when working with full FW

2024-02-20 Thread Oded Gabbay
From: Tomer Tayar Currently the reserved memory request from FW is handled when running with preboot only, but this request is relevant also when running with full FW. Modify to always handle this reservation request. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded

[PATCH 13/13] accel/habanalabs: modify pci health check

2024-02-20 Thread Oded Gabbay
. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/accel/habanalabs/common/device.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/accel/habanalabs/common/device.c b/drivers/accel/habanalabs/common/device.c index

[PATCH 08/13] accel/habanalabs: fix error print

2024-02-20 Thread Oded Gabbay
From: Dani Liberman The unmasking is for event and it can be other event than RAZWI. Signed-off-by: Dani Liberman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/accel/habanalabs/common/firmware_if.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH 04/13] accel/habanalabs/gaudi2: check extended errors according to PCIe addr_dec interrupt info

2024-02-20 Thread Oded Gabbay
From: Tomer Tayar The FW interrupt info for a PCIe addr_dec event is set correctly, so check for either global errors or razwi according to the indications there. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/accel/habanalabs/gaudi2/gaudi2.c | 18

[PATCH 06/13] accel/habanalabs: fix debugfs files permissions

2024-02-20 Thread Oded Gabbay
From: Avri Kehat debugfs files are created with permissions that don't align with the access requirements. Signed-off-by: Avri Kehat Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/accel/habanalabs/common/debugfs.c | 14 +++--- 1 file changed, 7 insertions(+), 7

[PATCH 03/13] accel/habanalabs: modify print for skip loading linux FW to debug log

2024-02-20 Thread Oded Gabbay
, so replace the used dev_info() with dev_dbg(). Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/accel/habanalabs/common/firmware_if.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/accel/habanalabs/common/firmware_if.c b

[PATCH 01/13] accel/habanalabs/gaudi2: use single function to compare FW versions

2024-02-20 Thread Oded Gabbay
()). In addition, this generic function now considers also the sub-minor FW version and also remove dead code resulting in deprecated FW versions compatibility. Signed-off-by: Ohad Sharabi Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/accel/habanalabs/common/firmware_if.c | 25

Re: [PATCH] accel/habanalabs: use kcalloc() instead of kzalloc()

2024-01-25 Thread Oded Gabbay
On 22/01/2024 18:45, Gustavo A. R. Silva wrote: On 1/20/24 09:10, Erick Archer wrote: As noted in the "Deprecated Interfaces, Language Features, Attributes, and Conventions" documentation [1], size calculations (especially multiplication) should not be performed in memory allocator (or

Re: [PATCH][next] accel/habanalabs: remove redundant assignment to pointer 'input'

2024-01-09 Thread Oded Gabbay
G_BASE; if (params->enable) { - input = params->input; + struct hl_debug_params_spmu *input = params->input; if (!input) return -EINVAL; Thanks for the patch. Reviewed-by: Oded Gabbay Applied to -next. Oded

[PATCH 2/2] accel/habanalabs/gaudi2: fail memory memset when failing to copy QM packet to device

2024-01-09 Thread Oded Gabbay
From: Tomer Tayar gaudi2_memset_memory_chunk_using_edma_qm() calls the access_dev_mem() ASIC function, but ignores its return value. Add this missing check. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/accel/habanalabs/gaudi2/gaudi2.c | 10

[PATCH 1/2] accel/habanalabs: remove call to deprecated function

2024-01-09 Thread Oded Gabbay
From: Dani Liberman In newer kernel versions, irq_set_affinity_hint() is deprecated. Instead, use the newer version which is irq_set_affinity_and_hint(). Signed-off-by: Dani Liberman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/accel/habanalabs/common/device.c | 2

Re: [PATCH] drivers/accel/habanalabs: Remove unnecessary braces from if statement

2024-01-03 Thread Oded Gabbay
he patch. Reviewed-by: Oded Gabbay Applied to -next. Oded

[PATCH 4/6] accel/habanalabs: fix DRAM BAR base address calculation

2024-01-02 Thread Oded Gabbay
From: Tomer Tayar When the DRAM region size in the BAR is not a power of 2, calculating the corresponding BAR base address should be done using the offset from the DRAM start address, and not using directly the DRAM address. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off

[PATCH 6/6] accel/habanalabs: abort device reset for consecutive heartbeat failures

2024-01-02 Thread Oded Gabbay
in such a case. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/accel/habanalabs/common/device.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/accel/habanalabs/common/device.c b/drivers/accel/habanalabs

[PATCH 5/6] accel/habanalabs/gaudi2: move HMMU page tables to device memory

2024-01-02 Thread Oded Gabbay
transaction will read the hops from there instead of going to the host. Signed-off-by: Farah Kassabri Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/accel/habanalabs/common/habanalabs.h | 26 ++ drivers/accel/habanalabs/common/hw_queue.c| 17 + drivers/accel/habanalabs/common

[PATCH 3/6] accel/habanalabs: increase HL_MAX_STR to 64 bytes to avoid warnings

2024-01-02 Thread Oded Gabbay
From: Koby Elbaz Fix a warning of a buffer overflow: ‘snprintf’ output between 38 and 47 bytes into a destination of size 32 Signed-off-by: Koby Elbaz Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/accel/habanalabs/common/habanalabs.h | 2 +- 1 file changed, 1 insertion

[PATCH 2/6] accel/habanalabs/gaudi2: add interrupt affinity for user interrupts

2024-01-02 Thread Oded Gabbay
are allocated and managed by the driver and therefore, the user expects the driver to initialize them properly, which also includes setting the affinity to the related CPU cores of the device's NUMA node to get maximum performance. Signed-off-by: Dani Liberman Reviewed-by: Oded Gabbay Signed-off

[PATCH 1/6] accel/habanalabs: check failure of eventfd_signal

2024-01-02 Thread Oded Gabbay
From: Dafna Hirschfeld print err log if eventfd_signal return val is not 1 as expected. Signed-off-by: Dafna Hirschfeld Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/accel/habanalabs/common/device.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions

[git pull] habanalabs for drm-next-6.8

2023-12-19 Thread Oded Gabbay
accel/habanalabs: fix EQ heartbeat mechanism Moti Haimovski (1): accel/habanalabs/gaudi2: add signed dev info uAPI Oded Gabbay (1): accel/habanalabs: add support for Gaudi2C device Ofir Bitton (1): accel/habanalabs: remove 'get temperature' debug print Tomer Tayar (8

Re: [PATCH v2] habanalabs: fix information leak in sec_attest_info()

2023-12-19 Thread Oded Gabbay
c(sizeof(*info), GFP_KERNEL); > if (!info) { > rc = -ENOMEM; > goto free_sec_attest_info; > -- > 2.34.1 > Reviewed-by: Oded Gabbay Applied to -next. Thanks, Oded

Re: [PULL] drm-xe-next

2023-12-18 Thread Oded Gabbay
ks, > Rodrigo. Hi Rodrigo, You and the team did a great job on bringing the driver to this stage. Congrats! I reviewed a large part of the driver, mainly focusing on init/fini, ioctls, memory management, dma-buf. There were multiple issues raised and all of them were fixed/answered to my satis

Re: [PULL] drm-xe-next

2023-12-18 Thread Oded Gabbay
, dma-buf. There were multiple issues raised and all of them were fixed/answered to my satisfaction. For the PR: Acked-by: Oded Gabbay Thanks, Oded > > The following changes since commit a60501d7c2d3e70b3545b9b96576628e369d8e85: > > Merge tag 'drm-misc-next-2023-12-07' of > git

Re: [PULL] drm-xe-next

2023-12-18 Thread Oded Gabbay
rigo. Hi Rodrigo, You and the team did a great job on bringing the driver to this stage. Congrats! I reviewed a large part of the driver, mainly focusing on init/fini, ioctls, memory management, dma-buf. There were multiple issues raised and all of them were fixed/answered to my s

[PATCH 3/5] accel/habanalabs: update debugfs-driver-habanalabs with the device-name directory

2023-12-07 Thread Oded Gabbay
From: Tomer Tayar The device debugfs directory was modified to be named as the parent device name. Update the paths accordingly. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- .../ABI/testing/debugfs-driver-habanalabs | 72 +-- 1 file

[PATCH 4/5] accel/habanalabs: add parent_device sysfs attribute

2023-12-07 Thread Oded Gabbay
debugfs. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- Documentation/ABI/testing/sysfs-driver-habanalabs | 6 ++ drivers/accel/habanalabs/common/habanalabs.h | 3 +++ drivers/accel/habanalabs/common/sysfs.c | 9 + 3 files changed

[PATCH 5/5] accel/habanalabs/gaudi2: avoid overriding existing undefined opcode data

2023-12-07 Thread Oded Gabbay
the partial info for the upper QMAN. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/accel/habanalabs/gaudi2/gaudi2.c | 40 +++- 1 file changed, 19 insertions(+), 21 deletions(-) diff --git a/drivers/accel/habanalabs/gaudi2/gaudi2.c b

[PATCH 2/5] accel/habanalabs/gaudi2: add zero padding when printing QM CP instruction

2023-12-07 Thread Oded Gabbay
Gabbay Signed-off-by: Oded Gabbay --- drivers/accel/habanalabs/gaudi2/gaudi2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/accel/habanalabs/gaudi2/gaudi2.c b/drivers/accel/habanalabs/gaudi2/gaudi2.c index bf537c2082cd..f81b57649b00 100644 --- a/drivers/accel

[PATCH 1/5] accel/habanalabs: report 3 instances of Infineon second stage

2023-12-07 Thread Oded Gabbay
From: Ariel Suller Infineon controller second stage has 3 instances that their version need to be reported by driver. Signed-off-by: Ariel Suller Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/accel/habanalabs/common/sysfs.c | 20 ++-- 1 file changed, 18

[PATCH 2/2] accel/habanalabs/gaudi2: add signed dev info uAPI

2023-11-30 Thread Oded Gabbay
From: Moti Haimovski User will provide a nonce via the INFO ioctl, and will retrieve the signed device info generated using given nonce. Signed-off-by: Moti Haimovski Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/accel/habanalabs/common/firmware_if.c | 8 drivers

[PATCH 1/2] accel/habanalabs/gaudi2: use correct registers to dump QM CQ info

2023-11-30 Thread Oded Gabbay
-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/accel/habanalabs/gaudi2/gaudi2.c | 12 ++-- .../habanalabs/include/gaudi2/asic_reg/gaudi2_regs.h | 12 ++-- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/accel

[PATCH 09/10] accel/habanalabs: print error code when mapping fails

2023-11-15 Thread Oded Gabbay
From: Dani Liberman Failure to map is considered a non-trivial error and we need to notify the user about it. Signed-off-by: Dani Liberman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/accel/habanalabs/common/memory.c | 7 --- 1 file changed, 4 insertions(+), 3

[PATCH 07/10] accel/habanalabs: set hard reset flag if graceful reset is skipped

2023-11-15 Thread Oded Gabbay
to an immediate reset. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/accel/habanalabs/common/device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/accel/habanalabs/common/device.c b/drivers/accel/habanalabs/common/device.c

[PATCH 10/10] accel/habanalabs: expose module id through sysfs

2023-11-15 Thread Oded Gabbay
are already accessing sysfs for topology information and it is easier for them to continue getting that information from sysfs instead of opening a file descriptor. Signed-off-by: Dani Liberman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- Documentation/ABI/testing/sysfs-driver

[PATCH 08/10] accel/habanalabs/gaudi2: get the correct QM CQ info upon an error

2023-11-15 Thread Oded Gabbay
Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/accel/habanalabs/gaudi2/gaudi2.c | 44 +-- .../include/gaudi2/asic_reg/gaudi2_regs.h | 1 + 2 files changed, 23 insertions(+), 22 deletions(-) diff --git a/drivers/accel/habanalabs/gaudi2/gaudi2.c b/drivers

[PATCH 05/10] accel/habanalabs/gaudi2: fix undef opcode reporting

2023-11-15 Thread Oded Gabbay
From: Dafna Hirschfeld currently the undefined opcode event bit in set only for lower cp and only if 'write_enable' is true. It should be set anyway and for all streams in order to report that event to userspace. Signed-off-by: Dafna Hirschfeld Reviewed-by: Oded Gabbay Signed-off-by: Oded

[PATCH 06/10] accel/habanalabs: remove 'get temperature' debug print

2023-11-15 Thread Oded Gabbay
From: Ofir Bitton The print was added long back for a specific debug and can now be removed. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/accel/habanalabs/common/hwmon.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/accel

[PATCH 04/10] accel/habanalabs: fix EQ heartbeat mechanism

2023-11-15 Thread Oded Gabbay
From: Farah Kassabri Stop rescheduling another heartbeat check when EQ heartbeat check fails as it generates confusing logs in dmesg that the heartbeat fails. Signed-off-by: Farah Kassabri Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/accel/habanalabs/common/device.c | 14

[PATCH 03/10] accel/habanalabs: add support for Gaudi2C device

2023-11-15 Thread Oded Gabbay
Gaudi2 with PCI revision ID with the value of '3' represents Gaudi2C device and should be detected and initialized as Gaudi2. Signed-off-by: Oded Gabbay --- drivers/accel/habanalabs/common/device.c | 3 +++ drivers/accel/habanalabs/common/habanalabs.h | 2 ++ drivers

[PATCH 02/10] accel/habanalabs: add log when eq event is not received

2023-11-15 Thread Oded Gabbay
the reason. Signed-off-by: Farah Kassabri Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/accel/habanalabs/common/device.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/accel/habanalabs/common/device.c b/drivers/accel/habanalabs/common/device.c

[PATCH 01/10] accel/habanalabs/gaudi2: assume hard-reset by FW upon PCIe AXI drain

2023-11-15 Thread Oded Gabbay
the driver. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/accel/habanalabs/common/habanalabs.h | 8 drivers/accel/habanalabs/gaudi2/gaudi2.c | 2 ++ 2 files changed, 10 insertions(+) diff --git a/drivers/accel/habanalabs/common

[PATCH 2/2] accel/habanalabs: update device boot error check

2023-11-01 Thread Oded Gabbay
From: Farah Kassabri Use a predefined mask which set the device critical boot errors. Driver will fail and stop its loading, only upon detecting at least one of those errors defined in this mask. Signed-off-by: Farah Kassabri Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers

[PATCH 1/2] accel/habanalabs: add pcie reset prepare/done hooks

2023-11-01 Thread Oded Gabbay
fit binary. This patch will add reset_prepare hook that will set the device to be in disabled state, so it'll be not operational, and also reset_done hook which will be called after the actual FLR handling, then it will perform hard reset. Signed-off-by: farah kassabri Reviewed-by: Oded Gabbay

[git pull] habanalabs for drm-next-6.7

2023-10-10 Thread Oded Gabbay
: rename fd_list to hpriv_list Moti Haimovski (1): accel/habanalabs/gaudi2: print power-mode changes Oded Gabbay (14): accel/habanalabs: remove pdev check on idle check accel/habanalabs: reset device if scrubbing failed accel/habanalabs/gaudi2: fix missing check of kernel

Re: [PATCH] accel/habanalabs: make hl_class constant

2023-10-10 Thread Oded Gabbay
s related code no longer exists, as we moved completely to the new accel char device class. So, I'm dropping this patch. Oded > > Cc: Dafna Hirschfeld > Cc: Dani Liberman > Cc: Koby Elbaz > Cc: Oded Gabbay > Cc: Ofir Bitton > Cc: Ohad Sharabi > Cc: Stanislaw Gruszka

[PATCH] accel/habanalabs/gaudi2: fix spmu mask creation

2023-09-28 Thread Oded Gabbay
event_types_num received from the user can be 0. In that case, the event_mask should be 0. In addition, to create a correct mask we need to match the number of event types to the bit location such that bit 0 represents a single event type, bit 1 represents 2 types and so on. Signed-off-by: Oded

[PATCH 1/3] accel/habanalabs: remove wrong doc for init_phys_pg_pack_from_userptr

2023-09-28 Thread Oded Gabbay
From: Dafna Hirschfeld The function does not pin the pages so remove that from the inline doc. Signed-off-by: Dafna Hirschfeld Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/accel/habanalabs/common/memory.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/accel

[PATCH 3/3] accel/habanalabs/gaudi2: perform hard-reset upon PCIe AXI drain event

2023-09-28 Thread Oded Gabbay
-reset upon PCIe AXI drain events. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- .../habanalabs/include/gaudi2/gaudi2_async_ids_map_extended.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/accel/habanalabs/include/gaudi2

[PATCH 2/3] accel/habanalabs: fix bug in decoder wait for cs completion

2023-09-28 Thread Oded Gabbay
-by: Oded Gabbay Signed-off-by: Oded Gabbay --- .../accel/habanalabs/common/command_submission.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/accel/habanalabs/common/command_submission.c b/drivers/accel/habanalabs/common/command_submission.c index

Re: [PATCH] accel/habanalabs: add missing debugfs function stubs

2023-09-28 Thread Oded Gabbay
041,15 @@ void hl_debugfs_set_state_dump(struct hl_device *hdev, > char *data, > > #else > > +static inline int hl_debugfs_device_init(struct hl_device *hdev) > +{ > + return 0; > +} > + > +static inline void hl_debugfs_device_fini(struct hl_device *hdev) > +{ > +} > + > static inline void hl_debugfs_add_device(struct hl_device *hdev) > { > } > -- > 2.39.2 > Reviewed-by: Oded Gabbay Applied to -next Thanks, Oded

[PATCH 5/9] accel/habanalabs: remove unused field

2023-09-26 Thread Oded Gabbay
flags in struct wait_interrupt_data is not used anywhere so remove it. Signed-off-by: Oded Gabbay --- drivers/accel/habanalabs/common/command_submission.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/accel/habanalabs/common/command_submission.c b/drivers/accel/habanalabs/common

[PATCH 4/9] accel/habanalabs/gaudi: remove unused structure definition

2023-09-26 Thread Oded Gabbay
struct gaudi_nic_status is not used anywhere in the code. Signed-off-by: Oded Gabbay --- .../habanalabs/include/gaudi/gaudi_fw_if.h| 32 --- 1 file changed, 32 deletions(-) diff --git a/drivers/accel/habanalabs/include/gaudi/gaudi_fw_if.h b/drivers/accel/habanalabs/include

[PATCH 7/9] accel/habanalabs: remove leftover code

2023-09-26 Thread Oded Gabbay
This code was added as part of a bigger feature which was never upstreamed, so remove this code. Signed-off-by: Oded Gabbay --- drivers/accel/habanalabs/common/command_submission.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/accel/habanalabs/common

[PATCH 9/9] accel/habanalabs: minor cosmetic update to habanalabs.h

2023-09-26 Thread Oded Gabbay
- Update copyright years - Align fields in struct hl_userptr - Fix comments Signed-off-by: Oded Gabbay --- drivers/accel/habanalabs/common/habanalabs.h | 31 ++-- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/drivers/accel/habanalabs/common/habanalabs.h b

[PATCH 6/9] accel/habanalabs: print device name when it is removed

2023-09-26 Thread Oded Gabbay
Notifies the user which device was removed. It is important in a server with multiple devices. Signed-off-by: Oded Gabbay --- drivers/accel/habanalabs/common/device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/accel/habanalabs/common/device.c b/drivers/accel

[PATCH 8/9] accel/habanalabs/gaudi: remove define used for simulator

2023-09-26 Thread Oded Gabbay
We don't support simulator in upstream. Signed-off-by: Oded Gabbay --- drivers/accel/habanalabs/common/habanalabs.h | 2 -- drivers/accel/habanalabs/gaudi/gaudi.c | 3 +-- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/accel/habanalabs/common/habanalabs.h b/drivers

[PATCH 3/9] accel/habanalabs: change Greco to Gaudi2

2023-09-26 Thread Oded Gabbay
Greco was not upstreamed so no point of mentioning it here. Signed-off-by: Oded Gabbay --- include/uapi/drm/habanalabs_accel.h | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/include/uapi/drm/habanalabs_accel.h b/include/uapi/drm/habanalabs_accel.h index

[PATCH 2/9] accel/habanalabs: minor cosmetics update to trace file

2023-09-26 Thread Oded Gabbay
- Update copyright years - Add missing newline at end of file Signed-off-by: Oded Gabbay --- include/trace/events/habanalabs.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/trace/events/habanalabs.h b/include/trace/events/habanalabs.h index 0d3667399d01

[PATCH 1/9] accel/habanalabs: minor cosmetics update to cpucp_if.h

2023-09-26 Thread Oded Gabbay
- Update copyright years - Align comments Signed-off-by: Oded Gabbay --- include/linux/habanalabs/cpucp_if.h | 17 +++-- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/include/linux/habanalabs/cpucp_if.h b/include/linux/habanalabs/cpucp_if.h index 84d74c4ee4d3

[PATCH 3/3] accel/habanalabs: trace dma map sgtable

2023-09-19 Thread Oded Gabbay
From: Ohad Sharabi Traces the DMA [un]map_sgtable using the new traces we added. Signed-off-by: Ohad Sharabi Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/accel/habanalabs/common/device.c | 46 +++- drivers/accel/habanalabs/common/habanalabs.h | 25

[PATCH 2/3] accel/habanalabs: add traces for dma mappings

2023-09-19 Thread Oded Gabbay
From: Ohad Sharabi In order to get a full picture of DMA mappings (e.g. to track DMAR errors), DMA mappings APIs should be covered. Signed-off-by: Ohad Sharabi Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- include/trace/events/habanalabs.h | 43 +++ 1

[PATCH 1/3] accel/habanalabs: remove unused asic functions

2023-09-19 Thread Oded Gabbay
asic_dma_{un}map_single() asic-specific functions are no longer called from the common code, so delete these functions. In addition, delete the gaudi2 implementation as they are also not called. Signed-off-by: Oded Gabbay --- drivers/accel/habanalabs/common/habanalabs.h | 8 drivers

[PATCH 07/10] accel/habanalabs: add debug prints to dump content of SG table for dma-buf

2023-09-18 Thread Oded Gabbay
From: Tomer Tayar Add debug prints to dump the content of the SG table which is prepared when the dma-buf map op is called. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/accel/habanalabs/common/memory.c | 7 +++ 1 file changed, 7 insertions

[PATCH 04/10] accel/habanalabs: fix SG table creation for dma-buf mapping

2023-09-18 Thread Oded Gabbay
that is composed of several pages. In these cases, redundant entries will be added to the SG table. Modify the method that the number of entries is calculated, and the way they are prepared. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/accel/habanalabs/common

[PATCH 10/10] accel/habanalabs: update boot status print

2023-09-18 Thread Oded Gabbay
From: Ariel Suller FW shutdown preparation status was added to spec. Signed-off-by: Ariel Suller Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/accel/habanalabs/common/firmware_if.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/accel/habanalabs/common

[PATCH 09/10] accel/habanalabs: extend preboot timeout when preboot might take longer

2023-09-18 Thread Oded Gabbay
-by: Dafna Hirschfeld Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/accel/habanalabs/common/firmware_if.c | 26 --- drivers/accel/habanalabs/common/habanalabs.h | 3 +++ drivers/accel/habanalabs/gaudi2/gaudi2.c | 2 ++ drivers/accel/habanalabs/gaudi2/gaudi2P.h

[PATCH 05/10] accel/habanalabs: set hl_dmabuf_priv.device_address only when needed

2023-09-18 Thread Oded Gabbay
e a device virtual address. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/accel/habanalabs/common/habanalabs.h | 8 drivers/accel/habanalabs/common/memory.c | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/dri

[PATCH 08/10] accel/habanalabs: add fw status SHUTDOWN_PREP

2023-09-18 Thread Oded Gabbay
From: Dafna Hirschfeld update hl_boot_if.h from specs to include CPU_BOOT_STATUS_FW_SHUTDOWN_PREP Signed-off-by: Dafna Hirschfeld Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- include/linux/habanalabs/hl_boot_if.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/linux

[PATCH 06/10] accel/habanalabs: add missing offset handling for dma-buf

2023-09-18 Thread Oded Gabbay
the dma-buf and the SG table it prepared. Add the missing offset handling. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/accel/habanalabs/common/habanalabs.h | 3 + drivers/accel/habanalabs/common/memory.c | 75 +++- 2 files changed

[PATCH 02/10] accel/habanalabs: optimize timestamp registration handler

2023-09-18 Thread Oded Gabbay
-by: Oded Gabbay --- .../habanalabs/common/command_submission.c| 83 +++ drivers/accel/habanalabs/common/device.c | 59 - drivers/accel/habanalabs/common/habanalabs.h | 27 ++ drivers/accel/habanalabs/common/irq.c | 77 ++--- 4 files changed

[PATCH 03/10] accel/habanalabs: split user interrupts pending list

2023-09-18 Thread Oded Gabbay
will be handled in a workqueue. Signed-off-by: farah kassabri Reviewed-by: Tomer Tayar Signed-off-by: Oded Gabbay --- .../habanalabs/common/command_submission.c| 235 ++ drivers/accel/habanalabs/common/habanalabs.h | 12 +- drivers/accel/habanalabs/common/irq.c | 89

[PATCH 01/10] accel/habanalabs: fix bug in timestamp interrupt handling

2023-09-18 Thread Oded Gabbay
the free_node information. This might lead to unpleasant scenario where the new registration thread detects the record as free to use, and change the cq buff address. That will cause the free_node to get the wrong buffer address to put refcount to. Signed-off-by: farah kassabri Reviewed-by: Oded Gabbay

[PATCH 13/14] accel/habanalabs: export dma-buf only if size/offset multiples of PAGE_SIZE

2023-09-18 Thread Oded Gabbay
the user be aware of it, accept only size and offset which are multiple of PAGE_SIZE. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/accel/habanalabs/common/memory.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git

[PATCH 14/14] accel/habanalabs: tiny refactor of hl_map_dmabuf()

2023-09-18 Thread Oded Gabbay
to understand the meaning of the parameters. To make it clearer, assign the required values into local variables with explicit names, and use the variables when calling the function. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/accel/habanalabs/common

[PATCH 08/14] accel/habanalabs/gaudi2: handle eq health heartbeat check

2023-09-18 Thread Oded Gabbay
the heartbeat mechanism: Expand the heartbeat mechanism to monitor a new event that will be sent from FW upon receiving heartbeat message. that way driver can know that the eq is working or not. Signed-off-by: farah kassabri Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/accel

[PATCH 09/14] accel/habanalabs/gaudi2: add eq health check using irq

2023-09-18 Thread Oded Gabbay
some issue with EQ like EQ_FULL, it'll raise that interrupt and driver should reset the device. Driver will inform the FW which msix index to use through the already existing handshake mechanism which will send msix info message to fw. Signed-off-by: farah kassabri Reviewed-by: Oded Gabbay Signed

[PATCH 03/14] accel/habanalabs: move cpucp interface to linux/habanalabs

2023-09-18 Thread Oded Gabbay
From: David Meriin The CPUCP interface is moved to a shared folder outside of accel as a pre-requisite to upstream the NIC drivers that will also include this file. Signed-off-by: David Meriin Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- MAINTAINERS

[PATCH 12/14] accel/habanalabs: use exported size from dma_buf and not from phys_pg_pack

2023-09-18 Thread Oded Gabbay
. Remove this member from the phys_pg_pack structure, and simply use the size in the dma-buf object as the exported size when mapping. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/accel/habanalabs/common/habanalabs.h | 2 -- drivers/accel/habanalabs

[PATCH 07/14] accel/habanalabs/gaudi2: print power-mode changes

2023-09-18 Thread Oded Gabbay
From: Moti Haimovski Print to kernel log any device power mode changes events reported by the FW. Signed-off-by: Moti Haimovski Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/accel/habanalabs/gaudi2/gaudi2.c | 12 .../habanalabs/include/gaudi2

[PATCH 10/14] accel/habanalabs: prevent sending heartbeat before events are enabled

2023-09-18 Thread Oded Gabbay
, then the EQ health check will fail and reset the device. Signed-off-by: farah kassabri Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/accel/habanalabs/common/device.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/accel/habanalabs/common

[PATCH 11/14] accel/habanalabs: always pass exported size to alloc_sgt_from_device_pages()

2023-09-18 Thread Oded Gabbay
This makes alloc_sgt_from_device_pages() less clear, because the exported size parameter is not understood as a restriction on the pages' size. Modify to always pass the exported size explicitly. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/accel/

[PATCH 06/14] accel/habanalabs: add tsc clock sampling to clock sync info

2023-09-18 Thread Oded Gabbay
From: Hen Alon Add tsc clock to clock sync info, to enable using this clock for sampling and sync it with device time. Signed-off-by: Hen Alon Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/accel/habanalabs/common/habanalabs_ioctl.c | 1 + include/uapi/drm

[PATCH 05/14] accel/habanalabs: fix inline doc typos

2023-09-18 Thread Oded Gabbay
From: Dafna Hirschfeld Fix two typos Signed-off-by: Dafna Hirschfeld Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/accel/habanalabs/common/device.c | 2 +- drivers/accel/habanalabs/common/habanalabs.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH 04/14] accel/habanalabs: disable events ioctls on control device

2023-09-18 Thread Oded Gabbay
From: Dafna Hirschfeld Because it is not used and also, for graceful reset to work those ioctls should run on the compute device. Signed-off-by: Dafna Hirschfeld Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/accel/habanalabs/common/device.c | 13

[PATCH 01/14] accel/habanalabs: improve etf configuration

2023-09-18 Thread Oded Gabbay
From: Benjamin Dotan coresight ETF blocks have different size. As a result, sync packets need to be aligned based on fifo size. Signed-off-by: Benjamin Dotan Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/accel/habanalabs/gaudi2/gaudi2_coresight.c | 9 - 1 file

  1   2   3   4   5   6   7   8   9   10   >