[PATCH 1/2] drm/admgpu: add data struct for vram check

Xiaojian Du Xiaojian.Du at amd.com
Thu Jan 13 07:45:25 UTC 2022


This patch is to add data struct for vram check.

Signed-off-by: Xiaojian Du <Xiaojian.Du at amd.com>
Reviewed-by: Huang Rui <ray.huang at amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
index 64cd80d050eb..13196e50a98a 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
@@ -928,6 +928,11 @@ struct amdgpu_device {
 	uint32_t			bios_scratch_reg_offset;
 	uint32_t			bios_scratch[AMDGPU_BIOS_NUM_SCRATCH];
 
+	/* vram check */
+	struct amdgpu_bo                *vram_bo;
+	uint64_t                        vram_gpu;
+	void                            *vram_ptr;
+
 	/* Direct GMA */
 	struct amdgpu_direct_gma	direct_gma;
 	/* SSG */
-- 
2.25.1



More information about the amd-gfx mailing list