aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorOded Gabbay <oded.gabbay@amd.com>2014-11-09 05:42:22 -0500
committerOded Gabbay <oded.gabbay@amd.com>2014-11-09 05:42:22 -0500
commit61466c651fc2faffe89000e9d42661f6ab81d8e4 (patch)
tree925d30b72ea5a044125d57b6361cd3e7af9b7f73 /drivers/gpu
parent97bf6af1f928216fd6c5a66e8a57bfa95a659672 (diff)
drm/amd: Add get_fw_version to kfd-->kgd interface
This patch adds a new interface to the kfd-->kgd interface. The new interface function retrieves the firmware version that is currently in use by the MEC engine. The firmware was uploaded to the MEC engine by the kgd (radeon). v2: Added parameter of engine type to interface function Signed-off-by: Oded Gabbay <oded.gabbay@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/amd/include/kgd_kfd_interface.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/include/kgd_kfd_interface.h b/drivers/gpu/drm/amd/include/kgd_kfd_interface.h
index 9c729dd8dd50..47b551970a14 100644
--- a/drivers/gpu/drm/amd/include/kgd_kfd_interface.h
+++ b/drivers/gpu/drm/amd/include/kgd_kfd_interface.h
@@ -45,6 +45,17 @@ enum kgd_memory_pool {
45 KGD_POOL_FRAMEBUFFER = 3, 45 KGD_POOL_FRAMEBUFFER = 3,
46}; 46};
47 47
48enum kgd_engine_type {
49 KGD_ENGINE_PFP = 1,
50 KGD_ENGINE_ME,
51 KGD_ENGINE_CE,
52 KGD_ENGINE_MEC1,
53 KGD_ENGINE_MEC2,
54 KGD_ENGINE_RLC,
55 KGD_ENGINE_SDMA,
56 KGD_ENGINE_MAX
57};
58
48struct kgd2kfd_shared_resources { 59struct kgd2kfd_shared_resources {
49 /* Bit n == 1 means VMID n is available for KFD. */ 60 /* Bit n == 1 means VMID n is available for KFD. */
50 unsigned int compute_vmid_bitmap; 61 unsigned int compute_vmid_bitmap;
@@ -137,6 +148,8 @@ struct kgd2kfd_calls {
137 * 148 *
138 * @hqd_destroy: Destructs and preempts the queue assigned to that hqd slot. 149 * @hqd_destroy: Destructs and preempts the queue assigned to that hqd slot.
139 * 150 *
151 * @get_fw_version: Returns FW versions from the header
152 *
140 * This structure contains function pointers to services that the kgd driver 153 * This structure contains function pointers to services that the kgd driver
141 * provides to amdkfd driver. 154 * provides to amdkfd driver.
142 * 155 *
@@ -176,6 +189,8 @@ struct kfd2kgd_calls {
176 int (*hqd_destroy)(struct kgd_dev *kgd, uint32_t reset_type, 189 int (*hqd_destroy)(struct kgd_dev *kgd, uint32_t reset_type,
177 unsigned int timeout, uint32_t pipe_id, 190 unsigned int timeout, uint32_t pipe_id,
178 uint32_t queue_id); 191 uint32_t queue_id);
192 uint16_t (*get_fw_version)(struct kgd_dev *kgd,
193 enum kgd_engine_type type);
179}; 194};
180 195
181bool kgd2kfd_init(unsigned interface_version, 196bool kgd2kfd_init(unsigned interface_version,