drm/amdgpu: Add fallback path for discovery info
authorLijo Lazar <lijo.lazar@amd.com>
Mon, 30 Jan 2023 04:18:39 +0000 (09:48 +0530)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 9 Jun 2023 13:55:45 +0000 (09:55 -0400)
commitac772a3c07cad66df46b2781f39121be211d383e
tree2aa28e90312555334a04f751b3df058d4f28856a
parent368bb1bcfb3a3bc70793cd347abe0bc60c01d94b
drm/amdgpu: Add fallback path for discovery info

If SOC doesn't expose dedicated vram, discovery region may be
available through system memory. Rename the existing interface to
generic read_binary_from_mem and add a fallback path to read from system
memory.

Signed-off-by: Lijo Lazar <lijo.lazar@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c