aboutsummaryrefslogtreecommitdiff
path: root/drivers/accel/habanalabs/common
AgeCommit message (Collapse)AuthorFilesLines
2024-06-23accel/habanalabs: gradual sleep in polling memory macroDidi Freiman1-2/+9
It’s better to avoid long sleeps right from the beginning of the polling since the data may be available much sooner than the sleep period. Because polling host memory is inexpensive, this change gradually increases the sleep time up to the user-requested period. Signed-off-by: Didi Freiman <[email protected]> Reviewed-by: Ofir Bitton <[email protected]> Signed-off-by: Ofir Bitton <[email protected]>
2024-06-23accel/habanalabs: move heartbeat work initialization to early initTomer Tayar1-2/+4
The device heartbeat work is currently initialized at device_heartbeat_schedule() which is called at the end of hl_device_init(). However hl_device_init() can fail at a previous step, and in such a case, a subsequent call to hl_device_fini() will lead to calling cleanup_resources() and accessing this work uninitialized. As there is no real need to re-initialize this work every time it is rescheduled, move this initialization to device_early_init() to be done once and early enough. Signed-off-by: Tomer Tayar <[email protected]> Reviewed-by: Ofir Bitton <[email protected]> Signed-off-by: Ofir Bitton <[email protected]>
2024-06-23accel/habanalabs: print timestamp of last PQ heartbeat on EQ heartbeat failureTomer Tayar3-12/+46
The test packet which is sent to FW for the PQ heartbeat is used also as the trigger in FW to send the EQ heartbeat event. Add the time of the last sent packet to the debug info which is printed upon a EQ heartbeat failure. Signed-off-by: Tomer Tayar <[email protected]> Reviewed-by: Ofir Bitton <[email protected]> Signed-off-by: Ofir Bitton <[email protected]>
2024-06-23accel/habanalabs: dump the EQ entries headers on EQ heartbeat failureTomer Tayar3-0/+28
Add a dump of the EQ entries headers upon a EQ heartbeat failure. Signed-off-by: Tomer Tayar <[email protected]> Reviewed-by: Ofir Bitton <[email protected]> Signed-off-by: Ofir Bitton <[email protected]>
2024-06-23accel/habanalabs: revise print on EQ heartbeat failureTomer Tayar1-9/+10
Don't print the "previous EQ index" value in case of a EQ heartbeat failure, because it is incremented along with the EQ CI and therefore redundant. In addition, as the CPU-CP PI is zeroed when it reaches a value that is twice the queue size, add a value of the CI with a similar wrap around, to make it easier to compare the values. Signed-off-by: Tomer Tayar <[email protected]> Reviewed-by: Ofir Bitton <[email protected]> Signed-off-by: Ofir Bitton <[email protected]>
2024-06-23accel/habanalabs: add more info upon cpu pkt timeoutFarah Kassabri1-3/+11
In order to have better debuggability upon encountering FW issues, We are adding additional info once CPU packet timeout expires. Signed-off-by: Farah Kassabri <[email protected]> Reviewed-by: Ofir Bitton <[email protected]> Signed-off-by: Ofir Bitton <[email protected]>
2024-06-23accel/habanalabs: additional print in device-in-use infoIlia Levi4-9/+63
When device release triggers a hard reset, there is a printout of the cause. Currently listed causes (that increment context refcount) are active command submissions and exported DMA buffer objects. In any other case, the printout emits "unknown reason". We identify and print another reason - allocated command buffers. Signed-off-by: Ilia Levi <[email protected]> Reviewed-by: Ofir Bitton <[email protected]> Signed-off-by: Ofir Bitton <[email protected]>
2024-06-23accel/habanalabs: disable EQ interrupt after disabling pciTal Cohen1-3/+4
When sending disable pci msg towards firmware, there is a possibility that an EQ packet is already pending, disabling EQ interrupt will prevent this from happening. The interrupt will be re-enabled after reset. Signed-off-by: Tal Cohen <[email protected]> Reviewed-by: Ofir Bitton <[email protected]> Signed-off-by: Ofir Bitton <[email protected]>
2024-06-23accel/habanalabs: change the heartbeat scheduling pointFarah Kassabri1-21/+33
Currently we schedule the heartbeat thread at late init, only then we set the INTS_REGISTER packet which enables events to be received from firmware. Init may take some time and we want to give firmware 2 full cycles of heartbeat thread after it received INTS_REGISTER. The patch will move the heartbeat thread scheduling to be after driver is done with all initializations. Signed-off-by: Farah Kassabri <[email protected]> Reviewed-by: Ofir Bitton <[email protected]> Signed-off-by: Ofir Bitton <[email protected]>
2024-06-23accel/habanalabs: remove timestamp registration debug printsOfir Bitton1-13/+0
There are several timestamp registration debug prints which spams the kernel log whenever dyn debug is enabled. Remove those prints. Reviewed-by: Tomer Tayar <[email protected]> Signed-off-by: Ofir Bitton <[email protected]>
2024-06-23accel/habanalabs: add cpld ts cpld_timestamp cpucpVitaly Margolin1-2/+3
Add cpld_timestamp field to cpucp_info structure and return cpld timestamp as part of cpld version Signed-off-by: Vitaly Margolin <[email protected]> Reviewed-by: Ofir Bitton <[email protected]> Signed-off-by: Ofir Bitton <[email protected]>
2024-06-23accel/habanalabs: add a common handler for clock change eventsTomer Tayar2-0/+47
As the new dynamic EQ includes clock change events which are common and not ASIC-specific, add a common handler for these events. Signed-off-by: Tomer Tayar <[email protected]> Reviewed-by: Ofir Bitton <[email protected]> Signed-off-by: Ofir Bitton <[email protected]>
2024-06-23accel/habanalabs/gaudi2: add GAUDI2D revision supportFarah Kassabri5-0/+14
Gaudi2 with PCI revision ID with the value of '4' represents Gaudi2D device and should be detected and initialized as Gaudi2. Signed-off-by: Farah Kassabri <[email protected]> Reviewed-by: Ofir Bitton <[email protected]> Signed-off-by: Ofir Bitton <[email protected]>
2024-06-23accel/habanalabs: move hl_eq_heartbeat_event_handle() to common codeTomer Tayar2-0/+7
hl_eq_heartbeat_event_handle() doesn't have ASIC specific code, and therefore can be moved from Gaudi2-only code to common code, and possibly used for other ASICs. Signed-off-by: Tomer Tayar <[email protected]> Reviewed-by: Ofir Bitton <[email protected]> Signed-off-by: Ofir Bitton <[email protected]>
2024-06-23accel/habanalabs: add an EQ size ASIC propertyTomer Tayar2-3/+10
Future supported ASICs might use the dynamic EQ mechanism with the firmware, and in that case the EQ size won't be equal to the default HL_EQ_SIZE_IN_BYTES value. Add an ASIC property to enable overriding this value. Signed-off-by: Tomer Tayar <[email protected]> Reviewed-by: Ofir Bitton <[email protected]> Signed-off-by: Ofir Bitton <[email protected]>
2024-06-23accel/habanalabs: check for errors after preboot is readyFarah Kassabri1-12/+12
Driver should check and report any fatal errors detected by preboot, before it attempts to load the boot fit. Some errors may cause the driver to stop the boot process and mark the device as unusable. This check will allow the driver to fail and print the error reported by preboot and skip the time wasting attempt of trying to load the boot fit, which will fail due to the error. Signed-off-by: Farah Kassabri <[email protected]> Reviewed-by: Ofir Bitton <[email protected]> Signed-off-by: Ofir Bitton <[email protected]>
2024-06-23accel/habanalabs: use msg_header instead of desc_headerIgal Zeltser1-3/+3
Struct comms_desc_header is deprecated and replaced by struct comms_msg_header. As a preparation for removing comms_desc_header from FW, all it's usage in code is replaced by comms_msg_header. Signed-off-by: Igal Zeltser <[email protected]> Reviewed-by: Ofir Bitton <[email protected]> Signed-off-by: Ofir Bitton <[email protected]>
2024-06-23accel/habanalabs: add heartbeat debug infoFarah Kassabri2-1/+26
It is hard to debug the reason for heartbeat check failures. As an attempt to ease this task, this patch will provide more information when this failure happens. Heartbeat checks the communication with FW, so printing the CPU queue pi/ci and the counter of how many times that event was received would help in debugging the issue. Signed-off-by: Farah Kassabri <[email protected]> Reviewed-by: Ofir Bitton <[email protected]> Signed-off-by: Ofir Bitton <[email protected]>
2024-06-23accel/habanalabs: add device name to invalidation failure msgOhad Sharabi1-3/+5
This addition helps log parsers better define the error without the need to go back and search the device name on former log lines. Signed-off-by: Ohad Sharabi <[email protected]> Reviewed-by: Ofir Bitton <[email protected]> Signed-off-by: Ofir Bitton <[email protected]>
2024-06-23accel/habanalabs: expose server type in debugfsTal Risin1-0/+5
Exposing server type through debugfs to enable easier access via scripts. Signed-off-by: Tal Risin <[email protected]> Reviewed-by: Ofir Bitton <[email protected]> Signed-off-by: Ofir Bitton <[email protected]>
2024-06-23accel/habanalabs: use parent device for trace eventsTomer Tayar4-20/+24
Trace events might still be recorded after the accel device is released, while the device name is no longer available. Modify the trace functions to use the parent device instead, which is available at that point and still informative as the device name. Signed-off-by: Tomer Tayar <[email protected]> Reviewed-by: Ofir Bitton <[email protected]> Signed-off-by: Ofir Bitton <[email protected]>
2024-06-23accel/habanalabs: no CPUCP prints on heartbeat failureOhad Sharabi4-101/+122
If we detected heartbet event while some daemon in the background send (via driver interface) CPUCP messages the dmesg will be flooded. Instead, a slight refactor in hl_fw_send_cpu_message() returns -EAGAIN when CPU is disabled (i.e. heartbeat failure) and only then. Later, all calling functions that may be invoked by user space can issue prints only if the error code is not -EAGAIN. Signed-off-by: Ohad Sharabi <[email protected]> Reviewed-by: Ofir Bitton <[email protected]> Signed-off-by: Ofir Bitton <[email protected]>
2024-06-23accel/habanalabs: restructure function that checks heartbeat receivedOhad Sharabi1-8/+8
The function returned an error code which isn't propagated up the stack (nor is it printed). The return value is only checked for =0 or !=0 which implies bool return value. The function signature is updated accordingly, renamed, and slightly refactored. Signed-off-by: Ohad Sharabi <[email protected]> Reviewed-by: Ofir Bitton <[email protected]> Signed-off-by: Ofir Bitton <[email protected]>
2024-06-23accel/habanalabs: add device name to error printDani Liberman1-7/+10
The extra info will help in better traceability and debug. Signed-off-by: Dani Liberman <[email protected]> Reviewed-by: Ofir Bitton <[email protected]> Signed-off-by: Ofir Bitton <[email protected]>
2024-06-23accel/habanalabs/gaudi2: use single function to compare FW versionsOhad Sharabi2-19/+26
Currently, the code contains 2 types of FW version comparison functions: - hl_is_fw_sw_ver_[below/equal_or_greater]() - gaudi2 specific function of the type gaudi2_is_fw_ver_[below/above]x_y_z() Moreover, some functions use the inner FW version which shuold be only stage during development but not version dependencies. Finally, some tests are done to deprecated FW version to which LKD should hold no compatibility. This commit aligns all APIs to a single function that just compares the version and return an integers indicator (similar in some way to strcmp()). 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 <[email protected]> Reviewed-by: Ofir Bitton <[email protected]> Signed-off-by: Ofir Bitton <[email protected]>
2024-02-26accel/habanalabs: modify pci health checkOfir Bitton1-3/+3
Today we read PCI VENDOR-ID in order to make sure PCI link is healthy. Apparently the VENDOR-ID might be stored on host and hence, when we read it we might not access the PCI bus. In order to make sure PCI health check is reliable, we will start checking the DEVICE-ID instead. Signed-off-by: Ofir Bitton <[email protected]> Reviewed-by: Oded Gabbay <[email protected]> Signed-off-by: Oded Gabbay <[email protected]>
2024-02-26accel/habanalabs: keep explicit size of reserved memory for FWTomer Tayar2-2/+2
The reserved memory for FW is currently saved in an ASIC property in units of MB, just like the value that comes from FW. Except the fact that it is not clear from the property's name, it means also that a calculation to actual size is required everywhere that it is used. Modify the property to hold the size in bytes. Signed-off-by: Tomer Tayar <[email protected]> Reviewed-by: Oded Gabbay <[email protected]> Reviewed-by: Carl Vanderlip <[email protected]> Signed-off-by: Oded Gabbay <[email protected]>
2024-02-26accel/habanalabs: handle reserved memory request when working with full FWTomer Tayar1-11/+8
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 <[email protected]> Reviewed-by: Oded Gabbay <[email protected]> Reviewed-by: Carl Vanderlip <[email protected]> Signed-off-by: Oded Gabbay <[email protected]>
2024-02-26accel/habanalabs/hwmon: rate limit errors user can generateOfir Bitton1-14/+15
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 <[email protected]> Reviewed-by: Oded Gabbay <[email protected]> Reviewed-by: Carl Vanderlip <[email protected]> Signed-off-by: Oded Gabbay <[email protected]>
2024-02-26accel/habanalabs: fix error printDani Liberman1-2/+2
The unmasking is for event and it can be other event than RAZWI. Signed-off-by: Dani Liberman <[email protected]> Reviewed-by: Oded Gabbay <[email protected]> Reviewed-by: Carl Vanderlip <[email protected]> Signed-off-by: Oded Gabbay <[email protected]>
2024-02-26accel/habanalabs: initialize maybe-uninitialized variablesTal Risin1-2/+2
Prevent static analysis warning. Signed-off-by: Tal Risin <[email protected]> Reviewed-by: Oded Gabbay <[email protected]> Reviewed-by: Carl Vanderlip <[email protected]> Signed-off-by: Oded Gabbay <[email protected]>
2024-02-26accel/habanalabs: fix debugfs files permissionsAvri Kehat1-7/+7
debugfs files are created with permissions that don't align with the access requirements. Signed-off-by: Avri Kehat <[email protected]> Reviewed-by: Oded Gabbay <[email protected]> Reviewed-by: Carl Vanderlip <[email protected]> Signed-off-by: Oded Gabbay <[email protected]>
2024-02-26accel/habanalabs: fix glbl error cause handlingTomer Tayar3-12/+28
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 <[email protected]> Reviewed-by: Oded Gabbay <[email protected]> Reviewed-by: Carl Vanderlip <[email protected]> Signed-off-by: Oded Gabbay <[email protected]>
2024-02-26accel/habanalabs: modify print for skip loading linux FW to debug logTomer Tayar1-1/+1
Skip loading a linux FW image into the device with the current supported ASICs is done for test purposes only. Moreover, for future supported ASICs it is possible that there won't be a need to load such an image. The print in such a case is therefore not needed in most cases, so replace the used dev_info() with dev_dbg(). Signed-off-by: Tomer Tayar <[email protected]> Reviewed-by: Oded Gabbay <[email protected]> Reviewed-by: Carl Vanderlip <[email protected]> Signed-off-by: Oded Gabbay <[email protected]>
2024-02-26accel/habanalabs: remove hop size from asic propertiesFarah Kassabri3-27/+23
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 <[email protected]> Reviewed-by: Oded Gabbay <[email protected]> Reviewed-by: Carl Vanderlip <[email protected]> Signed-off-by: Oded Gabbay <[email protected]>
2024-02-26accel/habanalabs: use kcalloc() instead of kzalloc()Erick Archer1-1/+1
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 similar) function arguments due to the risk of them overflowing. This could lead to values wrapping around and a smaller allocation being made than the caller was expecting. Using those allocations could lead to linear overflows of heap memory and other misbehaviors. So, use the purpose specific kcalloc() function instead of the argument size * count in the kzalloc() function. Link: https://www.kernel.org/doc/html/next/process/deprecated.html#open-coded-arithmetic-in-allocator-arguments [1] Link: https://github.com/KSPP/linux/issues/162 Signed-off-by: Erick Archer <[email protected]> Reviewed-by: Gustavo A. R. Silva <[email protected]> Signed-off-by: Oded Gabbay <[email protected]>
2024-02-26accel/habanalabs: remove call to deprecated functionDani Liberman1-1/+1
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 <[email protected]> Reviewed-by: Oded Gabbay <[email protected]> Signed-off-by: Oded Gabbay <[email protected]>
2024-02-26accel/habanalabs: Remove unnecessary braces from if statementMalkoot Khan1-2/+1
The coding style in the Linux kernel prefers not to use braces for single-statement if conditions. This patch removes the unnecessary braces from an if statement in the file drivers/accel/habanalabs/common/command_submission.c, which also resolves a coding style warning. Signed-off-by: Malkoot Khan <[email protected]> Reviewed-by: Oded Gabbay <[email protected]> Signed-off-by: Oded Gabbay <[email protected]>
2024-02-26accel/habanalabs/gaudi2: move HMMU page tables to device memoryFarah Kassabri6-311/+647
Currently the HMMU page tables reside in the host memory, which will cause host access from the device for every page walk. This can affect PCIe bandwidth in certain scenarios. To prevent that problem, HMMU page tables will be moved to the device memory so the miss transaction will read the hops from there instead of going to the host. Signed-off-by: Farah Kassabri <[email protected]> Reviewed-by: Oded Gabbay <[email protected]> Signed-off-by: Oded Gabbay <[email protected]>
2024-02-26accel/habanalabs: abort device reset for consecutive heartbeat failuresTomer Tayar1-6/+8
The mechanism of aborting device reset for consecutive fatal errors is currently only for fatal errors that are reported by FW. A non-responsive FW and consecutive heartbeat failures is also considered fatal, so add them as well to this mechanism to avoid recurring device reset in such a case. Signed-off-by: Tomer Tayar <[email protected]> Reviewed-by: Oded Gabbay <[email protected]> Signed-off-by: Oded Gabbay <[email protected]>
2024-02-26accel/habanalabs: fix DRAM BAR base address calculationTomer Tayar1-1/+2
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 <[email protected]> Reviewed-by: Oded Gabbay <[email protected]> Signed-off-by: Oded Gabbay <[email protected]>
2024-02-26accel/habanalabs: increase HL_MAX_STR to 64 bytes to avoid warningsKoby Elbaz1-1/+1
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 <[email protected]> Reviewed-by: Oded Gabbay <[email protected]> Signed-off-by: Oded Gabbay <[email protected]>
2024-02-26accel/habanalabs/gaudi2: add interrupt affinity for user interruptsDani Liberman2-0/+37
User interrupts are MSIx interrupts coming from Gaudi2, that have specific range of IDs and are assigned to the sole use of the user process that opened the Gaudi2 device (reminder: there can be only a single user process running on Gaudi2 at any given time). The interrupts 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 <[email protected]> Reviewed-by: Oded Gabbay <[email protected]> Signed-off-by: Oded Gabbay <[email protected]>
2024-01-12Merge tag 'drm-next-2024-01-10' of git://anongit.freedesktop.org/drm/drmLinus Torvalds9-103/+206
Pull drm updates from Dave Airlie: "This contains two major new drivers: - imagination is a first driver for Imagination Technologies devices, it only covers very specific devices, but there is hope to grow it - xe is a reboot of the i915 GPU (shares display) side using a more upstream focused development model, and trying to maximise code sharing. It's not enabled for any hw by default, and will hopefully get switched on for Intel's Lunarlake. This also drops a bunch of the old UMS ioctls. It's been dead long enough. amdgpu has a bunch of new color management code that is being used in the Steam Deck. amdgpu also has a new ACPI WBRF interaction to help avoid radio interference. Otherwise it's the usual lots of changes in lots of places. Detailed summary: new drivers: - imagination - new driver for Imagination Technologies GPU - xe - new driver for Intel GPUs using core drm concepts core: - add CLOSE_FB ioctl - remove old UMS ioctls - increase max objects to accomodate AMD color mgmt encoder: - create per-encoder debugfs directory edid: - split out drm_eld - SAD helpers - drop edid_firmware module parameter format-helper: - cache format conversion buffers sched: - move from kthread to workqueue - rename some internals - implement dynamic job-flow control gpuvm: - provide more features to handle GEM objects client: - don't acquire module reference displayport: - add mst path property documentation fdinfo: - alignment fix dma-buf: - add fence timestamp helper - add fence deadline support bridge: - transparent aux-bridge for DP/USB-C - lt8912b: add suspend/resume support and power regulator support panel: - edp: AUO B116XTN02, BOE NT116WHM-N21,836X2, NV116WHM-N49 - chromebook panel support - elida-kd35t133: rework pm - powkiddy RK2023 panel - himax-hx8394: drop prepare/unprepare and shutdown logic - BOE BP101WX1-100, Powkiddy X55, Ampire AM8001280G - Evervision VGG644804, SDC ATNA45AF01 - nv3052c: register docs, init sequence fixes, fascontek FS035VG158 - st7701: Anbernic RG-ARC support - r63353 panel controller - Ilitek ILI9805 panel controller - AUO G156HAN04.0 simplefb: - support memory regions - support power domains amdgpu: - add new 64-bit sequence number infrastructure - add AMD specific color management - ACPI WBRF support for RF interference handling - GPUVM updates - RAS updates - DCN 3.5 updates - Rework PCIe link speed handling - Document GPU reset types - DMUB fixes - eDP fixes - NBIO 7.9/7.11 updates - SubVP updates - XGMI PCIe state dumping for aqua vanjaram - GFX11 golden register updates - enable tunnelling on high pri compute amdkfd: - Migrate TLB flushing logic to amdgpu - Trap handler fixes - Fix restore workers handling on suspend/resume - Fix possible memory leak in pqm_uninit() - support import/export of dma-bufs using GEM handles radeon: - fix possible overflows in command buffer checking - check for errors in ring_lock i915: - reorg display code for reuse in xe driver - fdinfo memory stats printing - DP MST bandwidth mgmt improvements - DP panel replay enabling - MTL C20 phy state verification - MTL DP DSC fractional bpp support - Audio fastset support - use dma_fence interfaces instead of i915_sw_fence - Separate gem and display code - AUX register macro refactoring - Separate display module/device parameters - Move display capabilities debugfs under display - Makefile cleanups - Register cleanups - Move display lock inits under display/ - VLV/CHV DPIO PHY register and interface refactoring - DSI VBT sequence refactoring - C10/C20 PHY PLL hardware readout - DPLL code cleanups - Cleanup PXP plane protection checks - Improve display debug msgs - PSR selective fetch fixes/improvements - DP MST fixes - Xe2LPD FBC restrictions removed - DGFX uses direct VBT pin mapping - more MTL WAs - fix MTL eDP bug - eliminate use of kmap_atomic habanalabs: - sysfs entry to identify a device minor id with debugfs path - sysfs entry to expose device module id - add signed device info retrieval through INFO ioctl - add Gaudi2C device support - pcie reset prepare/done hooks msm: - Add support for SDM670, SM8650 - Handle the CFG interconnect to fix the obscure hangs / timeouts - Kconfig fix for QMP dependency - use managed allocators - DPU: SDM670, SM8650 support - DPU: Enable SmartDMA on SM8350 and SM8450 - DP: enable runtime PM support - GPU: add metadata UAPI - GPU: move devcoredumps to GPU device - GPU: convert to drm_exec ivpu: - update FW API - new debugfs file - a new NOP job submission test mode - improve suspend/resume - PM improvements - MMU PT optimizations - firmware profile frequency support - support for uncached buffers - switch to gem shmem helpers - replace kthread with threaded irqs rockchip: - rk3066_hdmi: convert to atomic - vop2: support nv20 and nv30 - rk3588 support mediatek: - use devm_platform_ioremap_resource - stop using iommu_present - MT8188 VDOSYS1 display support panfrost: - PM improvements - improve interrupt handling as poweroff qaic: - allow to run with single MSI - support host/device time sync - switch to persistent DRM devices exynos: - fix potential error pointer dereference - fix wrong error checking - add missing call to drm_atomic_helper_shutdown omapdrm: - dma-fence lockdep annotation fix tidss: - dma-fence lockdep annotation fix - support for AM62A7 v3d: - BCM2712 - rpi5 support - fdinfo + gputop support - uapi for CPU job handling virtio-gpu: - add context debug name" * tag 'drm-next-2024-01-10' of git://anongit.freedesktop.org/drm/drm: (2340 commits) drm/amd/display: Allow z8/z10 from driver drm/amd/display: fix bandwidth validation failure on DCN 2.1 drm/amdgpu: apply the RV2 system aperture fix to RN/CZN as well drm/amd/display: Move fixpt_from_s3132 to amdgpu_dm drm/amd/display: Fix recent checkpatch errors in amdgpu_dm Revert "drm/amdkfd: Relocate TBA/TMA to opposite side of VM hole" drm/amd/display: avoid stringop-overflow warnings for dp_decide_lane_settings() drm/amd/display: Fix power_helpers.c codestyle drm/amd/display: Fix hdcp_log.h codestyle drm/amd/display: Fix hdcp2_execution.c codestyle drm/amd/display: Fix hdcp_psp.h codestyle drm/amd/display: Fix freesync.c codestyle drm/amd/display: Fix hdcp_psp.c codestyle drm/amd/display: Fix hdcp1_execution.c codestyle drm/amd/pm/smu7: fix a memleak in smu7_hwmgr_backend_init drm/amdkfd: Fix iterator used outside loop in 'kfd_add_peer_prop()' drm/amdgpu: Drop 'fence' check in 'to_amdgpu_amdkfd_fence()' drm/amdkfd: Confirm list is non-empty before utilizing list_first_entry in kfd_topology.c drm/amdgpu: Fix '*fw' from request_firmware() not released in 'amdgpu_ucode_request()' drm/amdgpu: Fix variable 'mca_funcs' dereferenced before NULL check in 'amdgpu_mca_smu_get_mca_entry()' ...
2023-12-19accel/habanalabs: fix information leak in sec_attest_info()Xingyuan Mo1-1/+1
This function may copy the pad0 field of struct hl_info_sec_attest to user mode which has not been initialized, resulting in leakage of kernel heap data to user mode. To prevent this, use kzalloc() to allocate and zero out the buffer, which can also eliminate other uninitialized holes, if any. Fixes: 0c88760f8f5e ("habanalabs/gaudi2: add secured attestation info uapi") Signed-off-by: Xingyuan Mo <[email protected]> Reviewed-by: Oded Gabbay <[email protected]> Signed-off-by: Oded Gabbay <[email protected]>
2023-12-19accel/habanalabs: add parent_device sysfs attributeTomer Tayar2-0/+12
The device debugfs directory was modified to be named as the device-name. This name is the parent device name, i.e. either the PCI address in case of an ASIC, or the simulator device name in case of a simulator. This change makes it more difficult for a user to access the debugfs directory for a specific accel device, because he can't just use the accel minor id, but he needs to do more device-dependent operations to get the device name. To make it easier to get this name, add a 'parent_device' sysfs attribute that the user can read using the minor id before accessing debugfs. Signed-off-by: Tomer Tayar <[email protected]> Reviewed-by: Oded Gabbay <[email protected]> Signed-off-by: Oded Gabbay <[email protected]>
2023-12-19accel/habanalabs: report 3 instances of Infineon second stageAriel Suller1-2/+18
Infineon controller second stage has 3 instances that their version need to be reported by driver. Signed-off-by: Ariel Suller <[email protected]> Reviewed-by: Oded Gabbay <[email protected]> Signed-off-by: Oded Gabbay <[email protected]>
2023-12-19accel/habanalabs/gaudi2: add signed dev info uAPIMoti Haimovski3-0/+63
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 <[email protected]> Reviewed-by: Oded Gabbay <[email protected]> Signed-off-by: Oded Gabbay <[email protected]>
2023-12-19accel/habanalabs: expose module id through sysfsDani Liberman1-0/+10
Module ID exposes the physical location of the device in the server, from the pov of the devices in regard to how they are connected by internal fabric. This information is already exposed in our INFO ioctl, but there are utilities and scripts running in data-center which 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 <[email protected]> Reviewed-by: Oded Gabbay <[email protected]> Signed-off-by: Oded Gabbay <[email protected]>
2023-12-19accel/habanalabs: print error code when mapping failsDani Liberman1-3/+4
Failure to map is considered a non-trivial error and we need to notify the user about it. Signed-off-by: Dani Liberman <[email protected]> Reviewed-by: Oded Gabbay <[email protected]> Signed-off-by: Oded Gabbay <[email protected]>