summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/include
diff options
context:
space:
mode:
authorHarish Kasiviswanathan <Harish.Kasiviswanathan@amd.com>2017-12-08 23:08:41 -0500
committerOded Gabbay <oded.gabbay@gmail.com>2017-12-08 23:08:41 -0500
commit4073ed7838efc10b3dcc08ee72918a16ba14de28 (patch)
tree5f7953f7f1dc4ecdb6596d0e8417ab152325df95 /drivers/gpu/drm/amd/include
parentebdebf428ae6b5921cc25913672b954c6897d349 (diff)
drm/amd: Add get_local_mem_info to KGD-KFD interface
Add get_local_mem_info which provides more information about local memory than get_vmem_size: - public and private framebuffer size - memory clock Signed-off-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com> Signed-off-by: Ben Goz <ben.goz@amd.com> Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com> Reviewed-by: Oded Gabbay <oded.gabbay@gmail.com> Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
Diffstat (limited to 'drivers/gpu/drm/amd/include')
-rw-r--r--drivers/gpu/drm/amd/include/kgd_kfd_interface.h12
1 files changed, 12 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 3a93ffeae1ae..c58389c88911 100644
--- a/drivers/gpu/drm/amd/include/kgd_kfd_interface.h
+++ b/drivers/gpu/drm/amd/include/kgd_kfd_interface.h
@@ -60,6 +60,14 @@ struct kfd_cu_info {
uint32_t cu_bitmap[4][4];
};
+/* For getting GPU local memory information from KGD */
+struct kfd_local_mem_info {
+ uint64_t local_mem_size_private;
+ uint64_t local_mem_size_public;
+ uint32_t vram_width;
+ uint32_t mem_clk_max;
+};
+
enum kgd_memory_pool {
KGD_POOL_SYSTEM_CACHEABLE = 1,
KGD_POOL_SYSTEM_WRITECOMBINE = 2,
@@ -122,6 +130,8 @@ struct tile_config {
*
* @get_vmem_size: Retrieves (physical) size of VRAM
*
+ * @get_local_mem_info: Retrieves information about GPU local memory
+ *
* @get_gpu_clock_counter: Retrieves GPU clock counter
*
* @get_max_engine_clock_in_mhz: Retrieves maximum GPU clock in MHz
@@ -181,6 +191,8 @@ struct kfd2kgd_calls {
void (*free_gtt_mem)(struct kgd_dev *kgd, void *mem_obj);
uint64_t (*get_vmem_size)(struct kgd_dev *kgd);
+ void (*get_local_mem_info)(struct kgd_dev *kgd,
+ struct kfd_local_mem_info *mem_info);
uint64_t (*get_gpu_clock_counter)(struct kgd_dev *kgd);
uint32_t (*get_max_engine_clock_in_mhz)(struct kgd_dev *kgd);