amd/common: add chip_class to ac_llvm_context
[mesa.git] / src / amd / common / ac_gpu_info.h
index 3785eb4d164e41bafe38708cadc4ba12dc5200cd..5722709d24f97ac952fa70001f6f655030a6e4bc 100644 (file)
 #ifndef AC_GPU_INFO_H
 #define AC_GPU_INFO_H
 
+#include <stddef.h>
+#include <stdint.h>
+#include <stdbool.h>
 #include "amd_family.h"
 
-#include <amdgpu.h>
-
 #ifdef __cplusplus
 extern "C" {
 #endif
 
+/* Prior to C11 the following may trigger a typedef redeclaration warning */
+typedef struct amdgpu_device *amdgpu_device_handle;
+struct amdgpu_gpu_info;
+
 struct radeon_info {
        /* PCI info: domain:bus:dev:func */
        uint32_t                    pci_domain;
@@ -55,14 +60,17 @@ struct radeon_info {
        bool                        has_dedicated_vram;
        bool                        has_virtual_memory;
        bool                        gfx_ib_pad_with_type2;
-       bool                        has_uvd;
+       bool                        has_hw_decode;
        uint32_t                    num_sdma_rings;
        uint32_t                    num_compute_rings;
        uint32_t                    uvd_fw_version;
        uint32_t                    vce_fw_version;
        uint32_t                    me_fw_version;
+       uint32_t                    me_fw_feature;
        uint32_t                    pfp_fw_version;
+       uint32_t                    pfp_fw_feature;
        uint32_t                    ce_fw_version;
+       uint32_t                    ce_fw_feature;
        uint32_t                    vce_harvest_config;
        uint32_t                    clock_crystal_freq;
        uint32_t                    tcc_cache_line_size;
@@ -72,6 +80,7 @@ struct radeon_info {
        uint32_t                    drm_minor;
        uint32_t                    drm_patchlevel;
        bool                        has_userptr;
+       bool                        has_syncobj;
 
        /* Shader cores. */
        uint32_t                    r600_max_quad_pipes; /* wave size / 16 */
@@ -91,6 +100,7 @@ struct radeon_info {
        uint32_t                    pipe_interleave_bytes;
        uint32_t                    enabled_rb_mask; /* GCN harvest config */
 
+       uint64_t                    max_alignment; /* from addrlib */
        /* Tile modes. */
        uint32_t                    si_tile_mode_array[32];
        uint32_t                    cik_macrotile_mode_array[16];
@@ -100,6 +110,10 @@ bool ac_query_gpu_info(int fd, amdgpu_device_handle dev,
                       struct radeon_info *info,
                       struct amdgpu_gpu_info *amdinfo);
 
+void ac_compute_driver_uuid(char *uuid, size_t size);
+
+void ac_compute_device_uuid(struct radeon_info *info, char *uuid, size_t size);
+
 #ifdef __cplusplus
 }
 #endif