ROCm / ROCK-Kernel-Driver

AMDGPU Driver with KFD used by the ROCm project. Also contains the current Linux Kernel that matches this base driver
Other
333 stars 101 forks source link

How to use the newly amdgpu.ko rebuild by myself #142

Closed ccnankai closed 2 years ago

ccnankai commented 2 years ago

After I rebuild amdgpu.ko, how can I use the latest amdgpu.ko, I tried removing the old amdgpu module, but it keeps being used.

$sudo rmmod amdgpu
rmmod: ERROR: Module amdgpu is in use
$sudo insmod amdgpu.ko
insmod: ERROR: could not insert module amdgpu.ko: File exists

Is there any way to fix this, run the latest modules.

fxkamd commented 2 years ago

I would recommend a reboot. Removing the module on a running system is tricky. You'd need to kill any Xserver or compositor running on your system and disconnect the framebuffer console from the amdgpu driver.

ccnankai commented 2 years ago

@fxkamd Got it .Thank very much. I am a beginner, I am learning gpu driver development by myself. Is there is a lot of ambiguous information when reading the driver, such as vimd, pasid, map_queues_cpsch and so on. Is there any documentation available?

fxkamd commented 2 years ago

What you're asking for is not end-user documentation. More like architectural or developer on-boarding documentation. Unfortunately there isn't much public information of that kind, other than comments in the source code itself. If you are interested in contributing to the driver, a good place to start would be the mailing list amd-gfx@lists.freedesktop.org, which is where all the upstream code changes are reviewed and discussed.

You may also find some basic info generated from the source code here: https://docs.kernel.org/gpu/amdgpu/index.html

A public clone of our internal upstream development branch (amd-staging-drm-next) can be found on gitlab: https://gitlab.freedesktop.org/agd5f/linux