Merged to drm-misc-next
On 5/7/25 10:31, Lizhi Hou wrote:
On 5/7/25 09:29, Mario Limonciello wrote:
On 5/7/2025 11:15 AM, Lizhi Hou wrote:
The latest userspace runtime allows generating commands which do not
have any argument. Remove the corresponding check in driver IOCTL to
enable this use
On 5/7/25 09:29, Mario Limonciello wrote:
On 5/7/2025 11:15 AM, Lizhi Hou wrote:
The latest userspace runtime allows generating commands which do not
have any argument. Remove the corresponding check in driver IOCTL to
enable this use case.
Signed-off-by: Lizhi Hou
Can the userspace
The latest userspace runtime allows generating commands which do not
have any argument. Remove the corresponding check in driver IOCTL to
enable this use case.
Signed-off-by: Lizhi Hou
---
drivers/accel/amdxdna/amdxdna_ctx.c | 22 --
1 file changed, 12 insertions(+), 10
On 5/6/25 23:59, Jacek Lawrynowicz wrote:
Hi,
On 5/6/2025 5:41 PM, Lizhi Hou wrote:
On 5/6/25 02:20, Jacek Lawrynowicz wrote:
Use FW names from linux-firmware repo instead of deprecated ones.
Fixes: c140244f0cfb ("accel/ivpu: Add initial Panther Lake support")
Cc: # v6.13+
Sig
On 5/6/25 02:20, Jacek Lawrynowicz wrote:
Use FW names from linux-firmware repo instead of deprecated ones.
Fixes: c140244f0cfb ("accel/ivpu: Add initial Panther Lake support")
Cc: # v6.13+
Signed-off-by: Jacek Lawrynowicz
---
drivers/accel/ivpu/ivpu_fw.c | 12 ++--
1 file changed
ad(&bo->base.base.refcount));
if (bo->base.pages)
diff --git a/drivers/accel/ivpu/ivpu_gem.h b/drivers/accel/ivpu/ivpu_gem.h
index a222a9ec9d611..0c93118c85bd3 100644
--- a/drivers/accel/ivpu/ivpu_gem.h
+++ b/drivers/accel/ivpu/ivpu_gem.h
@@ -21,6 +21,7 @@ struct ivpu_bo {
u64 vpu_addr;
u32 flags;
u32 job_status; /* Valid only for command buffer */
+ u32 ctx_id;
Reviewed-by: Lizhi Hou
bool mmu_mapped;
};
On 4/10/25 00:27, Falkowski, Maciej wrote:
On 4/9/2025 11:00 PM, Lizhi Hou wrote:
When multiple ERT_START_NPU commands are combined in one buffer, the
buffer size calculation is incorrect. Also, the condition to make sure
the buffer size is not beyond 4K is also fixed.
Fixes: aac243092b70
When multiple ERT_START_NPU commands are combined in one buffer, the
buffer size calculation is incorrect. Also, the condition to make sure
the buffer size is not beyond 4K is also fixed.
Fixes: aac243092b70 ("accel/amdxdna: Add command execution")
Signed-off-by: Lizhi Hou
---
dri
ount %u\n", file_priv->ctx.id, buffer_count);
+ ivpu_dbg(vdev, JOB, "Submit ioctl: ctx %u cmdq_id %u buf_count %u\n",
+file_priv->ctx.id, cmdq_id, buffer_count);
Reviewed-by: Lizhi Hou
job = ivpu_job_create(file_priv, engine, buffer_count);
if (!job) {
On 4/1/25 08:58, Maciej Falkowski wrote:
From: Karol Wachowski
This commit bumps FW Boot API to 3.28.3.
Bump FW Boot API ...
Please see:
https://www.kernel.org/doc/html/v6.14/process/submitting-patches.html
Lizhi
Use new preemption buffer size fields from FW header added to
firmware
flush_work(&vdev->irq_ipc_work);
+ flush_work(&vdev->irq_dct_work);
+ flush_work(&vdev->context_abort_work);
Reviewed-by: Lizhi Hou
ivpu_ipc_disable(vdev);
ivpu_mmu_disable(vdev);
}
On 3/28/25 09:16, Jeff Hugo wrote:
On 3/25/2025 2:01 PM, Lizhi Hou wrote:
Add amdxdna_gem_prime_export() and amdxdna_gem_prime_import() for BO
import and export. Register mmu notifier for imported BO as well. When
MMU_NOTIFIER_UNMAP event is received, queue work to remove the notifier.
The
k);
ms = get_instance_by_mask(file_priv, args->metric_group_mask);
@@ -218,6 +235,7 @@ int ivpu_ms_stop_ioctl(struct drm_device *dev, void *data,
struct drm_file *file
mutex_unlock(&file_priv->ms_lock);
+ ivpu_rpm_put(vdev);
Reviewed-by: Lizhi Hou
return ms ? 0 : -EINVAL;
}
On 3/28/25 01:23, Jacek Lawrynowicz wrote:
On 3/27/2025 6:38 PM, Lizhi Hou wrote:
On 3/26/25 01:06, Jacek Lawrynowicz wrote:
Hi,
On 3/25/2025 9:50 PM, Lizhi Hou wrote:
On 3/25/25 04:43, Maciej Falkowski wrote:
From: Jacek Lawrynowicz
Fix deadlock in ivpu_ms_cleanup() by preventing
On 3/26/25 01:06, Jacek Lawrynowicz wrote:
Hi,
On 3/25/2025 9:50 PM, Lizhi Hou wrote:
On 3/25/25 04:43, Maciej Falkowski wrote:
From: Jacek Lawrynowicz
Fix deadlock in ivpu_ms_cleanup() by preventing runtime resume after
file_priv->ms_lock is acquired.
During a failure in runtime res
&vdev->drm, pm_runtime_status_suspended(vdev->drm.dev));
+ drm_WARN_ON(&vdev->drm, pm_runtime_status_suspended(vdev->drm.dev) &&
+ pm_runtime_enabled(vdev->drm.dev));
Reviewed-by: Lizhi Hou
ivpu_ipc_consumer_add(vdev, &cons, channel, NULL);
Hi Jeff,
Just noticed that the driver should not use import_attach.
https://lore.kernel.org/all/20250317131923.238374-1-tzimmerm...@suse.de/
I will remove the import_attach usage and send V3 patch.
Thanks
Lizhi
On 3/21/25 12:52, Lizhi Hou wrote:
On 3/21/25 08:15, Jeff Hugo wrote:
On 3
On 3/25/25 04:43, Maciej Falkowski wrote:
From: Jacek Lawrynowicz
Fix deadlock in ivpu_ms_cleanup() by preventing runtime resume after
file_priv->ms_lock is acquired.
During a failure in runtime resume, a cold boot is executed, which
calls ivpu_ms_cleanup_all(). This function calls ivpu_ms_c
application. Use a link list to track VMAs the BO been mapped.
Signed-off-by: Lizhi Hou
---
drivers/accel/amdxdna/TODO | 1 -
drivers/accel/amdxdna/aie2_ctx.c| 65 ++--
drivers/accel/amdxdna/amdxdna_gem.c | 409 +++-
drivers/accel/amdxdna/amdxdna_gem.h
On 3/21/25 08:15, Jeff Hugo wrote:
On 3/6/2025 11:03 AM, Lizhi Hou wrote:
+struct drm_gem_object *
+amdxdna_gem_prime_import(struct drm_device *dev, struct dma_buf
*dma_buf)
+{
+ struct dma_buf_attachment *attach;
+ struct drm_gem_object *gobj;
+ struct sg_table *sgt;
+ int ret
application. Use a link list to track VMAs the BO been mapped.
Signed-off-by: Lizhi Hou
---
drivers/accel/amdxdna/TODO | 1 -
drivers/accel/amdxdna/aie2_ctx.c| 65 ++--
drivers/accel/amdxdna/amdxdna_gem.c | 397 +++-
drivers/accel/amdxdna/amdxdna_gem.h
application. Use a link list to track VMAs the BO been mapped.
Signed-off-by: Lizhi Hou
---
drivers/accel/amdxdna/TODO | 1 -
drivers/accel/amdxdna/aie2_ctx.c| 65 +++--
drivers/accel/amdxdna/amdxdna_gem.c | 320
drivers/accel/amdxdna/amdxdna_gem.h
nents = 0;
+ offf = 0;
+ offl = 0;
Reviewed-by: Lizhi Hou
size = size ? size : PAGE_SIZE;
for_each_sgtable_dma_sg(sgt_in, sg, j) {
this failure, driver checks the interrupt register before
exiting mailbox_rx_worker(). If there is a new response, driver goes back
to process it.
Signed-off-by: Lizhi Hou
---
drivers/accel/amdxdna/amdxdna_mailbox.c | 17 +
1 file changed, 13 insertions(+), 4 deletions(-)
diff --git
On 2/26/25 01:30, Jacek Lawrynowicz wrote:
Hi,
On 2/25/2025 6:26 PM, Lizhi Hou wrote:
There is a timeout failure been found during stress tests. If the firmware
generates a mailbox response right after driver clears the mailbox channel
interrupt register, the hardware will not generate an
this failure, driver checks the interrupt register before
exiting mailbox_rx_worker(). If there is a new response, driver goes back
to process it.
Signed-off-by: Lizhi Hou
---
drivers/accel/amdxdna/amdxdna_mailbox.c | 18 +++---
1 file changed, 15 insertions(+), 3 deletions(-)
diff
) + pkg_size, GFP_KERNEL);
| ^~~
Add the missing include.
Fixes: b87f920b9344 ("accel/amdxdna: Support hardware mailbox")
Signed-off-by: Su Hui
Reviewed-by: Lizhi Hou
Reviewed-by: Jeffrey Hugo
Pushed to drm-misc-fixes
Thanks,
Lizhi
>name, xdna->ddev.dev);
+ ret = drm_sched_init(sched, &args);
Reviewed-by: Lizhi Hou
if (ret) {
XDNA_ERR(xdna, "Failed to init DRM scheduler. ret %d", ret);
goto free_cmd_bufs;
ox.c
index 814b16bb1953..80b4b20addd6 100644
--- a/drivers/accel/amdxdna/amdxdna_mailbox.c
+++ b/drivers/accel/amdxdna/amdxdna_mailbox.c
@@ -12,6 +12,7 @@
#define CREATE_TRACE_POINTS
#include
+#include
Reviewed-by: Lizhi Hou
#include "amdxdna_mailbox.h"
efine AMDXDNA_AUTOSUSPEND_DELAY 5000 /* milliseconds */
+MODULE_FIRMWARE("amdnpu/1502_00/npu.sbin");
+MODULE_FIRMWARE("amdnpu/17f0_10/npu.sbin");
+MODULE_FIRMWARE("amdnpu/17f0_11/npu.sbin");
+MODULE_FIRMWARE("amdnpu/17f0_20/npu.sbin");
+
Reviewed-by: Lizhi Hou
. (drm_sched_entity_destroy)
2. Wait up to 2 seconds for pending commands.
3. Destroy hardware context and cancel the rest pending requests.
4. Wait all jobs associated with the hwctx are freed.
5. Free job resources.
Signed-off-by: Lizhi Hou
---
drivers/accel/amdxdna/aie2_ctx.c| 29
//lore.kernel.org/oe-kbuild-all/202501130921.ktqwsmlh-...@intel.com/
Signed-off-by: Lizhi Hou
---
drivers/accel/amdxdna/aie2_ctx.c | 22 +--
drivers/accel/amdxdna/aie2_error.c| 8 +++
drivers/accel/amdxdna/aie2_message.c | 10 -
drivers/acce
Fix sparse warning:
symbol 'sched_ops' was not declared. Should it be static?
Fixes: aac243092b70 ("accel/amdxdna: Add command execution")
Signed-off-by: Lizhi Hou
---
drivers/accel/amdxdna/aie2_ctx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/d
nter
Closes:
https://lore.kernel.org/dri-devel/202267d0-882e-4593-b58d-be9274592f9b@stanley.mountain/
Signed-off-by: Lizhi Hou
---
drivers/accel/amdxdna/aie2_smu.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/accel/amdxdna/aie2_smu.c b/drivers/accel/amdxdna/aie2_smu.
nter
Closes:
https://lore.kernel.org/dri-devel/202267d0-882e-4593-b58d-be9274592f9b@stanley.mountain/
Signed-off-by: Lizhi Hou
---
drivers/accel/amdxdna/aie2_smu.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/accel/amdxdna/aie2_smu.c b/drivers/accel/amdx
On 1/7/25 09:32, Maciej Falkowski wrote:
Expose NPU memory utilization info in sysfs in bytes
to show total memory used by NPU (FW + runtime).
Signed-off-by: Maciej Falkowski
---
drivers/accel/ivpu/ivpu_sysfs.c | 30 +-
1 file changed, 29 insertions(+), 1 deleti
On 1/8/25 00:40, Dan Carpenter wrote:
Hello Lizhi Hou,
Commit f4d7b8a6bc8c ("accel/amdxdna: Enhance power management
settings") from Dec 13, 2024 (linux-next), leads to the following
Smatch static checker warning:
drivers/accel/amdxdna/aie2_smu.c:68 npu1_set_dpm()
vq2wjb-...@intel.com/
Signed-off-by: Lizhi Hou
---
drivers/accel/amdxdna/aie2_pci.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/accel/amdxdna/aie2_pci.h b/drivers/accel/amdxdna/aie2_pci.h
index cc159cadff9f..f2d95531ddc2 100644
--- a/drivers/accel/amdxdna/aie2_pci.h
Use rcu_access_pointer for pid in struct drm_file. This fixes sparse
warning.
Fixes: be462c97b7df ("accel/amdxdna: Add hardware context")
Reported-by: kernel test robot
Closes:
https://lore.kernel.org/oe-kbuild-all/202412311210.lfehtzlw-...@intel.com/
Signed-off-by: Lizhi Hou
--
v_priv' was not declared. Should it be static?
Fixes: 8c9ff1b181ba ("accel/amdxdna: Add a new driver for AMD AI Engine")
Reported-by: kernel test robot
Closes:
https://lore.kernel.org/oe-kbuild-all/202412310648.dtmhggem-...@intel.com/
Signed-off-by: Lizhi Hou
---
drivers/accel
Fix sparse warning:
symbol 'npu6_dev_priv' was not declared. Should it be static?
Fixes: 273b5176ac17 ("accel/amdxdna: Add RyzenAI-npu6 support")
Reported-by: kernel test robot
Closes:
https://lore.kernel.org/oe-kbuild-all/202412311819.9mz11uak-...@intel.com/
Sign
Fix sparse warning:
symbol 'force_cmdlist' was not declared. Should it be static?
Fixes: aac243092b70 ("accel/amdxdna: Add command execution")
Reported-by: kernel test robot
Closes:
https://lore.kernel.org/oe-kbuild-all/202412311448.gkqj7upz-...@intel.com/
Sign
Reported-by: kernel test robot
Closes:
https://lore.kernel.org/oe-kbuild-all/202412310857.syd1sxxo-...@intel.com/
Signed-off-by: Lizhi Hou
---
drivers/accel/amdxdna/aie2_pci.c| 4 ++--
drivers/accel/amdxdna/amdxdna_mailbox.c | 24
drivers/accel/amdxdna/amdxdna_mailbo
Fix the sparse warning:
symbol 'aie2_max_col' was not declared. Should it be static?
Fixes: c88d3325ae69 ("accel/amdxdna: Add hardware resource solver")
Reported-by: kernel test robot
Closes:
https://lore.kernel.org/oe-kbuild-all/202412311028.x2utcshm-...@intel.com/
Sign
On 12/20/24 09:15, Jeffrey Hugo wrote:
On 12/13/2024 5:35 PM, Lizhi Hou wrote:
On 12/13/24 13:33, Jeffrey Hugo wrote:
-static struct qaic_device *create_qdev(struct pci_dev *pdev, const
struct pci_device_id *id)
+static struct qaic_device *create_qdev(struct pci_dev *pdev
On 12/20/24 09:50, Jeffrey Hugo wrote:
On 12/20/2024 10:33 AM, Lizhi Hou wrote:
On 12/20/24 09:26, Jeffrey Hugo wrote:
On 12/13/2024 5:49 PM, Lizhi Hou wrote:
On 12/13/24 13:33, Jeffrey Hugo wrote:
+static const struct qaic_device_config aic200_config = {
+ .family = FAMILY_AIC200
On 12/20/24 09:26, Jeffrey Hugo wrote:
On 12/13/2024 5:49 PM, Lizhi Hou wrote:
On 12/13/24 13:33, Jeffrey Hugo wrote:
@@ -573,6 +898,13 @@ struct mhi_controller
*qaic_mhi_register_controller(struct pci_dev *pci_dev, voi
mhi_cntrl->nr_irqs = 1;
mhi_cntrl->irq = devm_k
Defining a number of enum elements in uapi header is meaningless. It will
not be used as expected and can potentially lead to incompatible issue
between user space application and driver.
Signed-off-by: Lizhi Hou
---
include/uapi/drm/amdxdna_accel.h | 1 -
1 file changed, 1 deletion(-)
diff
For input ioctl structures, it is better to check if the pad is zero.
Thus, the pad bytes might be usable in the future.
Suggested-by: Jeffrey Hugo
Signed-off-by: Lizhi Hou
---
drivers/accel/amdxdna/aie2_ctx.c | 3 +++
drivers/accel/amdxdna/aie2_message.c | 3 +++
drivers/accel/amdxdna
On 12/16/24 12:38, Mario Limonciello wrote:
On 12/13/2024 17:29, Lizhi Hou wrote:
For input structures, it is better to check if the pad is zero.
Thus, the pad bytes might be usable in the future.
IIRC you should pick up:
Suggested-by: Jeffrey Hugo
Sure. Will add it.
Signed-off-by
On 12/13/24 13:33, Jeffrey Hugo wrote:
Add basic support for the new AIC200 product. The PCIe Device ID is
0xa110. With this, we can turn on the lights for AIC200 by leveraging
much of the existing driver.
Co-developed-by: Youssef Samir
Signed-off-by: Youssef Samir
Signed-off-by: Jeffrey Hug
= pci_select_bars(pdev, IORESOURCE_MEM) & 0x3f;
/* make sure the device has the expected BARs */
if (bars != (BIT(0) | BIT(2) | BIT(4))) {
Reviewed-by: Lizhi Hou
On 12/13/24 13:33, Jeffrey Hugo wrote:
As the number of cards supported by the driver grows, their
configurations will differ. The driver needs to become more dynamic
to support these configurations. Currently, each card may differ in
the exposed BARs, the regions they map to, and the family.
, 1, PCI_IRQ_MSI |
PCI_IRQ_MSIX);
if (ret < 0)
return ret;
Reviewed-by: Lizhi Hou
d MSIs failed, operating in 1 MSI mode.
Performance may be impacted.\n",
+irq_count);
} else if (ret < 0) {
return ret;
}
Reviewed-by: Lizhi Hou
by: Min Ma
Signed-off-by: Min Ma
Reviewed-by: Mario Limonciello
Reviewed-by: Jeffrey Hugo
Signed-off-by: Lizhi Hou
---
drivers/accel/amdxdna/aie2_message.c | 26 --
drivers/accel/amdxdna/aie2_pci.c | 74 ++--
drivers/accel/amdxdna/aie2_pci.h | 6 +--
dri
DPM level been set.
Initially, the driver set the power mode to default mode.
Co-developed-by: Narendra Gutta
Signed-off-by: Narendra Gutta
Co-developed-by: George Yang
Signed-off-by: George Yang
Reviewed-by: Mario Limonciello
Signed-off-by: Lizhi Hou
---
drivers/accel/amdxdna/Makefile
Switch mailbox message id and hardware context id management over from
the idr api to the xarray api.
Signed-off-by: Lizhi Hou
---
drivers/accel/amdxdna/TODO | 1 -
drivers/accel/amdxdna/aie2_ctx.c| 5 ++-
drivers/accel/amdxdna/aie2_message.c| 5 ++-
drivers/accel
For input structures, it is better to check if the pad is zero.
Thus, the pad bytes might be usable in the future.
Signed-off-by: Lizhi Hou
---
drivers/accel/amdxdna/aie2_ctx.c | 3 +++
drivers/accel/amdxdna/aie2_message.c | 3 +++
drivers/accel/amdxdna/amdxdna_ctx.c | 6 ++
drivers
Add NPU6 registers and other private configurations.
Co-developed-by: Xiaoming Ren
Signed-off-by: Xiaoming Ren
Reviewed-by: Mario Limonciello
Signed-off-by: Lizhi Hou
---
drivers/accel/amdxdna/Makefile | 3 +-
drivers/accel/amdxdna/amdxdna_pci_drv.c | 1 +
drivers/accel/amdxdna
from this set
- Add MBZ check for pad member of input ioctl structure
- Fix for code review comments
Changes since v1:
- Add one patch to fix possible compiling failure
- Minor fixes for code review comments
Lizhi Hou (5):
accel/amdxdna: Add RyzenAI-npu6 support
accel/amdxdna: Replace idr api
On 12/13/24 09:49, Jeffrey Hugo wrote:
On 12/13/2024 10:41 AM, Lizhi Hou wrote:
On 12/13/24 09:07, Jeffrey Hugo wrote:
On 12/13/2024 2:02 AM, Arnd Bergmann wrote:
From: Arnd Bergmann
The old SET_SYSTEM_SLEEP_PM_OPS and SET_RUNTIME_PM_OPS macros cause
a build
warning when CONFIG_PM is
On 12/13/24 09:07, Jeffrey Hugo wrote:
On 12/13/2024 2:02 AM, Arnd Bergmann wrote:
From: Arnd Bergmann
The old SET_SYSTEM_SLEEP_PM_OPS and SET_RUNTIME_PM_OPS macros cause a
build
warning when CONFIG_PM is disabled:
drivers/accel/amdxdna/amdxdna_pci_drv.c:343:12: error:
'amdxdna_pmops_res
On 12/13/24 08:55, Jeffrey Hugo wrote:
On 12/6/2024 2:59 PM, Lizhi Hou wrote:
+/**
+ * struct amdxdna_drm_get_power_mode - Get the configured power mode
+ * @power_mode: The mode type from enum amdxdna_power_mode_type
+ * @pad: MBZ.
I don't see a check for zero in the implementati
On 12/13/24 08:58, Jeffrey Hugo wrote:
On 12/6/2024 3:00 PM, Lizhi Hou wrote:
The latest released firmware supports reading firmware interface version
from registers directly. The driver's probe routine reads the major and
minor version numbers. If the firmware interface does not compa
On 12/13/24 08:42, Jeffrey Hugo wrote:
On 12/6/2024 2:59 PM, Lizhi Hou wrote:
Switch mailbox message id and hardware context id management over from
the idr api to the xarray api.
Signed-off-by: Lizhi Hou
Implementation looks sane, however you appear to be missing several
instances of
On 12/13/24 08:37, Jeffrey Hugo wrote:
On 12/6/2024 2:59 PM, Lizhi Hou wrote:
Add NPU6 registers and other private configurations.
Co-developed-by: Xiaoming Ren
Signed-off-by: Xiaoming Ren
Signed-off-by: Lizhi Hou
---
drivers/accel/amdxdna/Makefile | 3 +-
drivers/accel/amdxdna
On 12/13/24 08:20, Jeffrey Hugo wrote:
On 12/6/2024 3:00 PM, Lizhi Hou wrote:
For amdxdna_mailbox.c, linux/interrupt.h is indirectly included by
trace/events/amdxdna.h. So if TRACING is disabled, driver compiling will
fail.
Fixes: b87f920b9344 ("accel/amdxdna: Support hardware ma
el.org/dri-devel/CAHbf0-E+Z2O7rW-x+-EKNQ-nLbf=_ohanzxxe7wd2cj9kfj...@mail.gmail.com/
Signed-off-by: Mike Lothian
Reviewed-by: Mario Limonciello
Reviewed-by: Jeffrey Hugo
Signed-off-by: Lizhi Hou
---
drivers/accel/amdxdna/amdxdna_mailbox.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/dri
On 12/10/24 16:20, Mario Limonciello wrote:
On 12/6/2024 16:00, Lizhi Hou wrote:
The latest released firmware supports reading firmware interface version
from registers directly. The driver's probe routine reads the major and
minor version numbers. If the firmware interface doe
On 12/10/24 16:28, Mario Limonciello wrote:
On 12/6/2024 15:59, Lizhi Hou wrote:
Add SET_STATE ioctl to configure device power mode for aie2 device.
Three modes are supported initially.
POWER_MODE_DEFAULT: Enable clock gating and set DPM (Dynamic Power
Management) level to value which has
On 12/6/24 14:55, Jeffrey Hugo wrote:
On 12/6/2024 11:47 AM, Lizhi Hou wrote:
On 12/6/24 09:01, Mike Lothian wrote:
On Fri, 6 Dec 2024 at 16:41, Mike Lothian wrote:
On Fri, 6 Dec 2024 at 16:26, Jeffrey Hugo
wrote:
On 12/5/2024 8:44 AM, Mike Lothian wrote:
Hi
I needed to add the
Add device status to track if aie2_hw_start() or aie2_hw_stop() is
re-entered. In aie2_hw_stop(), call drmm_kfree to free mbox.
Signed-off-by: Lizhi Hou
---
drivers/accel/amdxdna/aie2_pci.c| 17 +
drivers/accel/amdxdna/aie2_pci.h| 7 +++
drivers/accel
E+Z2O7rW-x+-EKNQ-nLbf=_ohanzxxe7wd2cj9kfj...@mail.gmail.com/
Signed-off-by: Mike Lothian
Signed-off-by: Lizhi Hou
---
drivers/accel/amdxdna/amdxdna_mailbox.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/accel/amdxdna/amdxdna_mailbox.c
b/drivers/accel/amdxdna/amdxdna_mailb
ed-by: Min Ma
Signed-off-by: Min Ma
Signed-off-by: Lizhi Hou
---
drivers/accel/amdxdna/aie2_message.c | 26 --
drivers/accel/amdxdna/aie2_pci.c | 74 ++--
drivers/accel/amdxdna/aie2_pci.h | 6 +--
drivers/accel/amdxdna/npu1_regs.c| 2 +-
drivers/acc
Switch mailbox message id and hardware context id management over from
the idr api to the xarray api.
Signed-off-by: Lizhi Hou
---
drivers/accel/amdxdna/TODO | 1 -
drivers/accel/amdxdna/aie2_ctx.c| 4 +-
drivers/accel/amdxdna/aie2_message.c| 4 +-
drivers/accel
DPM level been set.
Initially, the driver set the power mode to default mode.
Co-developed-by: Narendra Gutta
Signed-off-by: Narendra Gutta
Co-developed-by: George Yang
Signed-off-by: George Yang
Signed-off-by: Lizhi Hou
---
drivers/accel/amdxdna/Makefile | 1 +
drivers/accel
accel/amdxdna: Add command execution")
Signed-off-by: Lizhi Hou
---
drivers/accel/amdxdna/aie2_ctx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/accel/amdxdna/aie2_ctx.c b/drivers/accel/amdxdna/aie2_ctx.c
index 90e8d87666a9..b5282555bbf2 100644
--- a/drivers/acc
Enhance GET_INFO ioctl to support retrieving firmware version.
Signed-off-by: Lizhi Hou
---
drivers/accel/amdxdna/aie2_pci.c | 20
include/uapi/drm/amdxdna_accel.h | 16 +++-
2 files changed, 35 insertions(+), 1 deletion(-)
diff --git a/drivers/accel/amdxdna
possible compiling failure
- Minor fixes for code review comments
Lizhi Hou (8):
accel/amdxdna: Add device status for aie2 devices
accel/amdxdna: Replace mmput with mmput_async to avoid dead lock
accel/amdxdna: Add RyzenAI-npu6 support
accel/amdxdna: Replace idr api with xarray
accel
Add NPU6 registers and other private configurations.
Co-developed-by: Xiaoming Ren
Signed-off-by: Xiaoming Ren
Signed-off-by: Lizhi Hou
---
drivers/accel/amdxdna/Makefile| 3 +-
drivers/accel/amdxdna/npu6_regs.c | 121 ++
2 files changed, 123 insertions(+), 1
On 12/6/24 09:01, Mike Lothian wrote:
On Fri, 6 Dec 2024 at 16:41, Mike Lothian wrote:
On Fri, 6 Dec 2024 at 16:26, Jeffrey Hugo wrote:
On 12/5/2024 8:44 AM, Mike Lothian wrote:
Hi
I needed to add the following to get things compiling for me
diff --git a/drivers/accel/amdxdna/amdxdna_ma
On 12/6/24 09:52, Mike Lothian wrote:
On Fri, 6 Dec 2024 at 17:10, Lizhi Hou wrote:
Hi Mike,
How did you install npu.sbin.1.5.2.380? There should be a symlink
npu.sbin which points to npu.sbin.1.5.2.380.
https://gitlab.com/kernel-firmware/linux-firmware/-/blob/main/WHENCE?ref_type=heads
Hi Mike,
How did you install npu.sbin.1.5.2.380? There should be a symlink
npu.sbin which points to npu.sbin.1.5.2.380.
https://gitlab.com/kernel-firmware/linux-firmware/-/blob/main/WHENCE?ref_type=heads#L2719
Thanks,
Lizhi
On 12/5/24 07:44, Mike Lothian wrote:
Hi
I needed to add the f
On 12/4/24 19:52, Mario Limonciello wrote:
On 12/4/2024 15:37, Lizhi Hou wrote:
Add SET_STATE ioctl to configure device power mode for aie2 device.
Three modes are supported initially.
POWER_MODE_DEFAULT: Enable clock gating and set DPM (Dynamic Power
Management) level to value which has
On 12/4/24 14:26, Mario Limonciello wrote:
On 12/4/2024 15:37, Lizhi Hou wrote:
Add device status to track if aie2_hw_start() or aie2_hw_stop() is
re-entered. In aie2_hw_stop(), call drmm_kfree to free mbox.
Signed-off-by: Lizhi Hou
---
drivers/accel/amdxdna/aie2_pci.c | 17
On 12/4/24 14:24, Mario Limonciello wrote:
On 12/4/2024 15:37, Lizhi Hou wrote:
Enhance GET_INFO ioctl to support retrieving firmware version.
Signed-off-by: Lizhi Hou
---
drivers/accel/amdxdna/aie2_pci.c | 20
include/uapi/drm/amdxdna_accel.h | 19
Enhance GET_INFO ioctl to support retrieving firmware version.
Signed-off-by: Lizhi Hou
---
drivers/accel/amdxdna/aie2_pci.c | 20
include/uapi/drm/amdxdna_accel.h | 19 +++
2 files changed, 39 insertions(+)
diff --git a/drivers/accel/amdxdna/aie2_pci.c b
ed-by: Min Ma
Signed-off-by: Min Ma
Signed-off-by: Lizhi Hou
---
drivers/accel/amdxdna/aie2_message.c | 26 --
drivers/accel/amdxdna/aie2_pci.c | 74 ++--
drivers/accel/amdxdna/aie2_pci.h | 6 +--
drivers/accel/amdxdna/npu1_regs.c| 2 +-
drivers/acc
DPM level been set.
Initially, the driver set the power mode to default mode.
Co-developed-by: Narendra Gutta
Signed-off-by: Narendra Gutta
Co-developed-by: George Yang
Signed-off-by: George Yang
Signed-off-by: Lizhi Hou
---
drivers/accel/amdxdna/Makefile | 1 +
drivers/accel
Add device status to track if aie2_hw_start() or aie2_hw_stop() is
re-entered. In aie2_hw_stop(), call drmm_kfree to free mbox.
Signed-off-by: Lizhi Hou
---
drivers/accel/amdxdna/aie2_pci.c| 17 +
drivers/accel/amdxdna/aie2_pci.h| 7 +++
drivers/accel
Add NPU6 registers and other private configurations.
Co-developed-by: Xiaoming Ren
Signed-off-by: Xiaoming Ren
Signed-off-by: Lizhi Hou
---
drivers/accel/amdxdna/Makefile| 3 +-
drivers/accel/amdxdna/npu6_regs.c | 121 ++
2 files changed, 123 insertions(+), 1
Switch mailbox message id and hardware context id management over from
the idr api to the xarray api.
Signed-off-by: Lizhi Hou
---
drivers/accel/amdxdna/TODO | 1 -
drivers/accel/amdxdna/aie2_ctx.c| 4 +-
drivers/accel/amdxdna/aie2_message.c| 4 +-
drivers/accel
Add recent improvements and bug fixes for amdxdna driver (depends on [1])
1. Support recent hardware and firmware.
2. Replace idr APIs with xarray.
3. Fix the bugs been found.
[1]: https://lore.kernel.org/all/20241118172942.2014541-1-lizhi@amd.com/
Lizhi Hou (7):
accel/amdxdna: Add device
Hardware mailbox message receiving handler calls mmput to release the
process mm. If the process has already exited, the mmput here may call mmu
notifier handler, amdxdna_hmm_invalidate, which will cause a dead lock.
Using mmput_async instead prevents this dead lock.
Signed-off-by: Lizhi Hou
Cool! You made my day. :) Appreciate all your help.
Lizhi
On 11/22/24 10:52, Jeffrey Hugo wrote:
On 11/18/2024 10:29 AM, Lizhi Hou wrote:
This patchset introduces a new Linux Kernel Driver, amdxdna for AMD
NPUs.
The driver is based on Linux accel subsystem.
Merged to drm-misc-next
-Jeff
code review comments
Changes since v2:
- Add document amdnpu.rst
- Change AIE2_DEVM_SIZE to 64M due to firmware change
- Changes based on code review comments
Changes since v1:
- Remove some inline defines
- Minor changes based on code review comments
Lizhi Hou (10):
accel/amdxdna: Add document
The AI Engine consists of 2D array of tiles arranged as columns. Provides
the basic column allocation and release functions for the tile columns.
Co-developed-by: Min Ma
Signed-off-by: Min Ma
Reviewed-by: Jeffrey Hugo
Signed-off-by: Lizhi Hou
---
drivers/accel/amdxdna/Makefile | 1
using the column where error occurred. Then
the driver resets that column.
Co-developed-by: Min Ma
Signed-off-by: Min Ma
Reviewed-by: Jeffrey Hugo
Signed-off-by: Lizhi Hou
---
drivers/accel/amdxdna/Makefile | 1 +
drivers/accel/amdxdna/aie2_error.c | 360
Ma
Reviewed-by: Jeffrey Hugo
Signed-off-by: Lizhi Hou
---
MAINTAINERS | 1 +
drivers/accel/amdxdna/Makefile| 3 +
drivers/accel/amdxdna/aie2_message.c | 194 ++
drivers/accel/amdxdna/aie2_msg_priv.h | 370
1 - 100 of 252 matches
Mail list logo