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: Read memory vendor information

Read VRAM vendor information from scratch register for GC v9.4.3 and
GC v9.5.0 SOCs.

Signed-off-by: Lijo Lazar <lijo.lazar@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Lijo Lazar and committed by
Alex Deucher
c3cdc3be e09b081d

+8
+8
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
··· 1834 1834 1835 1835 static void gmc_v9_4_3_init_vram_info(struct amdgpu_device *adev) 1836 1836 { 1837 + static const u32 regBIF_BIOS_SCRATCH_4 = 0x50; 1838 + u32 vram_info; 1839 + 1837 1840 adev->gmc.vram_type = AMDGPU_VRAM_TYPE_HBM; 1838 1841 adev->gmc.vram_width = 128 * 64; 1839 1842 1840 1843 if (amdgpu_ip_version(adev, GC_HWIP, 0) == IP_VERSION(9, 5, 0)) 1841 1844 adev->gmc.vram_type = AMDGPU_VRAM_TYPE_HBM3E; 1845 + 1846 + if (!(adev->flags & AMD_IS_APU) && !amdgpu_sriov_vf(adev)) { 1847 + vram_info = RREG32(regBIF_BIOS_SCRATCH_4); 1848 + adev->gmc.vram_vendor = vram_info & 0xF; 1849 + } 1842 1850 } 1843 1851 1844 1852 static int gmc_v9_0_sw_init(struct amdgpu_ip_block *ip_block)