Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/amdgpu: remove redundant AMDGPU_HAS_VRAM

AMDGPU_HAS_VRAM is redundant with is_app_apu, as both refer to
APUs with no carve-out. Since AMDGPU_HAS_VRAM only occurs once,
remove AMDGPU_HAS_VRAM definition. The tmr allocation can be covered
with AMDGPU_GEM_DOMAIN_GTT | AMDGPU_GEM_DOMAIN_VRAM in both vram and
non vram ASICs.

Signed-off-by: Yifan Zhang <yifan1.zhang@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Yifan Zhang and committed by
Alex Deucher
e68197aa b9dba6a6

+1 -9
-6
drivers/gpu/drm/amd/amdgpu/amdgpu.h
··· 946 946 AMDGPU_ENFORCE_ISOLATION_NO_CLEANER_SHADER = 3, 947 947 }; 948 948 949 - 950 - /* 951 - * Non-zero (true) if the GPU has VRAM. Zero (false) otherwise. 952 - */ 953 - #define AMDGPU_HAS_VRAM(_adev) ((_adev)->gmc.real_vram_size) 954 - 955 949 struct amdgpu_device { 956 950 struct device *dev; 957 951 struct pci_dev *pdev;
+1 -3
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
··· 880 880 pptr = amdgpu_sriov_vf(psp->adev) ? &tmr_buf : NULL; 881 881 ret = amdgpu_bo_create_kernel(psp->adev, tmr_size, 882 882 PSP_TMR_ALIGNMENT, 883 - AMDGPU_HAS_VRAM(psp->adev) ? 884 - AMDGPU_GEM_DOMAIN_VRAM : 885 - AMDGPU_GEM_DOMAIN_GTT, 883 + AMDGPU_GEM_DOMAIN_GTT | AMDGPU_GEM_DOMAIN_VRAM, 886 884 &psp->tmr_bo, &psp->tmr_mc_addr, 887 885 pptr); 888 886 }