]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amdgpu: refine SR-IOV firmware VRAM reservation to protect data
authorHorace Chen <horace.chen@amd.com>
Wed, 1 Nov 2017 11:32:11 +0000 (19:32 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 4 Dec 2017 21:41:42 +0000 (16:41 -0500)
commit3c7388936a76affe656d7ba682a33740a99b4a19
tree039fa61bf66bdd70288339cf7b4a910d5a96735a
parent5ffa61c1bdc35895f60ef7b553b43266d3fda469
drm/amdgpu: refine SR-IOV firmware VRAM reservation to protect data

The previous solution will create a zero buffer on the system
domain and then move the zeroes to the VRAM. This will break the
original data on the VRAM.

Refine the code to create bo on VRAM domain directly and then remove
and re-create mem node to the exact position before bo_pin. This can
avoid breaking the data and will not cause eviction.

Signed-off-by: Horace Chen <horace.chen@amd.com>
Reviewed-by: monk liu <monk.liu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c