Make aie mailbox message send, platform independent for aie2, aie4#1103
Make aie mailbox message send, platform independent for aie2, aie4#1103donwalkarsoham wants to merge 2 commits intoamd:mainfrom
Conversation
|
Can one of the admins verify this patch? |
| } | ||
|
|
||
| return ret; | ||
| drm_WARN_ON(&ndev->xdna->ddev, !mutex_is_locked(&ndev->aie2_lock)); |
There was a problem hiding this comment.
adding the lock here is the right approach I think.
I'd you also add a function for aie4_message.c so people can have a whole picture what code is made common.
There was a problem hiding this comment.
Yeah, I was thinking of adding it in the upcoming PRs using other patches. Have mentioned the same in this PR description. But can add it here too.
There was a problem hiding this comment.
@xdavidz added the changes in aie4_message.c to use common send message APIs. As discussed offline, removed the AMDXDNA_DEVEL specific timeouts used for simnow specific debugging for aie4 as we are moving towards common aie2 and aie4 code and the common timeouts are enough for silicon.
| #include "aie_message.h" | ||
|
|
||
| int aie_send_msg_wait(struct amdxdna_dev *xdna, | ||
| struct mailbox_channel **chann, |
There was a problem hiding this comment.
I got additional comments from lizhi, please wait for me update my patcheset, then you should syncup with my patcheset.
|
Should common files be aie_message.* or amdxdna_message.? Most common code is amdxdna_ already, no? |
Lizhi keeps commenting on the upstream patches. Soham's work is to sync-up with the code that I provided. The file name is pretty much decided. |
|
|
||
| return ret; | ||
| drm_WARN_ON(&ndev->xdna->ddev, !mutex_is_locked(&ndev->aie2_lock)); | ||
| return aie_send_msg_wait(ndev->xdna, &ndev->mgmt_chann, msg); |
There was a problem hiding this comment.
@donwalkarsoham this is not in sync with latest upstream match set.
| #define DECLARE_AIE_MSG(name, op) DECLARE_XDNA_MSG_COMMON(name, op, -1) | ||
|
|
||
| int aie_send_msg_wait(struct amdxdna_dev *xdna, | ||
| struct mailbox_channel **chann, |
There was a problem hiding this comment.
The **chann has been changed. Please re-sync your PR.
|
retest this please |
| // SPDX-License-Identifier: GPL-2.0 | ||
| /* | ||
| * Copyright (C) 2022-2025, Advanced Micro Devices, Inc. | ||
| * Copyright (C) 2022-2026, Advanced Micro Devices, Inc. |
There was a problem hiding this comment.
remove this change, no change in this file
| @@ -1,44 +1,17 @@ | |||
| /* SPDX-License-Identifier: GPL-2.0 */ | |||
There was a problem hiding this comment.
do not include aie4_message.h
|
|
||
| #include <linux/pci.h> | ||
|
|
||
| #include "aie4_pci.h" |
There was a problem hiding this comment.
#include "amdxdna_pci_drv.h"
#include "aie4_pci.h"
#include "aie4_msg_priv.h"
#include "aie_message.h"
use this include
|
|
||
| return (num_vfs == 0) ? aie4_sriov_stop(ndev) : aie4_sriov_start(ndev, num_vfs); | ||
| } | ||
|
|
There was a problem hiding this comment.
remove empty line
checkpatch will not be clean
| void aie4_put_cert_comp(struct cert_comp *comp); | ||
|
|
||
| #endif /* _AIE4_PCI_H_ */ | ||
|
|
|
this needs some additional work. |
|
@donwalkarsoham can you please squash all commits to one and retest it? |
Hi @xdavidz, squashed the commits to a single commit. |
|
retest this please |
|
@donwalkarsoham please fix the conflicts, we cannot merge this due to the conflicts. |
|
|
we'd obsolete this because we made message.c even common further, will need to sync-up again if necessary, so close this. |
Problem solved by the commit
Add common mailbox message send method for both aie2 and aie4
Bug / issue (if any) fixed, which PR introduced the bug, how it was discovered
N/A
How problem was solved, alternative solutions (if any) and why they were rejected
1> Added common logging and mail box message send API for aie2 and aie4
2> Made necessary changes in AIE2. In subsequent PRs AIE4 related changes will be added.
Risks (if any) associated the changes in the commit
N/A
What has been tested and how, request additional testing if necessary
1> Driver installation successful.
2> ./xrt_test 0 1 2 4 7 8 9 ran successfully on Medusa board for below FW version: 0.0.16.125
Documentation impact (if any)
N/A