drm/amdgpu: detect current GPU memory partition mode
Subsystems (2)
Alex Deucher
maintainerPATCH 1/9 drm/amdgpu: detect current GPU memory partition mode
From: Rajneesh Bhardwaj <[email protected]>
- Add helpers to detect the current GPU memory partition.
- Add current memory partition mode sysfs node.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 25 ++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h | 11 +++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_nbio.h | 1 + drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c | 11 +++++++++++ drivers/gpu/drm/amd/amdgpu/nbio_v7_9.c | 12 ++++++++++++ 5 files changed, 60 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c +25 -0
@@ -1122,6 +1122,24 @@ static ssize_t amdgpu_gfx_get_current_compute_partition(struct device *dev,return sysfs_emit (buf,"%s\n" , partition_mode); } +static ssize_t amdgpu_gfx_get_current_memory_partition (struct device *dev, +struct device_attribute *addr, +char *buf) +{ +struct drm_device *ddev =dev_get_drvdata (dev); +struct amdgpu_device *adev =drm_to_adev (ddev); +enum amdgpu_memory_partition mode; +static const char *partition_modes[] = { +"UNKNOWN" ,"NPS1" ,"NPS2" ,"NPS4" ,"NPS8" + }; +BUILD_BUG_ON (ARRAY_SIZE (partition_modes) <=AMDGPU_NPS8_PARTITION_MODE ); + + mode =min ((int )adev->gfx.funcs->query_mem_partition_mode (adev), +AMDGPU_NPS8_PARTITION_MODE ); + +return sysfs_emit (buf,"%s\n" , partition_modes[mode]); +} +static ssize_t amdgpu_gfx_set_compute_partition (struct device *dev,struct device_attribute *addr,const char *buf,size_t count)
@@ -1229,6 +1247,9 @@ static DEVICE_ATTR(current_compute_partition, S_IRUGO | S_IWUSR, static DEVICE_ATTR(available_compute_partition, S_IRUGO, amdgpu_gfx_get_available_compute_partition, NULL); +static DEVICE_ATTR(current_memory_partition, S_IRUGO, + amdgpu_gfx_get_current_memory_partition, NULL); +int amdgpu_gfx_sysfs_init (struct amdgpu_device *adev) {int r;
@@ -1241,5 +1262,9 @@ int amdgpu_gfx_sysfs_init(struct amdgpu_device *adev)if (r)return r; + r =device_create_file (adev->dev, &dev_attr_current_memory_partition); +if (r) +return r; +return 0 ; }
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h +11 -0
@@ -71,6 +71,14 @@ enum amdgpu_pkg_type { AMDGPU_PKG_TYPE_UNKNOWN, }; +enum amdgpu_memory_partition { +UNKNOWN_MEMORY_PARTITION_MODE =0 , +AMDGPU_NPS1_PARTITION_MODE =1 , +AMDGPU_NPS2_PARTITION_MODE =2 , +AMDGPU_NPS4_PARTITION_MODE =3 , +AMDGPU_NPS8_PARTITION_MODE =4 , +}; +struct amdgpu_mec {struct amdgpu_bo *hpd_eop_obj;u64 hpd_eop_gpu_addr;
@@ -259,6 +267,8 @@ struct amdgpu_gfx_funcs {void (*update_perfmon_mgcg)(struct amdgpu_device *adev,bool enable);enum amdgpu_gfx_partition (*query_partition_mode)(struct amdgpu_device *adev); +enum amdgpu_memory_partition + (*query_mem_partition_mode)(struct amdgpu_device *adev);int (*switch_partition_mode)(struct amdgpu_device *adev,enum amdgpu_gfx_partition mode); };
@@ -393,6 +403,7 @@ struct amdgpu_gfx {enum amdgpu_gfx_partition partition_mode;uint16_t xcc_mask; +enum amdgpu_memory_partition mem_partition_mode;uint32_t num_xcc_per_xcp;struct mutex partition_mutex; };
drivers/gpu/drm/amd/amdgpu/amdgpu_nbio.h +1 -0
@@ -97,6 +97,7 @@ struct amdgpu_nbio_funcs {void (*clear_doorbell_interrupt)(struct amdgpu_device *adev);u32 (*get_rom_offset)(struct amdgpu_device *adev);u32 (*get_compute_partition_mode)(struct amdgpu_device *adev); +u32 (*get_memory_partition_mode)(struct amdgpu_device *adev);void (*set_compute_partition_mode)(struct amdgpu_device *adev,enum amdgpu_gfx_partition mode); };
drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c +11 -0
@@ -611,6 +611,16 @@ static void gfx_v9_4_3_select_me_pipe_q(struct amdgpu_device *adev, {soc15_grbm_select (adev, me, pipe, q, vm,GET_INST (GC , xcc_id)); } +static enum amdgpu_memory_partition +gfx_v9_4_3_query_memory_partition (struct amdgpu_device *adev) +{ +enum amdgpu_memory_partition mode =UNKNOWN_MEMORY_PARTITION_MODE ; + +if (adev->nbio.funcs->get_memory_partition_mode) + mode = adev->nbio.funcs->get_memory_partition_mode (adev); + +return mode; +}static enum amdgpu_gfx_partition gfx_v9_4_3_query_compute_partition (struct amdgpu_device *adev)
@@ -680,6 +690,7 @@ static const struct amdgpu_gfx_funcs gfx_v9_4_3_gfx_funcs = { .select_me_pipe_q = &gfx_v9_4_3_select_me_pipe_q, .query_partition_mode = &gfx_v9_4_3_query_compute_partition, .switch_partition_mode = &gfx_v9_4_3_switch_compute_partition, + .query_mem_partition_mode = &gfx_v9_4_3_query_memory_partition, };static int gfx_v9_4_3_gpu_early_init (struct amdgpu_device *adev)
drivers/gpu/drm/amd/amdgpu/nbio_v7_9.c +12 -0
@@ -30,6 +30,8 @@#include "ivsrcid/nbio/irqsrcs_nbif_7_4.h" #include <uapi/linux/kfd_ioctl.h> +#define NPS_MODE_MASK 0x000000FFL +static void nbio_v7_9_remap_hdp_registers (struct amdgpu_device *adev) { WREG32_SOC15(NBIO, 0, regBIF_BX0_REMAP_HDP_MEM_FLUSH_CNTL,
@@ -406,6 +408,15 @@ static void nbio_v7_9_set_compute_partition_mode(struct amdgpu_device *adev,WREG32_SOC15 (NBIO ,0 , regBIF_BX_PF0_PARTITION_COMPUTE_STATUS, tmp); } +static enum amdgpu_memory_partition nbio_v7_9_get_memory_partition_mode (struct amdgpu_device *adev) +{ +u32 tmp; + tmp =RREG32_SOC15 (NBIO ,0 , regBIF_BX_PF0_PARTITION_MEM_STATUS); + tmp =REG_GET_FIELD (tmp,BIF_BX_PF0_PARTITION_MEM_STATUS ,NPS_MODE ); + +return ffs (tmp); +} +const struct amdgpu_nbio_funcs nbio_v7_9_funcs = { .get_hdp_flush_req_offset = nbio_v7_9_get_hdp_flush_req_offset, .get_hdp_flush_done_offset = nbio_v7_9_get_hdp_flush_done_offset,
@@ -428,4 +439,5 @@ const struct amdgpu_nbio_funcs nbio_v7_9_funcs = { .remap_hdp_registers = nbio_v7_9_remap_hdp_registers, .get_compute_partition_mode = nbio_v7_9_get_compute_partition_mode, .set_compute_partition_mode = nbio_v7_9_set_compute_partition_mode, + .get_memory_partition_mode = nbio_v7_9_get_memory_partition_mode, };
Signature · 1 line
2.39.2
Alex Deucher
maintainerPATCH 2/9 drm/amdgpu: Revert programming of CP_PSP_XCP_CTL
From: Lijo Lazar <[email protected]>
Programming of this register is taken care by PSP. Incorrect programming causes CP not to detect its XCC.
--- drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c | 3 --- 1 file changed, 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c +0 -3
@@ -1060,9 +1060,6 @@ static void gfx_v9_4_3_program_xcc_id(struct amdgpu_device *adev, int xcc_id) tmp = tmp | (adev->gfx.num_xcc_per_xcp <<REG_FIELD_SHIFT (CP_HYP_XCP_CTL ,NUM_XCC_IN_XCP ));WREG32_SOC15 (GC ,GET_INST (GC , xcc_id), regCP_HYP_XCP_CTL, tmp); - tmp = xcc_id <<REG_FIELD_SHIFT (CP_PSP_XCP_CTL ,PHYSICAL_XCC_ID ); - tmp = tmp | (xcc_id <<REG_FIELD_SHIFT (CP_PSP_XCP_CTL ,XCC_DIE_ID )); -WREG32_SOC15 (GC ,GET_INST (GC , xcc_id), regCP_PSP_XCP_CTL, tmp);break ;default :break ;
Signature · 1 line
2.39.2
Alex Deucher
maintainerPATCH 3/9 drm/amdgpu: fix vm context register assignment in mmhub v1.8
In reply to Alex DeucherFrom: Le Ma <[email protected]>
Assign the vm context register addr per aid instance.
--- drivers/gpu/drm/amd/amdgpu/mmhub_v1_8.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
drivers/gpu/drm/amd/amdgpu/mmhub_v1_8.c +7 -7
@@ -515,19 +515,19 @@ static void mmhub_v1_8_init(struct amdgpu_device *adev)for (i =0 ; i < adev->num_aid; i++) { hub = &adev->vmhub[AMDGPU_MMHUB0 (i)]; - hub->ctx0_ptb_addr_lo32 =SOC15_REG_OFFSET (MMHUB ,0 , + hub->ctx0_ptb_addr_lo32 =SOC15_REG_OFFSET (MMHUB , i, regVM_CONTEXT0_PAGE_TABLE_BASE_ADDR_LO32); - hub->ctx0_ptb_addr_hi32 =SOC15_REG_OFFSET (MMHUB ,0 , + hub->ctx0_ptb_addr_hi32 =SOC15_REG_OFFSET (MMHUB , i, regVM_CONTEXT0_PAGE_TABLE_BASE_ADDR_HI32); hub->vm_inv_eng0_req = -SOC15_REG_OFFSET (MMHUB ,0 , regVM_INVALIDATE_ENG0_REQ); +SOC15_REG_OFFSET (MMHUB , i, regVM_INVALIDATE_ENG0_REQ); hub->vm_inv_eng0_ack = -SOC15_REG_OFFSET (MMHUB ,0 , regVM_INVALIDATE_ENG0_ACK); +SOC15_REG_OFFSET (MMHUB , i, regVM_INVALIDATE_ENG0_ACK); hub->vm_context0_cntl = -SOC15_REG_OFFSET (MMHUB ,0 , regVM_CONTEXT0_CNTL); - hub->vm_l2_pro_fault_status =SOC15_REG_OFFSET (MMHUB ,0 , +SOC15_REG_OFFSET (MMHUB , i, regVM_CONTEXT0_CNTL); + hub->vm_l2_pro_fault_status =SOC15_REG_OFFSET (MMHUB , i, regVM_L2_PROTECTION_FAULT_STATUS); - hub->vm_l2_pro_fault_cntl =SOC15_REG_OFFSET (MMHUB ,0 , + hub->vm_l2_pro_fault_cntl =SOC15_REG_OFFSET (MMHUB , i, regVM_L2_PROTECTION_FAULT_CNTL); hub->ctx_distance = regVM_CONTEXT1_CNTL - regVM_CONTEXT0_CNTL;
Signature · 1 line
2.39.2
Alex Deucher
maintainerPATCH 4/9 drm/amdgpu: Skip runtime db read for PSP 13.0.6
In reply to Alex DeucherFrom: Lijo Lazar <[email protected]>
Skip reading runtime db information for PSP 13.0.6.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +3 -0
@@ -329,6 +329,9 @@ static bool psp_get_runtime_db_entry(struct amdgpu_device *adev,bool ret = false;int i; +if (adev->ip_versions[MP0_HWIP ][0 ] ==IP_VERSION (13 ,0 ,6 )) +return false; + db_header_pos = adev->gmc.mc_vram_size -PSP_RUNTIME_DB_OFFSET ; db_dir_pos = db_header_pos +sizeof (struct psp_runtime_data_header );
Signature · 1 line
2.39.2
Alex Deucher
maintainerPATCH 5/9 drm/amdgpu: fix kcq mqd_backup buffer double free for multi-XCD
In reply to Alex DeucherFrom: Shiwu Zhang <[email protected]>
For gfx_v9_4_3 and beyond, struct kiq has its own mqd_backup pointer rather than using the last pointer from mec struct. Then the kfree operation on the pointer from the mec struct should be removed otherwise it will cause double free on the first kcq's mqd_backup buffer on XCD1.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 1 - 1 file changed, 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c +0 -1
@@ -472,7 +472,6 @@ void amdgpu_gfx_mqd_sw_fini(struct amdgpu_device *adev, int xcc_id) ring = &kiq->ring;kfree (kiq->mqd_backup); -kfree (adev->gfx.mec.mqd_backup[AMDGPU_MAX_COMPUTE_RINGS ]);amdgpu_bo_free_kernel (&ring->mqd_obj, &ring->mqd_gpu_addr, &ring->mqd_ptr);
Signature · 1 line
2.39.2
Alex Deucher
maintainerPATCH 6/9 drm/amdgpu: remove partition attributes sys file for gfx_v9_4_3
In reply to Alex DeucherFrom: Shiwu Zhang <[email protected]>
For driver de-init like rmmod operations those partition specific attributes need to be removed accordingly.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 7 +++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h | 1 + drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c | 1 + 3 files changed, 9 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c +7 -0
@@ -1267,3 +1267,10 @@ int amdgpu_gfx_sysfs_init(struct amdgpu_device *adev)return 0 ; } + +void amdgpu_gfx_sysfs_fini (struct amdgpu_device *adev) +{ +device_remove_file (adev->dev, &dev_attr_current_compute_partition); +device_remove_file (adev->dev, &dev_attr_available_compute_partition); +device_remove_file (adev->dev, &dev_attr_current_memory_partition); +}
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h +1 -0
@@ -488,4 +488,5 @@ int amdgpu_gfx_poison_consumption_handler(struct amdgpu_device *adev,bool amdgpu_gfx_is_master_xcc (struct amdgpu_device *adev,int xcc_id);int amdgpu_gfx_sysfs_init (struct amdgpu_device *adev); +void amdgpu_gfx_sysfs_fini (struct amdgpu_device *adev);#endif
drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c +1 -0
@@ -900,6 +900,7 @@ static int gfx_v9_4_3_sw_fini(void *handle)gfx_v9_4_3_mec_fini (adev);amdgpu_bo_unref (&adev->gfx.rlc.clear_state_obj);gfx_v9_4_3_free_microcode (adev); +amdgpu_gfx_sysfs_fini (adev);return 0 ; }
Signature · 1 line
2.39.2
Alex Deucher
maintainerPATCH 7/9 drm/amdgpu: more GPU page fault info for GC v9.4.3
In reply to Alex DeucherFrom: Philip Yang <[email protected]>
Output IH cookie node_id and translate it to the corresponding AID id and XCC id, to help debug the GPU page fault.
--- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +8 -3
@@ -555,7 +555,9 @@ static int gmc_v9_0_process_interrupt(struct amdgpu_device *adev,const char *mmhub_cid;const char *hub_name;u64 addr; -uint32_t node_id =0 ; +uint32_t node_id; + + node_id = (adev->ip_versions[GC_HWIP ][0 ] ==IP_VERSION (9 ,4 ,3 )) ? entry->node_id :0 ; addr = (u64 )entry->src_data[0 ] <<12 ; addr |= ((u64 )entry->src_data[1 ] &0xf ) <<44 ;
@@ -568,8 +570,6 @@ static int gmc_v9_0_process_interrupt(struct amdgpu_device *adev, hub = &adev->vmhub[AMDGPU_MMHUB1 (0 )]; }else { hub_name ="gfxhub0" ; - node_id = (adev->ip_versions[GC_HWIP ][0 ] == -IP_VERSION (9 ,4 ,3 )) ? entry->node_id :0 ; hub = &adev->vmhub[node_id/2 ]; }
@@ -616,6 +616,11 @@ static int gmc_v9_0_process_interrupt(struct amdgpu_device *adev, addr, entry->client_id, soc15_ih_clientid_name[entry->client_id]); +if (adev->ip_versions[GC_HWIP ][0 ] ==IP_VERSION (9 ,4 ,3 )) +dev_err (adev->dev," cookie node_id %d fault from die %s%d%s\n" , + node_id, node_id %4 ==3 ?"RSV" :"AID" , node_id /4 , + node_id %4 ==1 ?".XCD0" : node_id %4 ==2 ?".XCD1" :"" ); +if (amdgpu_sriov_vf (adev))return 0 ;
Signature · 1 line
2.39.2
Alex Deucher
maintainerPATCH 8/9 drm/amdgpu: Check APU supports true APP mode
In reply to Alex DeucherFrom: Rajneesh Bhardwaj <[email protected]>
On GPXIP 9.4.3 APU, in no carveout mode there is no real vram heap and could be emulated by the driver over the interleaved NUMA system memory and the APU could also be in the carveout mode during early development stage or otherwise for debugging purpose so introduce a new member in amdgpu_gmc to figure out whether the APU is in the native mode as per the production configuration. AMD_IS_APU cannot be used for Accelerated Processing Platform APUs as it might be used in a different context on previous generations or on small APUs.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h | 1 + drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 14 ++++++++++++++ 2 files changed, 15 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h +1 -0
@@ -250,6 +250,7 @@ struct amdgpu_gmc { uint64_t last_fault:AMDGPU_GMC_FAULT_RING_ORDER;bool tmz_enabled; +bool is_app_apu;const struct amdgpu_gmc_funcs *gmc_funcs;
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +14 -0
@@ -1424,6 +1424,20 @@ static int gmc_v9_0_early_init(void *handle) adev->smuio.funcs->is_host_gpu_xgmi_supported (adev); } +if (adev->ip_versions[GC_HWIP ][0 ] ==IP_VERSION (9 ,4 ,3 )) { +enum amdgpu_pkg_type pkg_type = + adev->smuio.funcs->get_pkg_type (adev); +/* On GFXIP 9.4.3. APU, there is no physical VRAM domain present +* and the APU, can be in used two possible modes: +* - carveout mode +* - native APU mode +* "is_app_apu" can be used to identify the APU in the native +* mode. +*/ + adev->gmc.is_app_apu = (pkg_type ==AMDGPU_PKG_TYPE_APU && + !pci_resource_len (adev->pdev,0 )); + } +gmc_v9_0_set_gmc_funcs (adev);gmc_v9_0_set_irq_funcs (adev);gmc_v9_0_set_umc_funcs (adev);
Signature · 1 line
2.39.2
Alex Deucher
maintainerPATCH 9/9 drm/amdgpu: Rename xcc specific functions
In reply to Alex DeucherFrom: Lijo Lazar <[email protected]>
Add 'xcc' prefix to xcc specific functions to distinguish from IP block functions.
--- drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c | 205 +++++++++++++----------- 1 file changed, 113 insertions(+), 92 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c +113 -92
@@ -511,11 +511,8 @@ static int gfx_v9_4_3_mec_init(struct amdgpu_device *adev)return 0 ; } -static void gfx_v9_4_3_select_se_sh (struct amdgpu_device *adev, -u32 se_num, -u32 sh_num, -u32 instance, -int xcc_id) +static void gfx_v9_4_3_xcc_select_se_sh (struct amdgpu_device *adev,u32 se_num, +u32 sh_num,u32 instance,int xcc_id) {u32 data;
@@ -683,7 +680,7 @@ static int gfx_v9_4_3_switch_compute_partition(struct amdgpu_device *adev,static const struct amdgpu_gfx_funcs gfx_v9_4_3_gfx_funcs = { .get_gpu_clock_counter = &gfx_v9_4_3_get_gpu_clock_counter, - .select_se_sh = &gfx_v9_4_3_select_se_sh, + .select_se_sh = &gfx_v9_4_3_xcc_select_se_sh, .read_wave_data = &gfx_v9_4_3_read_wave_data, .read_wave_sgprs = &gfx_v9_4_3_read_wave_sgprs, .read_wave_vgprs = &gfx_v9_4_3_read_wave_vgprs,
@@ -906,7 +903,8 @@ static int gfx_v9_4_3_sw_fini(void *handle) }#define DEFAULT_SH_MEM_BASES (0x6000) -static void gfx_v9_4_3_init_compute_vmid (struct amdgpu_device *adev,int xcc_id) +static void gfx_v9_4_3_xcc_init_compute_vmid (struct amdgpu_device *adev, +int xcc_id) {int i;uint32_t sh_mem_config;
@@ -944,7 +942,7 @@ static void gfx_v9_4_3_init_compute_vmid(struct amdgpu_device *adev, int xcc_id) } } -static void gfx_v9_4_3_init_gds_vmid (struct amdgpu_device *adev,int xcc_id) +static void gfx_v9_4_3_xcc_init_gds_vmid (struct amdgpu_device *adev,int xcc_id) {int vmid;
@@ -1005,25 +1003,26 @@ static void gfx_v9_4_3_constants_init(struct amdgpu_device *adev)mutex_unlock (&adev->srbm_mutex);for (i =0 ; i < num_xcc; i++) { -gfx_v9_4_3_init_compute_vmid (adev, i); -gfx_v9_4_3_init_gds_vmid (adev, i); +gfx_v9_4_3_xcc_init_compute_vmid (adev, i); +gfx_v9_4_3_xcc_init_gds_vmid (adev, i); } } -static void gfx_v9_4_3_enable_save_restore_machine (struct amdgpu_device *adev, -int xcc_id) +static void +gfx_v9_4_3_xcc_enable_save_restore_machine (struct amdgpu_device *adev, +int xcc_id) {WREG32_FIELD15_PREREG (GC ,GET_INST (GC , xcc_id),RLC_SRM_CNTL ,SRM_ENABLE ,1 ); } -static void gfx_v9_4_3_init_pg (struct amdgpu_device *adev,int xcc_id) +static void gfx_v9_4_3_xcc_init_pg (struct amdgpu_device *adev,int xcc_id) {/* * Rlc save restore list is workable since v2_1. * And it's needed by gfxoff feature. */ if (adev->gfx.rlc.is_rlc_v2_1) -gfx_v9_4_3_enable_save_restore_machine (adev, xcc_id); +gfx_v9_4_3_xcc_enable_save_restore_machine (adev, xcc_id); if (adev->pg_flags & (AMD_PG_SUPPORT_GFX_PG | AMD_PG_SUPPORT_GFX_SMG |
@@ -1036,7 +1035,7 @@ static void gfx_v9_4_3_init_pg(struct amdgpu_device *adev, int xcc_id) } } -void gfx_v9_4_3_disable_gpa_mode (struct amdgpu_device *adev,int xcc_id) +void gfx_v9_4_3_xcc_disable_gpa_mode (struct amdgpu_device *adev,int xcc_id) {uint32_t data;
@@ -1045,7 +1044,8 @@ void gfx_v9_4_3_disable_gpa_mode(struct amdgpu_device *adev, int xcc_id)WREG32_SOC15 (GC ,GET_INST (GC , xcc_id), regCPC_PSP_DEBUG, data); } -static void gfx_v9_4_3_program_xcc_id (struct amdgpu_device *adev,int xcc_id) +static void gfx_v9_4_3_xcc_program_xcc_id (struct amdgpu_device *adev, +int xcc_id) {uint32_t tmp =0 ;int num_xcc;
@@ -1079,7 +1079,7 @@ static bool gfx_v9_4_3_is_rlc_enabled(struct amdgpu_device *adev)return true; } -static void gfx_v9_4_3_set_safe_mode (struct amdgpu_device *adev,int xcc_id) +static void gfx_v9_4_3_xcc_set_safe_mode (struct amdgpu_device *adev,int xcc_id) {uint32_t data;unsigned i;
@@ -1096,7 +1096,8 @@ static void gfx_v9_4_3_set_safe_mode(struct amdgpu_device *adev, int xcc_id) } } -static void gfx_v9_4_3_unset_safe_mode (struct amdgpu_device *adev,int xcc_id) +static void gfx_v9_4_3_xcc_unset_safe_mode (struct amdgpu_device *adev, +int xcc_id) {uint32_t data;
@@ -1113,8 +1114,8 @@ static int gfx_v9_4_3_rlc_init(struct amdgpu_device *adev)return 0 ; } -static void gfx_v9_4_3_wait_for_rlc_serdes (struct amdgpu_device *adev, -int xcc_id) +static void gfx_v9_4_3_xcc_wait_for_rlc_serdes (struct amdgpu_device *adev, +int xcc_id) {u32 i, j, k;u32 mask;
@@ -1122,16 +1123,17 @@ static void gfx_v9_4_3_wait_for_rlc_serdes(struct amdgpu_device *adev,mutex_lock (&adev->grbm_idx_mutex);for (i =0 ; i < adev->gfx.config.max_shader_engines; i++) {for (j =0 ; j < adev->gfx.config.max_sh_per_se; j++) { -gfx_v9_4_3_select_se_sh (adev, i, j,0xffffffff , xcc_id); +gfx_v9_4_3_xcc_select_se_sh (adev, i, j,0xffffffff , + xcc_id);for (k =0 ; k < adev->usec_timeout; k++) {if (RREG32_SOC15 (GC ,GET_INST (GC ,0 ), regRLC_SERDES_CU_MASTER_BUSY) ==0 )break ;udelay (1 ); }if (k == adev->usec_timeout) { -gfx_v9_4_3_select_se_sh (adev,0xffffffff , -0xffffffff ,0xffffffff , - xcc_id); +gfx_v9_4_3_xcc_select_se_sh (adev,0xffffffff , +0xffffffff , +0xffffffff , xcc_id);mutex_unlock (&adev->grbm_idx_mutex);DRM_INFO ("Timeout wait for RLC serdes %u,%u\n" , i, j);
@@ -1139,7 +1141,8 @@ static void gfx_v9_4_3_wait_for_rlc_serdes(struct amdgpu_device *adev, } } } -gfx_v9_4_3_select_se_sh (adev,0xffffffff ,0xffffffff ,0xffffffff , xcc_id); +gfx_v9_4_3_xcc_select_se_sh (adev,0xffffffff ,0xffffffff ,0xffffffff , + xcc_id);mutex_unlock (&adev->grbm_idx_mutex); mask = RLC_SERDES_NONCU_MASTER_BUSY__SE_MASTER_BUSY_MASK |
@@ -1153,8 +1156,8 @@ static void gfx_v9_4_3_wait_for_rlc_serdes(struct amdgpu_device *adev, } } -static void gfx_v9_4_3_enable_gui_idle_interrupt (struct amdgpu_device *adev, -bool enable,int xcc_id) +static void gfx_v9_4_3_xcc_enable_gui_idle_interrupt (struct amdgpu_device *adev, +bool enable,int xcc_id) {u32 tmp;
@@ -1176,8 +1179,8 @@ static void gfx_v9_4_3_rlc_stop(struct amdgpu_device *adev) num_xcc =NUM_XCC (adev->gfx.xcc_mask);for (i =0 ; i < num_xcc; i++) {WREG32_FIELD15_PREREG (GC ,GET_INST (GC , i),RLC_CNTL ,RLC_ENABLE_F32 ,0 ); -gfx_v9_4_3_enable_gui_idle_interrupt (adev, false, i); -gfx_v9_4_3_wait_for_rlc_serdes (adev, i); +gfx_v9_4_3_xcc_enable_gui_idle_interrupt (adev, false, i); +gfx_v9_4_3_xcc_wait_for_rlc_serdes (adev, i); } }
@@ -1208,7 +1211,7 @@ static void gfx_v9_4_3_rlc_start(struct amdgpu_device *adev)/* carrizo do enable cp interrupt after cp inited */ if (!(adev->flags &AMD_IS_APU )) { -gfx_v9_4_3_enable_gui_idle_interrupt (adev, true, i); +gfx_v9_4_3_xcc_enable_gui_idle_interrupt (adev, true, i);udelay (50 ); }
@@ -1231,7 +1234,8 @@ static void gfx_v9_4_3_rlc_start(struct amdgpu_device *adev) } } -static int gfx_v9_4_3_rlc_load_microcode (struct amdgpu_device *adev,int xcc_id) +static int gfx_v9_4_3_xcc_rlc_load_microcode (struct amdgpu_device *adev, +int xcc_id) {const struct rlc_firmware_header_v2_0 *hdr;const __le32 *fw_data;
@@ -1272,11 +1276,11 @@ static int gfx_v9_4_3_rlc_resume(struct amdgpu_device *adev)/* disable CG */ WREG32_SOC15 (GC ,GET_INST (GC , i), regRLC_CGCG_CGLS_CTRL,0 ); -gfx_v9_4_3_init_pg (adev, i); +gfx_v9_4_3_xcc_init_pg (adev, i);if (adev->firmware.load_type !=AMDGPU_FW_LOAD_PSP ) {/* legacy rlc firmware loading */ - r =gfx_v9_4_3_rlc_load_microcode (adev, i); + r =gfx_v9_4_3_xcc_rlc_load_microcode (adev, i);if (r)return r; }
@@ -1346,8 +1350,8 @@ static bool gfx_v9_4_3_is_rlcg_access_range(struct amdgpu_device *adev, u32 offs ARRAY_SIZE(rlcg_access_gc_9_4_3)); } -static void gfx_v9_4_3_cp_compute_enable (struct amdgpu_device *adev, -bool enable,int xcc_id) +static void gfx_v9_4_3_xcc_cp_compute_enable (struct amdgpu_device *adev, +bool enable,int xcc_id) {if (enable) {WREG32_SOC15_RLC (GC ,GET_INST (GC , xcc_id), regCP_MEC_CNTL,0 );
@@ -1359,8 +1363,8 @@ static void gfx_v9_4_3_cp_compute_enable(struct amdgpu_device *adev,udelay (50 ); } -static int gfx_v9_4_3_cp_compute_load_microcode (struct amdgpu_device *adev, -int xcc_id) +static int gfx_v9_4_3_xcc_cp_compute_load_microcode (struct amdgpu_device *adev, +int xcc_id) {const struct gfx_firmware_header_v1_0 *mec_hdr;const __le32 *fw_data;
@@ -1372,7 +1376,7 @@ static int gfx_v9_4_3_cp_compute_load_microcode(struct amdgpu_device *adev,if (!adev->gfx.mec_fw)return -EINVAL ; -gfx_v9_4_3_cp_compute_enable (adev, false, xcc_id); +gfx_v9_4_3_xcc_cp_compute_enable (adev, false, xcc_id); mec_hdr = (const struct gfx_firmware_header_v1_0 *)adev->gfx.mec_fw->data;amdgpu_ucode_print_gfx_hdr (&mec_hdr->header);
@@ -1408,7 +1412,7 @@ static int gfx_v9_4_3_cp_compute_load_microcode(struct amdgpu_device *adev, }/* KIQ functions */ -static void gfx_v9_4_3_kiq_setting (struct amdgpu_ring *ring,int xcc_id) +static void gfx_v9_4_3_xcc_kiq_setting (struct amdgpu_ring *ring,int xcc_id) {uint32_t tmp;struct amdgpu_device *adev = ring->adev;
@@ -1563,7 +1567,8 @@ static int gfx_v9_4_3_mqd_init(struct amdgpu_ring *ring)return 0 ; } -static int gfx_v9_4_3_kiq_init_register (struct amdgpu_ring *ring,int xcc_id) +static int gfx_v9_4_3_xcc_kiq_init_register (struct amdgpu_ring *ring, +int xcc_id) {struct amdgpu_device *adev = ring->adev;struct v9_mqd *mqd = ring->mqd_ptr;
@@ -1668,7 +1673,8 @@ static int gfx_v9_4_3_kiq_init_register(struct amdgpu_ring *ring, int xcc_id)return 0 ; } -static int gfx_v9_4_3_kiq_fini_register (struct amdgpu_ring *ring,int xcc_id) +static int gfx_v9_4_3_xcc_kiq_fini_register (struct amdgpu_ring *ring, +int xcc_id) {struct amdgpu_device *adev = ring->adev;int j;
@@ -1707,13 +1713,13 @@ static int gfx_v9_4_3_kiq_fini_register(struct amdgpu_ring *ring, int xcc_id)return 0 ; } -static int gfx_v9_4_3_kiq_init_queue (struct amdgpu_ring *ring,int xcc_id) +static int gfx_v9_4_3_xcc_kiq_init_queue (struct amdgpu_ring *ring,int xcc_id) {struct amdgpu_device *adev = ring->adev;struct v9_mqd *mqd = ring->mqd_ptr;struct v9_mqd *tmp_mqd; -gfx_v9_4_3_kiq_setting (ring, xcc_id); +gfx_v9_4_3_xcc_kiq_setting (ring, xcc_id);/* GPU could be in bad state during probe, driver trigger the reset * after load the SMU, in this case , the mqd is not be initialized.
@@ -1731,7 +1737,7 @@ static int gfx_v9_4_3_kiq_init_queue(struct amdgpu_ring *ring, int xcc_id)amdgpu_ring_clear_ring (ring);mutex_lock (&adev->srbm_mutex);soc15_grbm_select (adev, ring->me, ring->pipe, ring->queue,0 ,GET_INST (GC , xcc_id)); -gfx_v9_4_3_kiq_init_register (ring, xcc_id); +gfx_v9_4_3_xcc_kiq_init_register (ring, xcc_id);soc15_grbm_select (adev,0 ,0 ,0 ,0 ,GET_INST (GC , xcc_id));mutex_unlock (&adev->srbm_mutex); }else {
@@ -1741,7 +1747,7 @@ static int gfx_v9_4_3_kiq_init_queue(struct amdgpu_ring *ring, int xcc_id)mutex_lock (&adev->srbm_mutex);soc15_grbm_select (adev, ring->me, ring->pipe, ring->queue,0 ,GET_INST (GC , xcc_id));gfx_v9_4_3_mqd_init (ring); -gfx_v9_4_3_kiq_init_register (ring, xcc_id); +gfx_v9_4_3_xcc_kiq_init_register (ring, xcc_id);soc15_grbm_select (adev,0 ,0 ,0 ,0 ,GET_INST (GC , xcc_id));mutex_unlock (&adev->srbm_mutex);
@@ -1752,7 +1758,7 @@ static int gfx_v9_4_3_kiq_init_queue(struct amdgpu_ring *ring, int xcc_id)return 0 ; } -static int gfx_v9_4_3_kcq_init_queue (struct amdgpu_ring *ring,int xcc_id) +static int gfx_v9_4_3_xcc_kcq_init_queue (struct amdgpu_ring *ring,int xcc_id) {struct amdgpu_device *adev = ring->adev;struct v9_mqd *mqd = ring->mqd_ptr;
@@ -1793,7 +1799,7 @@ static int gfx_v9_4_3_kcq_init_queue(struct amdgpu_ring *ring, int xcc_id)return 0 ; } -static int gfx_v9_4_3_kiq_resume (struct amdgpu_device *adev,int xcc_id) +static int gfx_v9_4_3_xcc_kiq_resume (struct amdgpu_device *adev,int xcc_id) {struct amdgpu_ring *ring;int r;
@@ -1808,7 +1814,7 @@ static int gfx_v9_4_3_kiq_resume(struct amdgpu_device *adev, int xcc_id)if (unlikely (r !=0 ))return r; -gfx_v9_4_3_kiq_init_queue (ring, xcc_id); +gfx_v9_4_3_xcc_kiq_init_queue (ring, xcc_id);amdgpu_bo_kunmap (ring->mqd_obj); ring->mqd_ptr =NULL ;amdgpu_bo_unreserve (ring->mqd_obj);
@@ -1816,12 +1822,12 @@ static int gfx_v9_4_3_kiq_resume(struct amdgpu_device *adev, int xcc_id)return 0 ; } -static int gfx_v9_4_3_kcq_resume (struct amdgpu_device *adev,int xcc_id) +static int gfx_v9_4_3_xcc_kcq_resume (struct amdgpu_device *adev,int xcc_id) {struct amdgpu_ring *ring =NULL ;int r =0 , i; -gfx_v9_4_3_cp_compute_enable (adev, true, xcc_id); +gfx_v9_4_3_xcc_cp_compute_enable (adev, true, xcc_id);for (i =0 ; i < adev->gfx.num_compute_rings; i++) { ring = &adev->gfx.compute_ring[i + xcc_id * adev->gfx.num_compute_rings];
@@ -1831,7 +1837,7 @@ static int gfx_v9_4_3_kcq_resume(struct amdgpu_device *adev, int xcc_id) goto done; r =amdgpu_bo_kmap (ring->mqd_obj, (void **)&ring->mqd_ptr);if (!r) { - r =gfx_v9_4_3_kcq_init_queue (ring, xcc_id); + r =gfx_v9_4_3_xcc_kcq_init_queue (ring, xcc_id);amdgpu_bo_kunmap (ring->mqd_obj); ring->mqd_ptr =NULL ; }
@@ -1852,12 +1858,12 @@ static int gfx_v9_4_3_cp_resume(struct amdgpu_device *adev) num_xcc =NUM_XCC (adev->gfx.xcc_mask);for (i =0 ; i < num_xcc; i++) { -gfx_v9_4_3_enable_gui_idle_interrupt (adev, false, i); +gfx_v9_4_3_xcc_enable_gui_idle_interrupt (adev, false, i);if (adev->firmware.load_type !=AMDGPU_FW_LOAD_PSP ) { -gfx_v9_4_3_disable_gpa_mode (adev, i); +gfx_v9_4_3_xcc_disable_gpa_mode (adev, i); - r =gfx_v9_4_3_cp_compute_load_microcode (adev, i); + r =gfx_v9_4_3_xcc_cp_compute_load_microcode (adev, i);if (r)return r; }
@@ -1868,13 +1874,13 @@ static int gfx_v9_4_3_cp_resume(struct amdgpu_device *adev) adev, amdgpu_user_partt_mode);/* set the virtual and physical id based on partition_mode */ -gfx_v9_4_3_program_xcc_id (adev, i); +gfx_v9_4_3_xcc_program_xcc_id (adev, i); - r =gfx_v9_4_3_kiq_resume (adev, i); + r =gfx_v9_4_3_xcc_kiq_resume (adev, i);if (r)return r; - r =gfx_v9_4_3_kcq_resume (adev, i); + r =gfx_v9_4_3_xcc_kcq_resume (adev, i);if (r)return r;
@@ -1885,16 +1891,16 @@ static int gfx_v9_4_3_cp_resume(struct amdgpu_device *adev)return r; } -gfx_v9_4_3_enable_gui_idle_interrupt (adev, true, i); +gfx_v9_4_3_xcc_enable_gui_idle_interrupt (adev, true, i); }return 0 ; } -static void gfx_v9_4_3_cp_enable (struct amdgpu_device *adev,bool enable, -int xcc_id) +static void gfx_v9_4_3_xcc_cp_enable (struct amdgpu_device *adev,bool enable, +int xcc_id) { -gfx_v9_4_3_cp_compute_enable (adev, enable, xcc_id); +gfx_v9_4_3_xcc_cp_compute_enable (adev, enable, xcc_id); }static int gfx_v9_4_3_hw_init (void *handle)
@@ -1938,12 +1944,13 @@ static int gfx_v9_4_3_hw_fini(void *handle)soc15_grbm_select (adev, adev->gfx.kiq[i].ring.me, adev->gfx.kiq[i].ring.pipe, adev->gfx.kiq[i].ring.queue,0 ,GET_INST (GC , i)); -gfx_v9_4_3_kiq_fini_register (&adev->gfx.kiq[i].ring, i); +gfx_v9_4_3_xcc_kiq_fini_register (&adev->gfx.kiq[i].ring, + i);soc15_grbm_select (adev,0 ,0 ,0 ,0 ,GET_INST (GC , i));mutex_unlock (&adev->srbm_mutex); } -gfx_v9_4_3_cp_enable (adev, false, i); +gfx_v9_4_3_xcc_cp_enable (adev, false, i); }/* Skip suspend with A+A reset */
@@ -2030,7 +2037,7 @@ static int gfx_v9_4_3_soft_reset(void *handle) adev->gfx.rlc.funcs->stop (adev);/* Disable MEC parsing/prefetching */ -gfx_v9_4_3_cp_compute_enable (adev, false,0 ); +gfx_v9_4_3_xcc_cp_compute_enable (adev, false,0 );if (grbm_soft_reset) { tmp =RREG32_SOC15 (GC ,GET_INST (GC ,0 ), regGRBM_SOFT_RESET);
@@ -2117,8 +2124,9 @@ static int gfx_v9_4_3_late_init(void *handle)return 0 ; } -static void gfx_v9_4_3_update_medium_grain_clock_gating (struct amdgpu_device *adev, -bool enable,int xcc_id) +static void +gfx_v9_4_3_xcc_update_medium_grain_clock_gating (struct amdgpu_device *adev, +bool enable,int xcc_id) {uint32_t data, def;
@@ -2186,8 +2194,9 @@ static void gfx_v9_4_3_update_medium_grain_clock_gating(struct amdgpu_device *adamdgpu_gfx_rlc_exit_safe_mode (adev, xcc_id); } -static void gfx_v9_4_3_update_coarse_grain_clock_gating (struct amdgpu_device *adev, -bool enable,int xcc_id) +static void +gfx_v9_4_3_xcc_update_coarse_grain_clock_gating (struct amdgpu_device *adev, +bool enable,int xcc_id) {uint32_t def, data;
@@ -2238,31 +2247,35 @@ static void gfx_v9_4_3_update_coarse_grain_clock_gating(struct amdgpu_device *adamdgpu_gfx_rlc_exit_safe_mode (adev, xcc_id); } -static int gfx_v9_4_3_update_gfx_clock_gating (struct amdgpu_device *adev, -bool enable,int xcc_id) +static int gfx_v9_4_3_xcc_update_gfx_clock_gating (struct amdgpu_device *adev, +bool enable,int xcc_id) {if (enable) {/* CGCG/CGLS should be enabled after MGCG/MGLS * === MGCG + MGLS === */ -gfx_v9_4_3_update_medium_grain_clock_gating (adev, enable, xcc_id); +gfx_v9_4_3_xcc_update_medium_grain_clock_gating (adev, enable, + xcc_id);/* === CGCG + CGLS === */ -gfx_v9_4_3_update_coarse_grain_clock_gating (adev, enable, xcc_id); +gfx_v9_4_3_xcc_update_coarse_grain_clock_gating (adev, enable, + xcc_id); }else {/* CGCG/CGLS should be disabled before MGCG/MGLS * === CGCG + CGLS === */ -gfx_v9_4_3_update_coarse_grain_clock_gating (adev, enable, xcc_id); +gfx_v9_4_3_xcc_update_coarse_grain_clock_gating (adev, enable, + xcc_id);/* === MGCG + MGLS === */ -gfx_v9_4_3_update_medium_grain_clock_gating (adev, enable, xcc_id); +gfx_v9_4_3_xcc_update_medium_grain_clock_gating (adev, enable, + xcc_id); }return 0 ; }static const struct amdgpu_rlc_funcs gfx_v9_4_3_rlc_funcs = { .is_rlc_enabled = gfx_v9_4_3_is_rlc_enabled, - .set_safe_mode = gfx_v9_4_3_set_safe_mode, - .unset_safe_mode = gfx_v9_4_3_unset_safe_mode, + .set_safe_mode = gfx_v9_4_3_xcc_set_safe_mode, + .unset_safe_mode = gfx_v9_4_3_xcc_unset_safe_mode, .init = gfx_v9_4_3_rlc_init, .resume = gfx_v9_4_3_rlc_resume, .stop = gfx_v9_4_3_rlc_stop,
@@ -2291,8 +2304,8 @@ static int gfx_v9_4_3_set_clockgating_state(void *handle,switch (adev->ip_versions[GC_HWIP ][0 ]) {case IP_VERSION (9 ,4 ,3 ):for (i =0 ; i < num_xcc; i++) -gfx_v9_4_3_update_gfx_clock_gating (adev, - state ==AMD_CG_STATE_GATE , i); +gfx_v9_4_3_xcc_update_gfx_clock_gating ( + adev, state ==AMD_CG_STATE_GATE , i);break ;default :break ;
@@ -2559,10 +2572,9 @@ static void gfx_v9_4_3_ring_emit_reg_write_reg_wait(struct amdgpu_ring *ring, ref, mask); } -static void gfx_v9_4_3_set_compute_eop_interrupt_state (struct amdgpu_device *adev, -int me,int pipe, -enum amdgpu_interrupt_state state, -int xcc_id) +static void gfx_v9_4_3_xcc_set_compute_eop_interrupt_state ( +struct amdgpu_device *adev,int me,int pipe, +enum amdgpu_interrupt_state state,int xcc_id) {u32 mec_int_cntl, mec_int_cntl_reg;
@@ -2670,28 +2682,36 @@ static int gfx_v9_4_3_set_eop_interrupt_state(struct amdgpu_device *adev,for (i =0 ; i < num_xcc; i++) {switch (type) {case AMDGPU_CP_IRQ_COMPUTE_MEC1_PIPE0_EOP : -gfx_v9_4_3_set_compute_eop_interrupt_state (adev,1 ,0 , state, i); +gfx_v9_4_3_xcc_set_compute_eop_interrupt_state ( + adev,1 ,0 , state, i);break ;case AMDGPU_CP_IRQ_COMPUTE_MEC1_PIPE1_EOP : -gfx_v9_4_3_set_compute_eop_interrupt_state (adev,1 ,1 , state, i); +gfx_v9_4_3_xcc_set_compute_eop_interrupt_state ( + adev,1 ,1 , state, i);break ;case AMDGPU_CP_IRQ_COMPUTE_MEC1_PIPE2_EOP : -gfx_v9_4_3_set_compute_eop_interrupt_state (adev,1 ,2 , state, i); +gfx_v9_4_3_xcc_set_compute_eop_interrupt_state ( + adev,1 ,2 , state, i);break ;case AMDGPU_CP_IRQ_COMPUTE_MEC1_PIPE3_EOP : -gfx_v9_4_3_set_compute_eop_interrupt_state (adev,1 ,3 , state, i); +gfx_v9_4_3_xcc_set_compute_eop_interrupt_state ( + adev,1 ,3 , state, i);break ;case AMDGPU_CP_IRQ_COMPUTE_MEC2_PIPE0_EOP : -gfx_v9_4_3_set_compute_eop_interrupt_state (adev,2 ,0 , state, i); +gfx_v9_4_3_xcc_set_compute_eop_interrupt_state ( + adev,2 ,0 , state, i);break ;case AMDGPU_CP_IRQ_COMPUTE_MEC2_PIPE1_EOP : -gfx_v9_4_3_set_compute_eop_interrupt_state (adev,2 ,1 , state, i); +gfx_v9_4_3_xcc_set_compute_eop_interrupt_state ( + adev,2 ,1 , state, i);break ;case AMDGPU_CP_IRQ_COMPUTE_MEC2_PIPE2_EOP : -gfx_v9_4_3_set_compute_eop_interrupt_state (adev,2 ,2 , state, i); +gfx_v9_4_3_xcc_set_compute_eop_interrupt_state ( + adev,2 ,2 , state, i);break ;case AMDGPU_CP_IRQ_COMPUTE_MEC2_PIPE3_EOP : -gfx_v9_4_3_set_compute_eop_interrupt_state (adev,2 ,3 , state, i); +gfx_v9_4_3_xcc_set_compute_eop_interrupt_state ( + adev,2 ,3 , state, i);break ;default :break ;
@@ -3096,7 +3116,7 @@ static int gfx_v9_4_3_get_cu_info(struct amdgpu_device *adev, mask =1 ; ao_bitmap =0 ; counter =0 ; -gfx_v9_4_3_select_se_sh (adev, i, j,0xffffffff ,0 ); +gfx_v9_4_3_xcc_select_se_sh (adev, i, j,0xffffffff ,0 );gfx_v9_4_3_set_user_cu_inactive_bitmap ( adev, disable_masks[i * adev->gfx.config.max_sh_per_se + j]); bitmap =gfx_v9_4_3_get_cu_active_bitmap (adev);
@@ -3129,7 +3149,8 @@ static int gfx_v9_4_3_get_cu_info(struct amdgpu_device *adev, cu_info->ao_cu_bitmap[i %4 ][j + i /4 ] = ao_bitmap; } } -gfx_v9_4_3_select_se_sh (adev,0xffffffff ,0xffffffff ,0xffffffff ,0 ); +gfx_v9_4_3_xcc_select_se_sh (adev,0xffffffff ,0xffffffff ,0xffffffff , +0 );mutex_unlock (&adev->grbm_idx_mutex); cu_info->number = active_cu_number;
Signature · 1 line
2.39.2