From d01c361af5c21be6a22a595f2338b3716ce7f417 Mon Sep 17 00:00:00 2001 From: Jammy Zhou Date: Mon, 3 Aug 2015 15:46:42 +0800 Subject: [PATCH] amdgpu: expose the PCI revision ID MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The PCI revision ID can be used to differentiate ASICs. Signed-off-by: Jammy Zhou Reviewed-by: Christian König --- amdgpu/amdgpu.h | 2 ++ amdgpu/amdgpu_gpu_info.c | 1 + 2 files changed, 3 insertions(+) diff --git a/amdgpu/amdgpu.h b/amdgpu/amdgpu.h index 06020d96..a90c1ac7 100644 --- a/amdgpu/amdgpu.h +++ b/amdgpu/amdgpu.h @@ -466,6 +466,8 @@ struct amdgpu_gpu_info { uint32_t ce_ram_size; /* vce harvesting instance */ uint32_t vce_harvest_config; + /* PCI revision ID */ + uint32_t pci_rev_id; }; diff --git a/amdgpu/amdgpu_gpu_info.c b/amdgpu/amdgpu_gpu_info.c index 41679b62..16a463e0 100644 --- a/amdgpu/amdgpu_gpu_info.c +++ b/amdgpu/amdgpu_gpu_info.c @@ -162,6 +162,7 @@ int amdgpu_query_gpu_info_init(amdgpu_device_handle dev) dev->info.vram_bit_width = dev->dev_info.vram_bit_width; dev->info.ce_ram_size = dev->dev_info.ce_ram_size; dev->info.vce_harvest_config = dev->dev_info.vce_harvest_config; + dev->info.pci_rev_id = dev->dev_info.pci_rev; for (i = 0; i < (int)dev->info.num_shader_engines; i++) { unsigned instance = (i << AMDGPU_INFO_MMR_SE_INDEX_SHIFT) |