Skip to content

Commit 36de13f

Browse files
Yang Wangalexdeucher
authored andcommitted
drm/amdgpu: change the alignment size of TMR BO to 1M
align TMR BO size TO tmr size is not necessary, modify the size to 1M to avoid re-create BO fail when serious VRAM fragmentation. v2: add new macro PSP_TMR_ALIGNMENT for TMR BO alignment size Signed-off-by: Yang Wang <[email protected]> Reviewed-by: Hawking Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent df2c6e0 commit 36de13f

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -756,7 +756,7 @@ static int psp_tmr_init(struct psp_context *psp)
756756
}
757757

758758
pptr = amdgpu_sriov_vf(psp->adev) ? &tmr_buf : NULL;
759-
ret = amdgpu_bo_create_kernel(psp->adev, tmr_size, PSP_TMR_SIZE(psp->adev),
759+
ret = amdgpu_bo_create_kernel(psp->adev, tmr_size, PSP_TMR_ALIGNMENT,
760760
AMDGPU_GEM_DOMAIN_VRAM,
761761
&psp->tmr_bo, &psp->tmr_mc_addr, pptr);
762762

drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
#define PSP_CMD_BUFFER_SIZE 0x1000
3737
#define PSP_1_MEG 0x100000
3838
#define PSP_TMR_SIZE(adev) ((adev)->asic_type == CHIP_ALDEBARAN ? 0x800000 : 0x400000)
39+
#define PSP_TMR_ALIGNMENT 0x100000
3940
#define PSP_FW_NAME_LEN 0x24
4041

4142
enum psp_shared_mem_size {

0 commit comments

Comments
 (0)