8000 Separated common driver code and added a placeholder for ve2 aux driver by saifuddin-xilinx · Pull Request #1158 · amd/xdna-driver · GitHub
[go: up one dir, main page]

Skip to content

Separated common driver code and added a placeholder for ve2 aux driver#1158

Open
saifuddin-xilinx wants to merge 2 commits intoamd:mainfrom
saifuddin-xilinx:linux_upstream_ve2
Open

Separated common driver code and added a placeholder for ve2 aux driver#1158
saifuddin-xilinx wants to merge 2 commits intoamd:mainfrom
saifuddin-xilinx:linux_upstream_ve2

Conversation

@saifuddin-xilinx
Copy link
Contributor

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:

  • Introduce amdxdna_drv.[c/h] to host common DRM driver definition plus shared device init/cleanup, and update consumers to include the new header.
  • Add a placeholder AUX-bus driver (amdxdna_aux_drv.c) and Kbuild/Makefile plumbing for selecting PCI vs AUX builds.
  • Rename solver/mailbox header guards and update solver includes to amdxdna_solver.h.

Signed-off-by: Saifuddin Kaijar <saifuddin.kaijar@amd.com>
Signed-off-by: Saifuddin Kaijar <saifuddin.kaijar@amd.com>
Copilot AI review requested due to automatic review settings March 9, 2026 11:21
Copy link
Contributor
Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

0