]> 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)
commitd1eb66ecd52daf3c88d39d6ccf1f69f041ad39c6
tree039fa61bf66bdd70288339cf7b4a910d5a96735a
parent37eedaa29733396df8e94f7fbcc992864ee9ebe3
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