drm/amdgpu: detect current GPU memory partition mode
authorRajneesh Bhardwaj <rajneesh.bhardwaj@amd.com>
Tue, 5 Apr 2022 17:00:13 +0000 (13:00 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 9 Jun 2023 13:48:42 +0000 (09:48 -0400)
commitea2d2f8ececdd4c778b66e19b82ce278dfc5e1c4
treee25d554abf3e7e7253dda0bf8d0950544621886b
parent6b7ec18b045ff524eab94340e18feefe9a783d2e
drm/amdgpu: detect current GPU memory partition mode

 - Add helpers to detect the current GPU memory partition.
 - Add current memory partition mode sysfs node.

Tested-by: Ori Messinger <Ori.Messinger@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Rajneesh Bhardwaj <rajneesh.bhardwaj@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h
drivers/gpu/drm/amd/amdgpu/amdgpu_nbio.h
drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c
drivers/gpu/drm/amd/amdgpu/nbio_v7_9.c