]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amdgpu/psp: move PSP memory alloc from hw_init to sw_init
authorAlex Deucher <alexander.deucher@amd.com>
Thu, 21 Apr 2022 05:21:52 +0000 (01:21 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 4 May 2022 13:54:41 +0000 (09:54 -0400)
commitf3348a4f45183dd2b51465a22400c7438f5c62d2
treea6fd19f641fccedfb4cdaec77d8f647438ed9188
parentbb03c8a628f92cdf89894e0e5f26c4a4f76c5227
drm/amdgpu/psp: move PSP memory alloc from hw_init to sw_init

Memory allocations should be done in sw_init.  hw_init should
just be hardware programming needed to initialize the IP block.
This is how most other IP blocks work.  Move the GPU memory
allocations from psp hw_init to psp sw_init and move the memory
free to sw_fini.  This also fixes a potential GPU memory leak
if psp hw_init fails.

Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c