Commit 7fcb0657 authored by Christian König's avatar Christian König Committed by Alex Deucher

drm/amdgpu: shadow BOs don't need any alignment

They aren't directly used by the hardware.
Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
Reviewed-by: default avatarJunwei Zhang <Jerry.Zhang@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 16688677
...@@ -532,7 +532,7 @@ static int amdgpu_bo_do_create(struct amdgpu_device *adev, ...@@ -532,7 +532,7 @@ static int amdgpu_bo_do_create(struct amdgpu_device *adev,
} }
static int amdgpu_bo_create_shadow(struct amdgpu_device *adev, static int amdgpu_bo_create_shadow(struct amdgpu_device *adev,
unsigned long size, int byte_align, unsigned long size,
struct amdgpu_bo *bo) struct amdgpu_bo *bo)
{ {
struct amdgpu_bo_param bp; struct amdgpu_bo_param bp;
...@@ -543,7 +543,6 @@ static int amdgpu_bo_create_shadow(struct amdgpu_device *adev, ...@@ -543,7 +543,6 @@ static int amdgpu_bo_create_shadow(struct amdgpu_device *adev,
memset(&bp, 0, sizeof(bp)); memset(&bp, 0, sizeof(bp));
bp.size = size; bp.size = size;
bp.byte_align = byte_align;
bp.domain = AMDGPU_GEM_DOMAIN_GTT; bp.domain = AMDGPU_GEM_DOMAIN_GTT;
bp.flags = AMDGPU_GEM_CREATE_CPU_GTT_USWC | bp.flags = AMDGPU_GEM_CREATE_CPU_GTT_USWC |
AMDGPU_GEM_CREATE_SHADOW; AMDGPU_GEM_CREATE_SHADOW;
...@@ -592,7 +591,7 @@ int amdgpu_bo_create(struct amdgpu_device *adev, ...@@ -592,7 +591,7 @@ int amdgpu_bo_create(struct amdgpu_device *adev,
WARN_ON(reservation_object_lock((*bo_ptr)->tbo.resv, WARN_ON(reservation_object_lock((*bo_ptr)->tbo.resv,
NULL)); NULL));
r = amdgpu_bo_create_shadow(adev, bp->size, bp->byte_align, (*bo_ptr)); r = amdgpu_bo_create_shadow(adev, bp->size, *bo_ptr);
if (!bp->resv) if (!bp->resv)
reservation_object_unlock((*bo_ptr)->tbo.resv); reservation_object_unlock((*bo_ptr)->tbo.resv);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment