mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-19 13:11:14 +00:00
drm/amdgpu: always enable shadow BOs v2
Even when GPU recovery is disabled we could run into a manually triggered recovery. v2: keep accidental removed comments Signed-off-by: Christian König <christian.koenig@amd.com> Acked-by: Emily Deng <Emily.Deng@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
4947b2f248
commit
1668867742
1 changed files with 1 additions and 13 deletions
|
@ -51,18 +51,6 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static bool amdgpu_bo_need_backup(struct amdgpu_device *adev)
|
|
||||||
{
|
|
||||||
if (adev->flags & AMD_IS_APU)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
if (amdgpu_gpu_recovery == 0 ||
|
|
||||||
(amdgpu_gpu_recovery == -1 && !amdgpu_sriov_vf(adev)))
|
|
||||||
return false;
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* amdgpu_bo_subtract_pin_size - Remove BO from pin_size accounting
|
* amdgpu_bo_subtract_pin_size - Remove BO from pin_size accounting
|
||||||
*
|
*
|
||||||
|
@ -599,7 +587,7 @@ int amdgpu_bo_create(struct amdgpu_device *adev,
|
||||||
if (r)
|
if (r)
|
||||||
return r;
|
return r;
|
||||||
|
|
||||||
if ((flags & AMDGPU_GEM_CREATE_SHADOW) && amdgpu_bo_need_backup(adev)) {
|
if ((flags & AMDGPU_GEM_CREATE_SHADOW) && !(adev->flags & AMD_IS_APU)) {
|
||||||
if (!bp->resv)
|
if (!bp->resv)
|
||||||
WARN_ON(reservation_object_lock((*bo_ptr)->tbo.resv,
|
WARN_ON(reservation_object_lock((*bo_ptr)->tbo.resv,
|
||||||
NULL));
|
NULL));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue