Separated common driver code and added a placeholder for ve2 aux driver#1158
Open
saifuddin-xilinx wants to merge 2 commits intoamd:mainfrom
Open
Separated common driver code and added a placeholder for ve2 aux driver#1158saifuddin-xilinx wants to merge 2 commits intoamd:mainfrom
saifuddin-xilinx wants to merge 2 commits intoamd:mainfrom
Conversation
Signed-off-by: Saifuddin Kaijar <saifuddin.kaijar@amd.com>
Signed-off-by: Saifuddin Kaijar <saifuddin.kaijar@amd.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors the AMD XDNA accel driver by moving common DRM driver + device lifecycle code into a shared driver unit, adding an auxiliary-bus (VE2) driver stub, and renaming AIE2-era solver/mailbox header guards/includes to amdxdna_*.
Changes:
- Introduce
amdxdna_drv.[c/h]to host the common DRM driver definition and shared device init/cleanup helpers, and switch multiple compilation units to include the new header. - Add a placeholder auxiliary-bus driver (
amdxdna_aux_drv.c) and update Kbuild/Makefile plumbing to select PCI vs AUX builds. - Rename solver/mailbox header guards and update solver includes to
amdxdna_solver.h.
Reviewed changes
Copilot reviewed 21 out of 21 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| drivers/accel/amdxdna/amdxdna_ubuf.c | Switch include from PCI header to common driver header. |
| drivers/accel/amdxdna/amdxdna_sysfs.c | Switch include from PCI header to common driver header. |
| drivers/accel/amdxdna/amdxdna_solver.h | Rename include guard to *_AMDXDNA_*. |
| drivers/accel/amdxdna/amdxdna_solver.c | Update solver include to amdxdna_solver.h. |
| drivers/accel/amdxdna/amdxdna_pm.h | Switch include from PCI header to common driver header. |
| drivers/accel/amdxdna/amdxdna_pci_drv.h | Reduce to PCI-only device info declarations; include common driver header. |
| drivers/accel/amdxdna/amdxdna_pci_drv.c | Use shared amdxdna_dev_init/cleanup and shared module metadata macros. |
| drivers/accel/amdxdna/amdxdna_mailbox_helper.c | Switch include from PCI header to common driver header. |
| drivers/accel/amdxdna/amdxdna_mailbox.h | Rename include guard to *_AMDXDNA_*. |
| drivers/accel/amdxdna/amdxdna_mailbox.c | Minor whitespace-only change (blank line removal). |
| drivers/accel/amdxdna/amdxdna_gem.h | Switch include from PCI header to common driver header. |
| drivers/accel/amdxdna/amdxdna_gem.c | Switch include from PCI header to common driver header. |
| drivers/accel/amdxdna/amdxdna_drv.h | New common header with shared types/macros and lifecycle prototypes. |
| drivers/accel/amdxdna/amdxdna_drv.c | New common implementation of DRM driver + open/close/ioctls and device init/cleanup helpers. |
| drivers/accel/amdxdna/amdxdna_ctx.c | Switch include from PCI header to common driver header; minor whitespace-only change. |
| drivers/accel/amdxdna/amdxdna_aux_drv.c | New auxiliary-bus driver placeholder (VE2). |
| drivers/accel/amdxdna/aie2_pci.c | Update solver include to amdxdna_solver.h. |
| drivers/accel/amdxdna/aie2_ctx.c | Update solver include to amdxdna_solver.h. |
| drivers/accel/amdxdna/aie2_message.c | Minor whitespace-only change (blank line removal). |
| drivers/accel/amdxdna/Makefile | Replace OF build selection with AUX selection; pass AUX build flag into Kbuild. |
| drivers/accel/amdxdna/Kbuild | Always build amdxdna_drv.o + amdxdna_solver.o; gate PCI vs AUX driver objects. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR refactors the AMD XDNA accel driver by extracting common DRM driver/device lifecycle logic into a shared driver unit and introducing an auxiliary-bus (VE2 / DT-based) driver stub, while also renaming some AIE2-era headers/guards to amdxdna naming.
Changes: