0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024 #ifndef __AMDGPU_DF_H__
0025 #define __AMDGPU_DF_H__
0026
0027 struct amdgpu_df_hash_status {
0028 bool hash_64k;
0029 bool hash_2m;
0030 bool hash_1g;
0031 };
0032
0033 struct amdgpu_df_funcs {
0034 void (*sw_init)(struct amdgpu_device *adev);
0035 void (*sw_fini)(struct amdgpu_device *adev);
0036 void (*enable_broadcast_mode)(struct amdgpu_device *adev,
0037 bool enable);
0038 u32 (*get_fb_channel_number)(struct amdgpu_device *adev);
0039 u32 (*get_hbm_channel_number)(struct amdgpu_device *adev);
0040 void (*update_medium_grain_clock_gating)(struct amdgpu_device *adev,
0041 bool enable);
0042 void (*get_clockgating_state)(struct amdgpu_device *adev,
0043 u64 *flags);
0044 void (*enable_ecc_force_par_wr_rmw)(struct amdgpu_device *adev,
0045 bool enable);
0046 int (*pmc_start)(struct amdgpu_device *adev, uint64_t config,
0047 int counter_idx, int is_add);
0048 int (*pmc_stop)(struct amdgpu_device *adev, uint64_t config,
0049 int counter_idx, int is_remove);
0050 void (*pmc_get_count)(struct amdgpu_device *adev, uint64_t config,
0051 int counter_idx, uint64_t *count);
0052 uint64_t (*get_fica)(struct amdgpu_device *adev, uint32_t ficaa_val);
0053 void (*set_fica)(struct amdgpu_device *adev, uint32_t ficaa_val,
0054 uint32_t ficadl_val, uint32_t ficadh_val);
0055 bool (*query_ras_poison_mode)(struct amdgpu_device *adev);
0056 };
0057
0058 struct amdgpu_df {
0059 struct amdgpu_df_hash_status hash_status;
0060 const struct amdgpu_df_funcs *funcs;
0061 };
0062
0063 #endif