]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amdgpu: Separate vf2pf work item init from virt data exchange
authorVictor Skvortsov <victor.skvortsov@amd.com>
Thu, 16 Dec 2021 17:01:45 +0000 (17:01 +0000)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 16 Dec 2021 19:08:20 +0000 (14:08 -0500)
commitea431ef8ec33f52baf0ecc79109742a031699452
tree1be00e41f7b23eedc3f1a5504b6c744b513cde59
parent485b5634fef9282449786c8afc61ed61c6e4bc01
drm/amdgpu: Separate vf2pf work item init from virt data exchange

We want to be able to call virt data exchange conditionally
after gmc sw init to reserve bad pages as early as possible.
Since this is a conditional call, we will need
to call it again unconditionally later in the init sequence.

Refactor the data exchange function so it can be
called multiple times without re-initializing the work item.

v2: Cleaned up the code. Kept the original call to init_exchange_data()
inside early init to initialize the work item, afterwards call
exchange_data() when needed.

Signed-off-by: Victor Skvortsov <victor.skvortsov@amd.com>
Reviewed By: Shaoyun.liu <Shaoyun.liu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h