drm/amdgpu/gfx12.1: Don't fetch default register values from hardware in mqd init
Subsystems (3)
Alex Deucher
maintainerPATCH 1/1 drm/amdgpu/gfx12.1: Don't fetch default register values from hardware in mqd init
From: Lang Yu <[email protected]>
1. We can't assure the fetched values are always default register values. Observing non-zero cp_hqd_pq_rptr in mes_v12_1_self_test->init_mqd() where no GRBM_GFX_CNTL is specified.
2. See commit 8e06e87ec18d ("drm/amdgpu/gfx12: don't read registers in mqd init").
--- drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c +16 -8
@@ -50,6 +50,14 @@#define RLCG_UCODE_LOADING_START_ADDRESS 0x00002000L +#define regCP_HQD_EOP_CONTROL_DEFAULT 0x00000000 +#define regCP_HQD_PQ_DOORBELL_CONTROL_DEFAULT 0x00000000 +#define regCP_MQD_CONTROL_DEFAULT 0x00000100 +#define regCP_HQD_PQ_CONTROL_DEFAULT 0x00308509 +#define regCP_HQD_PQ_RPTR_DEFAULT 0x00000000 +#define regCP_HQD_PERSISTENT_STATE_DEFAULT 0x0ae06301 +#define regCP_HQD_IB_CONTROL_DEFAULT 0x00100000 +MODULE_FIRMWARE ("amdgpu/gc_12_1_0_mec.bin" );MODULE_FIRMWARE ("amdgpu/gc_12_1_0_rlc.bin" );
@@ -2115,14 +2123,14 @@ static int gfx_v12_1_compute_mqd_init(struct amdgpu_device *adev, void *m, mqd->cp_hqd_eop_base_addr_hi =upper_32_bits (eop_base_addr);/* set the EOP size, register value is 2^(EOP_SIZE+1) dwords */ - tmp =RREG32_SOC15 (GC ,GET_INST (GC ,0 ), regCP_HQD_EOP_CONTROL); + tmp = regCP_HQD_EOP_CONTROL_DEFAULT; tmp =REG_SET_FIELD (tmp,CP_HQD_EOP_CONTROL ,EOP_SIZE , (order_base_2 (GFX12_MEC_HPD_SIZE /4 ) -1 )); mqd->cp_hqd_eop_control = tmp;/* enable doorbell? */ - tmp =RREG32_SOC15 (GC ,GET_INST (GC ,0 ), regCP_HQD_PQ_DOORBELL_CONTROL); + tmp = regCP_HQD_PQ_DOORBELL_CONTROL_DEFAULT;if (prop->use_doorbell) { tmp = REG_SET_FIELD(tmp, CP_HQD_PQ_DOORBELL_CONTROL,
@@ -2151,7 +2159,7 @@ static int gfx_v12_1_compute_mqd_init(struct amdgpu_device *adev, void *m, mqd->cp_mqd_base_addr_hi =upper_32_bits (prop->mqd_gpu_addr);/* set MQD vmid to 0 */ - tmp =RREG32_SOC15 (GC ,GET_INST (GC ,0 ), regCP_MQD_CONTROL); + tmp = regCP_MQD_CONTROL_DEFAULT; tmp =REG_SET_FIELD (tmp,CP_MQD_CONTROL ,VMID ,0 ); mqd->cp_mqd_control = tmp;
@@ -2161,7 +2169,7 @@ static int gfx_v12_1_compute_mqd_init(struct amdgpu_device *adev, void *m, mqd->cp_hqd_pq_base_hi =upper_32_bits (hqd_gpu_addr);/* set up the HQD, this is similar to CP_RB0_CNTL */ - tmp =RREG32_SOC15 (GC ,GET_INST (GC ,0 ), regCP_HQD_PQ_CONTROL); + tmp = regCP_HQD_PQ_CONTROL_DEFAULT; tmp =REG_SET_FIELD (tmp,CP_HQD_PQ_CONTROL ,QUEUE_SIZE , (order_base_2 (prop->queue_size /4 ) -1 )); tmp = REG_SET_FIELD(tmp, CP_HQD_PQ_CONTROL, RPTR_BLOCK_SIZE,
@@ -2186,7 +2194,7 @@ static int gfx_v12_1_compute_mqd_init(struct amdgpu_device *adev, void *m, tmp =0 ;/* enable the doorbell if requested */ if (prop->use_doorbell) { - tmp =RREG32_SOC15 (GC ,GET_INST (GC ,0 ), regCP_HQD_PQ_DOORBELL_CONTROL); + tmp = regCP_HQD_PQ_DOORBELL_CONTROL_DEFAULT; tmp =REG_SET_FIELD (tmp,CP_HQD_PQ_DOORBELL_CONTROL ,DOORBELL_OFFSET , prop->doorbell_index);
@@ -2201,17 +2209,17 @@ static int gfx_v12_1_compute_mqd_init(struct amdgpu_device *adev, void *m, mqd->cp_hqd_pq_doorbell_control = tmp;/* reset read and write pointers, similar to CP_RB0_WPTR/_RPTR */ - mqd->cp_hqd_pq_rptr =RREG32_SOC15 (GC ,GET_INST (GC ,0 ), regCP_HQD_PQ_RPTR); + mqd->cp_hqd_pq_rptr = regCP_HQD_PQ_RPTR_DEFAULT;/* set the vmid for the queue */ mqd->cp_hqd_vmid =0 ; - tmp =RREG32_SOC15 (GC ,GET_INST (GC ,0 ), regCP_HQD_PERSISTENT_STATE); + tmp = regCP_HQD_PERSISTENT_STATE_DEFAULT; tmp =REG_SET_FIELD (tmp,CP_HQD_PERSISTENT_STATE ,PRELOAD_SIZE ,0x63 ); mqd->cp_hqd_persistent_state = tmp;/* set MIN_IB_AVAIL_SIZE */ - tmp =RREG32_SOC15 (GC ,GET_INST (GC ,0 ), regCP_HQD_IB_CONTROL); + tmp = regCP_HQD_IB_CONTROL_DEFAULT; tmp =REG_SET_FIELD (tmp,CP_HQD_IB_CONTROL ,MIN_IB_AVAIL_SIZE ,1 ); mqd->cp_hqd_ib_control = tmp;
Signature · 1 line
2.52.0
Alex Deucher
maintainerPATCH 1/1 drm/amdgpu: Always set PTE.B for device memory on GFX 12.1
From: Mukul Joshi <[email protected]>
On GFX 12.1, we need to set the atomics bit (PTE.B) always for device memory.
--- drivers/gpu/drm/amd/amdgpu/gmc_v12_1.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/gmc_v12_1.c +4 -4
@@ -496,7 +496,7 @@ static void gmc_v12_1_get_coherence_flags(struct amdgpu_device *adev,bool uncached = bo->flags &AMDGPU_GEM_CREATE_UNCACHED ;unsigned int mtype, mtype_local;bool snoop = false; -bool is_local; +bool is_local = false;switch (gc_ip_version) {case IP_VERSION (12 ,1 ,0 ):
@@ -533,6 +533,9 @@ static void gmc_v12_1_get_coherence_flags(struct amdgpu_device *adev,if (mtype !=MTYPE_NC ) *flags =AMDGPU_PTE_MTYPE_GFX12 (*flags, mtype); +if (is_local || adev->have_atomics_support) + *flags |=AMDGPU_PTE_BUS_ATOMICS ; + *flags |= snoop ?AMDGPU_PTE_SNOOPED :0 ; }
@@ -577,9 +580,6 @@ static void gmc_v12_1_get_vm_pte(struct amdgpu_device *adev, AMDGPU_GEM_CREATE_UNCACHED)) *flags =AMDGPU_PTE_MTYPE_NV10 (*flags,MTYPE_UC ); -if (adev->have_atomics_support) - *flags |=AMDGPU_PTE_BUS_ATOMICS ; -if ((*flags &AMDGPU_PTE_VALID ) && bo)gmc_v12_1_get_coherence_flags (adev, bo, flags); }
Signature · 1 line
2.52.0
Alex Deucher
maintainerPATCH 1/1 drm/amdgpu: Init mcm_addr look up table
In reply to Alex DeucherFrom: Hawking Zhang <[email protected]>
Encode mcm address look up table in SPX mode as a temp solution.
v2: fill in when interface is ready (Alex)
--- drivers/gpu/drm/amd/amdgpu/amdgpu_imu.h | 1 + drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c | 5 +++++ drivers/gpu/drm/amd/amdgpu/imu_v12_1.c | 6 ++++++ 3 files changed, 12 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_imu.h +1 -0
@@ -39,6 +39,7 @@ struct amdgpu_imu_funcs {int (*switch_compute_partition)(struct amdgpu_device *adev,int num_xccs_per_xcp,int compute_partition_mode); +void (*init_mcm_addr_lut)(struct amdgpu_device *adev); };struct imu_rlc_ram_golden {
drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c +5 -0
@@ -2666,6 +2666,11 @@ static void gfx_v12_1_init_golden_registers(struct amdgpu_device *adev)gfx_v12_1_xcc_enable_atomics (adev, i);gfx_v12_1_xcc_setup_tcp_thrashing_ctrl (adev, i); } + +if (adev->gfx.imu.funcs && + adev->gfx.imu.funcs->init_mcm_addr_lut && + amdgpu_emu_mode) + adev->gfx.imu.funcs->init_mcm_addr_lut (adev); }static int gfx_v12_1_hw_init (struct amdgpu_ip_block *ip_block)
drivers/gpu/drm/amd/amdgpu/imu_v12_1.c +6 -0
@@ -153,8 +153,14 @@ static int imu_v12_1_switch_compute_partition(struct amdgpu_device *adev,return 0 ; } +static void imu_v12_1_init_mcm_addr_lut (struct amdgpu_device *adev) +{ +/* todo: fill in when interface is ready */ +} +const struct amdgpu_imu_funcs gfx_v12_1_imu_funcs = { .init_microcode = imu_v12_1_init_microcode, .load_microcode = imu_v12_1_load_microcode, .switch_compute_partition = imu_v12_1_switch_compute_partition, + .init_mcm_addr_lut = imu_v12_1_init_mcm_addr_lut, };
Signature · 1 line
2.52.0
Alex Deucher
maintainerPATCH 1/1 drm/amdgpu: update mcm_addr_lut data for imu v12_1
In reply to Alex DeucherFrom: Likun Gao <[email protected]>
Support for partition mode to program MCM_ADDR_LUT.
v2: clean up (Alex)
--- drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c | 5 ----- drivers/gpu/drm/amd/amdgpu/soc_v1_0.c | 11 +++++++++-- 2 files changed, 9 insertions(+), 7 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c +0 -5
@@ -2666,11 +2666,6 @@ static void gfx_v12_1_init_golden_registers(struct amdgpu_device *adev)gfx_v12_1_xcc_enable_atomics (adev, i);gfx_v12_1_xcc_setup_tcp_thrashing_ctrl (adev, i); } - -if (adev->gfx.imu.funcs && - adev->gfx.imu.funcs->init_mcm_addr_lut && - amdgpu_emu_mode) - adev->gfx.imu.funcs->init_mcm_addr_lut (adev); }static int gfx_v12_1_hw_init (struct amdgpu_ip_block *ip_block)
drivers/gpu/drm/amd/amdgpu/soc_v1_0.c +9 -2
@@ -658,8 +658,15 @@ static int soc_v1_0_switch_partition_mode(struct amdgpu_xcp_mgr *xcp_mgr, num_xcc_per_xcp =__soc_v1_0_get_xcc_per_xcp (xcp_mgr, mode);if (adev->gfx.imu.funcs && - adev->gfx.imu.funcs->switch_compute_partition) - adev->gfx.imu.funcs->switch_compute_partition (xcp_mgr->adev, num_xcc_per_xcp, mode); + adev->gfx.imu.funcs->switch_compute_partition) { + ret = adev->gfx.imu.funcs->switch_compute_partition (xcp_mgr->adev, num_xcc_per_xcp, mode); +if (ret) + goto out; + } +if (adev->gfx.imu.funcs && + adev->gfx.imu.funcs->init_mcm_addr_lut && + amdgpu_emu_mode) + adev->gfx.imu.funcs->init_mcm_addr_lut (adev);/* Init info about new xcps */ *num_xcps = num_xcc / num_xcc_per_xcp;
Signature · 1 line
2.52.0
Alex Deucher
maintainerPATCH 1/1 drm/amdgpu: skip gfxhub tlb flush if gfx is power off
In reply to Alex DeucherFrom: Likun Gao <[email protected]>
Skip for gfxhub tlb flush for gc v12_1 if gfx is not poweron.
--- drivers/gpu/drm/amd/amdgpu/gmc_v12_1.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/gpu/drm/amd/amdgpu/gmc_v12_1.c +4 -0
@@ -319,6 +319,10 @@ static void gmc_v12_1_flush_gpu_tlb(struct amdgpu_device *adev, uint32_t vmid, {u32 inst; +if (AMDGPU_IS_GFXHUB (vmhub) && + !adev->gfx.is_poweron) +return ; +if (vmhub >=AMDGPU_MMHUB0 (0 )) inst =0 ;else
Signature · 1 line
2.52.0
Alex Deucher
maintainerPATCH 1/1 drm/amdkfd: fix partitioned gfx12 address watch enablement
In reply to Alex DeucherFrom: Jonathan Kim <[email protected]>
GFX 12 devices that support spatial partitioning should use the WREG32 per XCC macro when updating address watch settings, similar to GFX 9 devices that support spatial partitioning.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v12_1.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v12_1.c +4 -4
@@ -347,13 +347,13 @@ static uint32_t kgd_gfx_v12_1_set_address_watch(struct amdgpu_device *adev,VALID , 1); -WREG32_RLC ((SOC15_REG_OFFSET (GC ,GET_INST (GC , inst), regTCP_WATCH0_ADDR_H) + +WREG32_XCC ((SOC15_REG_OFFSET (GC ,GET_INST (GC , inst), regTCP_WATCH0_ADDR_H) + (watch_id *TCP_WATCH_STRIDE )), - watch_address_high); + watch_address_high, inst); -WREG32_RLC ((SOC15_REG_OFFSET (GC ,GET_INST (GC , inst), regTCP_WATCH0_ADDR_L) + +WREG32_XCC ((SOC15_REG_OFFSET (GC ,GET_INST (GC , inst), regTCP_WATCH0_ADDR_L) + (watch_id *TCP_WATCH_STRIDE )), - watch_address_low); + watch_address_low, inst);return watch_address_cntl; }
Signature · 1 line
2.52.0
Alex Deucher
maintainerPATCH 1/1 drm/amdkfd: Implement CU Masking for GFX 12.1
In reply to Alex DeucherFrom: Mukul Joshi <[email protected]>
Add CU masking implementation for GFX 12.1. Add a local implementation for GFX 12.1 instead of using the generic function defined in kfd_mqd_manager.c because of some quirks in the way CU mask is handled on GFX 12.1.
--- .../drm/amd/amdkfd/kfd_mqd_manager_v12_1.c | 87 +++++++++++++++---- 1 file changed, 70 insertions(+), 17 deletions(-)
drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v12_1.c +70 -17
@@ -53,37 +53,90 @@ static inline struct v12_sdma_mqd *get_sdma_mqd(void *mqd)return (struct v12_sdma_mqd *)mqd; } +static void mqd_symmetrically_map_cu_mask_v12_1 (struct mqd_manager *mm, +const uint32_t *cu_mask,uint32_t cu_mask_count, +uint32_t *se_mask,uint32_t inst) +{ +struct amdgpu_cu_info *cu_info = &mm->dev->adev->gfx.cu_info; +struct amdgpu_gfx_config *gfx_info = &mm->dev->adev->gfx.config; +uint32_t cu_per_sh[2 ][2 ] = {0 }; +uint32_t en_mask =0x3 ; +int i, se, sh, cu, cu_inc =0 ; +uint32_t cu_active_per_node; +int inc =NUM_XCC (mm->dev->xcc_mask); +int xcc_inst = inst +ffs (mm->dev->xcc_mask) -1 ; + + cu_active_per_node = cu_info->number / mm->dev->kfd->num_nodes; +if (cu_mask_count > cu_active_per_node) + cu_mask_count = cu_active_per_node; + +/* +* Count active CUs per SE/SH. +*/ +for (se =0 ; se < gfx_info->max_shader_engines; se++) +for (sh =0 ; sh < gfx_info->max_sh_per_se; sh++) + cu_per_sh[se][sh] =hweight32 ( + cu_info->bitmap[xcc_inst][se][sh]); + +/* Symmetrically map cu_mask to all SEs & SHs: +* For GFX 12.1.0, the following code only looks at a +* subset of the cu_mask corresponding to the inst parameter. +* If we have n XCCs under one GPU node +* cu_mask[0] bit0 -> XCC0 se_mask[0] bit0 (XCC0,SE0,SH0,CU0) +* cu_mask[0] bit1 -> XCC1 se_mask[0] bit0 (XCC1,SE0,SH0,CU0) +* .. +* cu_mask[0] bitn -> XCCn se_mask[0] bit0 (XCCn,SE0,SH0,CU0) +* cu_mask[0] bit n+1 -> XCC0 se_mask[1] bit0 (XCC0,SE1,SH0,CU0) +* +* For example, if there are 6 XCCs under 1 KFD node, this code +* running for each inst, will look at the bits as: +* inst, inst + 6, inst + 12... +* +* First ensure all CUs are disabled, then enable user specified CUs. +*/ +for (i =0 ; i < gfx_info->max_shader_engines; i++) + se_mask[i] =0 ; + + i = inst; +for (cu =0 ; cu <16 ; cu++) { +for (sh =0 ; sh < gfx_info->max_sh_per_se; sh++) { +for (se =0 ; se < gfx_info->max_shader_engines; se++) { +if (cu_per_sh[se][sh] > cu) { +if (cu_mask[i /32 ] & (1U << (i %32 ))) { +if (cu ==8 && sh ==0 ) + se_mask[se] |= en_mask <<30 ; +else + se_mask[se] |= en_mask << (cu_inc + sh *16 ); + } + i += inc; +if (i >= cu_mask_count) +return ; + } + } + } + cu_inc +=2 ; + } +} +static void update_cu_mask (struct mqd_manager *mm,void *mqd,struct mqd_update_info *minfo,uint32_t inst) {struct v12_1_compute_mqd *m; -uint32_t se_mask[KFD_MAX_NUM_SE ] = {0 }; +uint32_t se_mask[2 ] = {0 };if (!minfo || !minfo->cu_mask.ptr)return ; -mqd_symmetrically_map_cu_mask (mm, +mqd_symmetrically_map_cu_mask_v12_1 (mm, minfo->cu_mask.ptr, minfo->cu_mask.count, se_mask, inst); m =get_mqd (mqd); m->compute_static_thread_mgmt_se0 = se_mask[0 ]; m->compute_static_thread_mgmt_se1 = se_mask[1 ]; - m->compute_static_thread_mgmt_se2 = se_mask[2 ]; - m->compute_static_thread_mgmt_se3 = se_mask[3 ]; - m->compute_static_thread_mgmt_se4 = se_mask[4 ]; - m->compute_static_thread_mgmt_se5 = se_mask[5 ]; - m->compute_static_thread_mgmt_se6 = se_mask[6 ]; - m->compute_static_thread_mgmt_se7 = se_mask[7 ]; - -pr_debug ("update cu mask to %#x %#x %#x %#x %#x %#x %#x %#x\n" , + +pr_debug ("update cu mask to %#x %#x\n" , m->compute_static_thread_mgmt_se0, - m->compute_static_thread_mgmt_se1, - m->compute_static_thread_mgmt_se2, - m->compute_static_thread_mgmt_se3, - m->compute_static_thread_mgmt_se4, - m->compute_static_thread_mgmt_se5, - m->compute_static_thread_mgmt_se6, - m->compute_static_thread_mgmt_se7); + m->compute_static_thread_mgmt_se1); }static void set_priority (struct v12_1_compute_mqd *m,struct queue_properties *q)
Signature · 1 line
2.52.0
Alex Deucher
maintainerPATCH 1/1 drm/amdkfd: enable precise memory operations for gfx1250
In reply to Alex DeucherFrom: Jonathan Kim <[email protected]>
Enable precise memory for GFX 1250.
--- drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdkfd/kfd_topology.c +4 -1
@@ -2029,9 +2029,12 @@ static void kfd_topology_set_capabilities(struct kfd_topology_device *dev) dev->node_props.capability |=HSA_CAP_TRAP_DEBUG_PRECISE_ALU_OPERATIONS_SUPPORTED ; -if (KFD_GC_VERSION (dev->gpu) >=IP_VERSION (12 ,1 ,0 )) +if (KFD_GC_VERSION (dev->gpu) >=IP_VERSION (12 ,1 ,0 )) { + dev->node_props.capability |= +HSA_CAP_TRAP_DEBUG_PRECISE_MEMORY_OPERATIONS_SUPPORTED ; dev->node_props.capability2 |=HSA_CAP2_TRAP_DEBUG_LDS_OUT_OF_ADDR_RANGE_SUPPORTED ; + } }kfd_topology_set_dbg_firmware_support (dev);
Signature · 1 line
2.52.0
Alex Deucher
maintainerPATCH 1/1 drm/amdkfd: Add gfx_v12_1_kfd2kgd interface for GFX12_1
In reply to Alex DeucherFrom: Likun Gao <[email protected]>
Create new kfd2kgd interface for gfx v12_1, based on gfx v12. Support register program accoding to xcc id.
V2: Fix SDMA register address for muti-xcc.
--- drivers/gpu/drm/amd/amdgpu/Makefile | 3 +- .../drm/amd/amdgpu/amdgpu_amdkfd_gfx_v12_1.c | 387 ++++++++++++++++++ drivers/gpu/drm/amd/amdkfd/kfd_device.c | 3 +- 3 files changed, 391 insertions(+), 2 deletions(-) create mode 100644 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v12_1.c
drivers/gpu/drm/amd/amdgpu/Makefile +2 -1
@@ -282,7 +282,8 @@ amdgpu-y += \ amdgpu_amdkfd_gfx_v10.o \ amdgpu_amdkfd_gfx_v10_3.o \ amdgpu_amdkfd_gfx_v11.o \ - amdgpu_amdkfd_gfx_v12.o + amdgpu_amdkfd_gfx_v12.o \ + amdgpu_amdkfd_gfx_v12_1.o ifneq ($(CONFIG_DRM_AMDGPU_CIK),) amdgpu-y += amdgpu_amdkfd_gfx_v7.o
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v12_1.c new file +387 -0
387 lines not on this page · raw message
drivers/gpu/drm/amd/amdkfd/kfd_device.c +2 -1
@@ -57,6 +57,7 @@ extern const struct kfd2kgd_calls gfx_v10_kfd2kgd;extern const struct kfd2kgd_calls gfx_v10_3_kfd2kgd;extern const struct kfd2kgd_calls gfx_v11_kfd2kgd;extern const struct kfd2kgd_calls gfx_v12_kfd2kgd; +extern const struct kfd2kgd_calls gfx_v12_1_kfd2kgd;static int kfd_gtt_sa_init (struct kfd_dev *kfd,unsigned int buf_size,unsigned int chunk_size);
@@ -451,7 +452,7 @@ struct kfd_dev *kgd2kfd_probe(struct amdgpu_device *adev, bool vf)break ;case IP_VERSION (12 ,1 ,0 ): gfx_target_version =120500 ; - f2g = &gfx_v12_kfd2kgd; + f2g = &gfx_v12_1_kfd2kgd;break ;default :break ;
Signature · 1 line
2.52.0
Alex Deucher
maintainerPATCH 1/1 drm/amdgpu: Disable TCP Early Write Ack for GFX 12.1
In reply to Alex DeucherFrom: Mukul Joshi <[email protected]>
Disable the TCP Early Write Ack feature on GFX 12.1.
--- drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)
drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c +12 -0
@@ -2657,6 +2657,17 @@ static void gfx_v12_1_xcc_disable_burst(struct amdgpu_device *adev,WREG32_SOC15 (GC ,GET_INST (GC , xcc_id), regGLARB_DRAM_BURST_CTRL,0xf ); } +static void gfx_v12_1_xcc_disable_early_write_ack (struct amdgpu_device *adev, +int xcc_id) +{ +uint32_t data; + + data =RREG32_SOC15 (GC ,GET_INST (GC , xcc_id), regTCP_CNTL3); + data =REG_SET_FIELD (data,TCP_CNTL3 ,DISABLE_EARLY_WRITE_ACK ,0x1 ); + +WREG32_SOC15 (GC ,GET_INST (GC , xcc_id), regTCP_CNTL3, data); +} +static void gfx_v12_1_init_golden_registers (struct amdgpu_device *adev) {int i;
@@ -2665,6 +2676,7 @@ static void gfx_v12_1_init_golden_registers(struct amdgpu_device *adev)gfx_v12_1_xcc_disable_burst (adev, i);gfx_v12_1_xcc_enable_atomics (adev, i);gfx_v12_1_xcc_setup_tcp_thrashing_ctrl (adev, i); +gfx_v12_1_xcc_disable_early_write_ack (adev, i); } }
Signature · 1 line
2.52.0
Alex Deucher
maintainerPATCH 1/1 drm/amdgpu: Cleanup gmc_v12_1 after 6.16 merge
In reply to Alex DeucherFrom: Mukul Joshi <[email protected]>
After the 6.16 merge, some changes not applicable to GFX 12.1 were added in the gmc_v12_1_get_vm_pte function. Additionally, add the case for MTYPE RW for GFX 12.1.
--- drivers/gpu/drm/amd/amdgpu/gmc_v12_1.c | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-)
drivers/gpu/drm/amd/amdgpu/gmc_v12_1.c +3 -17
@@ -562,28 +562,14 @@ static void gmc_v12_1_get_vm_pte(struct amdgpu_device *adev,default : *flags =AMDGPU_PTE_MTYPE_GFX12 (*flags,MTYPE_NC );break ; +case AMDGPU_VM_MTYPE_RW : + *flags =AMDGPU_PTE_MTYPE_GFX12 (*flags,MTYPE_RW ); +break ;case AMDGPU_VM_MTYPE_UC : *flags =AMDGPU_PTE_MTYPE_GFX12 (*flags,MTYPE_UC );break ; } -if (vm_flags &AMDGPU_VM_PAGE_NOALLOC ) - *flags |=AMDGPU_PTE_NOALLOC ; -else - *flags &= ~AMDGPU_PTE_NOALLOC ; - -if (vm_flags &AMDGPU_VM_PAGE_PRT ) { - *flags |=AMDGPU_PTE_SNOOPED ; - *flags |=AMDGPU_PTE_SYSTEM ; - *flags |=AMDGPU_PTE_IS_PTE ; - *flags &= ~AMDGPU_PTE_VALID ; - } - -if (bo && bo->flags & (AMDGPU_GEM_CREATE_COHERENT | -AMDGPU_GEM_CREATE_EXT_COHERENT | -AMDGPU_GEM_CREATE_UNCACHED )) - *flags =AMDGPU_PTE_MTYPE_NV10 (*flags,MTYPE_UC ); -if ((*flags &AMDGPU_PTE_VALID ) && bo)gmc_v12_1_get_coherence_flags (adev, bo, flags); }
Signature · 1 line
2.52.0
Alex Deucher
maintainerPATCH 1/1 drm/amdkfd: Add metadata ring buffer for compute
In reply to Alex DeucherFrom: David Yat Sin <[email protected]>
Add support for separate ring-buffer for metadata packets when using compute queues. Userspace application allocate the metadata ring-buffer and the queue ring-buffer with a single allocation. The metadata ring-buffer starts after the queue ring-buffer.
--- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 8 +++++++ .../drm/amd/amdkfd/kfd_mqd_manager_v12_1.c | 21 +++++++++++++++++++ drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 3 ++- drivers/gpu/drm/amd/amdkfd/kfd_queue.c | 7 +++++-- include/uapi/linux/kfd_ioctl.h | 5 +++-- 5 files changed, 39 insertions(+), 5 deletions(-)
drivers/gpu/drm/amd/amdkfd/kfd_chardev.c +8 -0
@@ -221,6 +221,11 @@ static int set_queue_properties_from_user(struct queue_properties *q_properties,pr_debug ("Size lower. clamped to KFD_MIN_QUEUE_RING_SIZE" ); } +if ((args->metadata_ring_size !=0 ) && !is_power_of_2 (args->metadata_ring_size)) { +pr_err ("Metadata ring size must be a power of 2 or 0\n" ); +return -EINVAL ; + } +if (!access_ok ((const void __user *) args->read_pointer_address,sizeof (uint32_t ))) {pr_err ("Can't access read pointer\n" );
@@ -255,6 +260,9 @@ static int set_queue_properties_from_user(struct queue_properties *q_properties, q_properties->priority = args->queue_priority; q_properties->queue_address = args->ring_base_address; q_properties->queue_size = args->ring_size; +if (args->queue_type ==KFD_IOC_QUEUE_TYPE_COMPUTE_AQL ) + q_properties->metadata_queue_size = args->metadata_ring_size; + q_properties->read_ptr = (void __user *)args->read_pointer_address; q_properties->write_ptr = (void __user *)args->write_pointer_address; q_properties->eop_ring_buffer_address = args->eop_buffer_address;
drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v12_1.c +21 -0
@@ -266,6 +266,27 @@ static void update_mqd(struct mqd_manager *mm, void *mqd, m->cp_hqd_pq_base_lo =lower_32_bits ((uint64_t )q->queue_address >>8 ); m->cp_hqd_pq_base_hi =upper_32_bits ((uint64_t )q->queue_address >>8 ); +if (q->metadata_queue_size) { +/* On GC 12.1 is 64 DWs which is 4 times size of AQL packet */ +if (q->metadata_queue_size == q->queue_size *4 ) { +/* +* User application allocates main queue ring and metadata queue ring +* with a single allocation. metadata queue ring starts after main +* queue ring. +*/ + m->cp_hqd_kd_base = +lower_32_bits ((q->queue_address + q->queue_size) >>8 ); + m->cp_hqd_kd_base_hi = +upper_32_bits ((q->queue_address + q->queue_size) >>8 ); + + m->cp_hqd_kd_cntl |=CP_HQD_KD_CNTL__KD_FETCHER_ENABLE_MASK ; +/* KD_SIZE = 2 for metadata packet = 64 DWs */ + m->cp_hqd_kd_cntl |=2 <<CP_HQD_KD_CNTL__KD_SIZE__SHIFT ; + }else { +pr_warn ("Invalid metadata ring size, metadata queue will be ignored\n" ); + } + } + m->cp_hqd_pq_rptr_report_addr_lo =lower_32_bits ((uint64_t )q->read_ptr); m->cp_hqd_pq_rptr_report_addr_hi =upper_32_bits ((uint64_t )q->read_ptr); m->cp_hqd_pq_wptr_poll_addr_lo =lower_32_bits ((uint64_t )q->write_ptr);
drivers/gpu/drm/amd/amdkfd/kfd_priv.h +2 -1
@@ -506,7 +506,8 @@ struct queue_properties {enum kfd_queue_format format;unsigned int queue_id;uint64_t queue_address; -uint64_t queue_size; +uint64_t queue_size; +uint64_t metadata_queue_size;uint32_t priority;uint32_t queue_percent;void __user *read_ptr;
drivers/gpu/drm/amd/amdkfd/kfd_queue.c +5 -2
@@ -247,9 +247,12 @@ int kfd_queue_acquire_buffers(struct kfd_process_device *pdd, struct queue_prope properties->format == KFD_QUEUE_FORMAT_AQL && topo_dev->node_props.gfx_target_version >= 70000 && topo_dev->node_props.gfx_target_version < 90000) - expected_queue_size = properties->queue_size /2 ; +/* metadata_queue_size not supported on GFX7/GFX8 */ + expected_queue_size = + properties->queue_size /2 ; else - expected_queue_size = properties->queue_size; + expected_queue_size = + properties->queue_size + properties->metadata_queue_size; vm =drm_priv_to_vm (pdd->drm_priv); err =amdgpu_bo_reserve (vm->root.bo, false);
include/uapi/linux/kfd_ioctl.h +3 -2
@@ -47,9 +47,10 @@* - 1.19 - Add a new ioctl to craete secondary kfd processes * - 1.20 - Trap handler support for expert scheduling mode available * - 1.21 - Debugger support to subscribe to LDS out-of-address exceptions +* - 1.22 - Add queue creation with metadata ring base address */ #define KFD_IOCTL_MAJOR_VERSION 1 -#define KFD_IOCTL_MINOR_VERSION 21 +#define KFD_IOCTL_MINOR_VERSION 22struct kfd_ioctl_get_version_args {__u32 major_version;/* from KFD */
@@ -87,7 +88,7 @@ struct kfd_ioctl_create_queue_args {__u32 ctx_save_restore_size;/* to KFD */ __u32 ctl_stack_size;/* to KFD */ __u32 sdma_engine_id;/* to KFD */ -__u32 pad; +__u32 metadata_ring_size;/* to KFD */ };struct kfd_ioctl_destroy_queue_args {
Signature · 1 line
2.52.0
Alex Deucher
maintainerPATCH 1/1 drm/amdgpu: Update TCP Control register on GFX 12.1
In reply to Alex DeucherFrom: Mukul Joshi <[email protected]>
Update TCP CNTL register to disable some features not supported on GFX 12.1.
--- drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)
drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c +12 -0
@@ -2668,6 +2668,17 @@ static void gfx_v12_1_xcc_disable_early_write_ack(struct amdgpu_device *adev,WREG32_SOC15 (GC ,GET_INST (GC , xcc_id), regTCP_CNTL3, data); } +static void gfx_v12_1_xcc_disable_tcp_spill_cache (struct amdgpu_device *adev, +int xcc_id) +{ +uint32_t data; + + data =RREG32_SOC15 (GC ,GET_INST (GC , xcc_id), regTCP_CNTL); + data =REG_SET_FIELD (data,TCP_CNTL ,TCP_SPILL_CACHE_DISABLE ,0x1 ); + +WREG32_SOC15 (GC ,GET_INST (GC , xcc_id), regTCP_CNTL, data); +} +static void gfx_v12_1_init_golden_registers (struct amdgpu_device *adev) {int i;
@@ -2677,6 +2688,7 @@ static void gfx_v12_1_init_golden_registers(struct amdgpu_device *adev)gfx_v12_1_xcc_enable_atomics (adev, i);gfx_v12_1_xcc_setup_tcp_thrashing_ctrl (adev, i);gfx_v12_1_xcc_disable_early_write_ack (adev, i); +gfx_v12_1_xcc_disable_tcp_spill_cache (adev, i); } }
Signature · 1 line
2.52.0
Alex Deucher
maintainerPATCH 1/1 drm/amdgpu: RLC-G VF Register Access Interface
In reply to Alex DeucherFrom: Bokun Zhang <[email protected]>
- Implement Gfx v12.1 VFi interface under SRIOV
- Redirect all RLCG interface access to new function after Gfx v12.1
v2: squash in register updates
--- drivers/gpu/drm/amd/amdgpu/amdgpu_rlc.h | 9 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 130 ++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h | 9 ++ drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c | 26 ++-- .../include/asic_reg/gc/gc_12_1_0_offset.h | 13 +- .../include/asic_reg/gc/gc_12_1_0_sh_mask.h | 18 +++ 6 files changed, 194 insertions(+), 11 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_rlc.h +9 -0
@@ -270,6 +270,15 @@ struct amdgpu_rlcg_reg_access_ctrl {uint32_t grbm_cntl;uint32_t grbm_idx;uint32_t spare_int; + +uint32_t vfi_cmd; +uint32_t vfi_stat; +uint32_t vfi_addr; +uint32_t vfi_data; +uint32_t vfi_grbm_cntl; +uint32_t vfi_grbm_idx; +uint32_t vfi_grbm_cntl_data; +uint32_t vfi_grbm_idx_data; };struct amdgpu_rlc {
drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c +130 -0
142 lines not on this page · raw message
drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h +9 -0
@@ -47,6 +47,15 @@#define AMDGPU_RLCG_SCRATCH1_ADDRESS_MASK 0xFFFFF#define AMDGPU_RLCG_SCRATCH1_ERROR_MASK 0xF000000 +#define AMDGPU_RLCG_VFI_CMD__WR 0x0 +#define AMDGPU_RLCG_VFI_CMD__RD 0x1 + +#define AMDGPU_RLCG_VFI_STAT__BUSY 0x0 +#define AMDGPU_RLCG_VFI_STAT__DONE 0x1 +#define AMDGPU_RLCG_VFI_STAT__INV_CMD 0x2 +#define AMDGPU_RLCG_VFI_STAT__INV_ADDR 0x3 +#define AMDGPU_RLCG_VFI_STAT__ERR 0xFF +/* all asic after AI use this offset */ #define mmRCC_IOV_FUNC_IDENTIFIER 0xDE5/* tonga/fiji use this offset */
drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c +16 -10
@@ -526,20 +526,26 @@ static void gfx_v12_1_init_rlcg_reg_access_ctrl(struct amdgpu_device *adev) num_xcc =NUM_XCC (adev->gfx.xcc_mask);for (xcc_id =0 ; xcc_id < num_xcc; xcc_id++) { reg_access_ctrl = &adev->gfx.rlc.reg_access_ctrl[GET_INST (GC , xcc_id)]; - reg_access_ctrl->scratch_reg0 = -SOC15_REG_OFFSET (GC ,GET_INST (GC , xcc_id), regSCRATCH_REG0); - reg_access_ctrl->scratch_reg1 = -SOC15_REG_OFFSET (GC ,GET_INST (GC , xcc_id), regSCRATCH_REG1); - reg_access_ctrl->scratch_reg2 = -SOC15_REG_OFFSET (GC ,GET_INST (GC , xcc_id), regSCRATCH_REG2); - reg_access_ctrl->scratch_reg3 = -SOC15_REG_OFFSET (GC ,GET_INST (GC , xcc_id), regSCRATCH_REG3); + reg_access_ctrl->grbm_cntl =SOC15_REG_OFFSET (GC ,GET_INST (GC , xcc_id), regGRBM_GFX_CNTL); reg_access_ctrl->grbm_idx =SOC15_REG_OFFSET (GC ,GET_INST (GC , xcc_id), regGRBM_GFX_INDEX); - reg_access_ctrl->spare_int = -SOC15_REG_OFFSET (GC ,GET_INST (GC , xcc_id), regRLC_SPARE_INT_0); + + reg_access_ctrl->vfi_cmd = +SOC15_REG_OFFSET (GC ,GET_INST (GC , xcc_id), regRLC_VFI_CMD); + reg_access_ctrl->vfi_stat = +SOC15_REG_OFFSET (GC ,GET_INST (GC , xcc_id), regRLC_VFI_STAT); + reg_access_ctrl->vfi_addr = +SOC15_REG_OFFSET (GC ,GET_INST (GC , xcc_id), regRLC_VFI_ADDR); + reg_access_ctrl->vfi_data = +SOC15_REG_OFFSET (GC ,GET_INST (GC , xcc_id), regRLC_VFI_DATA); + reg_access_ctrl->vfi_grbm_cntl = +SOC15_REG_OFFSET (GC ,GET_INST (GC , xcc_id), regRLC_VFI_GRBM_GFX_CNTL); + reg_access_ctrl->vfi_grbm_idx = +SOC15_REG_OFFSET (GC ,GET_INST (GC , xcc_id), regRLC_VFI_GRBM_GFX_INDEX); + reg_access_ctrl->vfi_grbm_cntl_data =0 ; + reg_access_ctrl->vfi_grbm_idx_data =0 ; } adev->gfx.rlc.rlcg_reg_access_supported = true; }
drivers/gpu/drm/amd/include/asic_reg/gc/gc_12_1_0_offset.h +12 -1
@@ -6917,7 +6917,18 @@#define regRLC_SPARE_INT_2_BASE_IDX 1#define regRLC_RLCV_SPARE_INT_1 0x0992#define regRLC_RLCV_SPARE_INT_1_BASE_IDX 1 - +#define regRLC_VFI_CMD 0x099a +#define regRLC_VFI_CMD_BASE_IDX 1 +#define regRLC_VFI_STAT 0x099b +#define regRLC_VFI_STAT_BASE_IDX 1 +#define regRLC_VFI_GRBM_GFX_INDEX 0x099c +#define regRLC_VFI_GRBM_GFX_INDEX_BASE_IDX 1 +#define regRLC_VFI_GRBM_GFX_CNTL 0x099d +#define regRLC_VFI_GRBM_GFX_CNTL_BASE_IDX 1 +#define regRLC_VFI_ADDR 0x099e +#define regRLC_VFI_ADDR_BASE_IDX 1 +#define regRLC_VFI_DATA 0x099f +#define regRLC_VFI_DATA_BASE_IDX 1// addressBlock: CHIP_XCD_gfxip_xcc_gfx_cpwd_cpwd_pwrdec // base address: 0x3c000
drivers/gpu/drm/amd/include/asic_reg/gc/gc_12_1_0_sh_mask.h +18 -0
@@ -21945,6 +21945,24 @@#define RLC_RLCV_SPARE_INT_1__RESERVED__SHIFT 0x1#define RLC_RLCV_SPARE_INT_1__INTERRUPT_MASK 0x00000001L#define RLC_RLCV_SPARE_INT_1__RESERVED_MASK 0xFFFFFFFEL +//RLC_VFI_CMD +#define RLC_VFI_CMD__VFI_CMD__SHIFT 0x0 +#define RLC_VFI_CMD__VFI_CMD_MASK 0xFFFFFFFFL +//RLC_VFI_STAT +#define RLC_VFI_STAT__VFI_STATUS__SHIFT 0x0 +#define RLC_VFI_STAT__VFI_STATUS_MASK 0xFFFFFFFFL +//RLC_VFI_GRBM_GFX_INDEX +#define RLC_VFI_GRBM_GFX_INDEX__VFI_GRBM_GFX_INDEX__SHIFT 0x0 +#define RLC_VFI_GRBM_GFX_INDEX__VFI_GRBM_GFX_INDEX_MASK 0xFFFFFFFFL +//RLC_VFI_GRBM_GFX_CNTL +#define RLC_VFI_GRBM_GFX_CNTL__VFI_GRBM_GFX_CNTL__SHIFT 0x0 +#define RLC_VFI_GRBM_GFX_CNTL__VFI_GRBM_GFX_CNTL_MASK 0xFFFFFFFFL +//RLC_VFI_ADDR +#define RLC_VFI_ADDR__VFI_ADDR__SHIFT 0x0 +#define RLC_VFI_ADDR__VFI_ADDR_MASK 0xFFFFFFFFL +//RLC_VFI_DATA +#define RLC_VFI_DATA__VFI_DATA__SHIFT 0x0 +#define RLC_VFI_DATA__VFI_DATA_MASK 0xFFFFFFFFL// addressBlock: CHIP_XCD_gfxip_xcc_gfx_cpwd_cpwd_pwrdec
Signature · 1 line
2.52.0
Alex Deucher
maintainerPATCH 1/1 drm/amd/amdgpu : Use the MES INV_TLBS API for tlb invalidation on gfx12_1
In reply to Alex DeucherFrom: Shaoyun Liu <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/gmc_v12_1.c | 28 +++++++++++++++ drivers/gpu/drm/amd/amdgpu/mes_v12_1.c | 50 ++++++++++++++++++++++++++ 2 files changed, 78 insertions(+)
drivers/gpu/drm/amd/amdgpu/gmc_v12_1.c +28 -0
@@ -369,6 +369,34 @@ static void gmc_v12_1_flush_gpu_tlb_pasid(struct amdgpu_device *adev,uint16_t queried;int vmid, i; +if (adev->enable_uni_mes && adev->mes.ring[0 ].sched.ready && + (adev->mes.sched_version &AMDGPU_MES_VERSION_MASK ) >=0x6f ) { +struct mes_inv_tlbs_pasid_input input = {0 }; + input.xcc_id = inst; + input.pasid = pasid; + input.flush_type = flush_type; + +/* MES will invalidate hubs for the device(including slave xcc) from master, ignore request from slave */ +if (!amdgpu_gfx_is_master_xcc (adev, inst)) +return ; + + input.hub_id =AMDGPU_GFXHUB (0 ); + adev->mes.funcs->invalidate_tlbs_pasid (&adev->mes, &input); + +if (all_hub) { +/* invalidate mm_hub */ +if (test_bit (AMDGPU_MMHUB1 (0 ), adev->vmhubs_mask)) { + input.hub_id =AMDGPU_MMHUB0 (0 ); + adev->mes.funcs->invalidate_tlbs_pasid (&adev->mes, &input); + } +if (test_bit (AMDGPU_MMHUB1 (0 ), adev->vmhubs_mask)) { + input.hub_id =AMDGPU_MMHUB1 (0 ); + adev->mes.funcs->invalidate_tlbs_pasid (&adev->mes, &input); + } + } +return ; + } +for (vmid =1 ; vmid <16 ; vmid++) {bool valid;
drivers/gpu/drm/amd/amdgpu/mes_v12_1.c +50 -0
68 lines not on this page · raw message
Signature · 1 line
2.52.0
Alex Deucher
maintainerPATCH 1/1 drm/amdkfd: Fix VGPR bank state save in gfx12.1 trap handler
In reply to Alex DeucherFrom: Jay Cornwall <[email protected]>
S_SETREG_IMM32_B32 does not apply a mask to the MODE bank bits. SRC2 is consequently unconditonally cleared during context save.
Use S_SETREG_B32 instead to preserve SRC2.
--- drivers/gpu/drm/amd/amdkfd/cwsr_trap_handler.h | 2 +- drivers/gpu/drm/amd/amdkfd/cwsr_trap_handler_gfx12.asm | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdkfd/cwsr_trap_handler.h +1 -1
@@ -4731,7 +4731,7 @@ static const uint32_t cwsr_trap_gfx12_1_0_hex[] = {0xb8eff822 ,0xb980f822 ,0x00000000 ,0xb8fa2b01 ,0x847a997a ,0x8c6d7a6d , -0xb9802b01 ,0x00000000 , +0xbefa0080 ,0xb97a2b01 ,0xbefa007e ,0x8b7bff7f ,0x01ffffff ,0xbefe00c1 , 0xbeff00c1, 0xee0a407a,
drivers/gpu/drm/amd/amdkfd/cwsr_trap_handler_gfx12.asm +2 -1
@@ -414,7 +414,8 @@ L_HAVE_VGPRS: s_getreg_b32 s_save_tmp, hwreg(HW_REG_WAVE_MODE, SQ_WAVE_MODE_DST_SRC0_SRC1_VGPR_MSB_SHIFT, SQ_WAVE_MODE_DST_SRC0_SRC1_VGPR_MSB_SIZE) s_lshl_b32 s_save_tmp, s_save_tmp, S_SAVE_PC_HI_DST_SRC0_SRC1_VGPR_MSB_SHIFT s_or_b32 s_save_pc_hi, s_save_pc_hi, s_save_tmp - s_setreg_imm32_b32 hwreg(HW_REG_WAVE_MODE, SQ_WAVE_MODE_DST_SRC0_SRC1_VGPR_MSB_SHIFT, SQ_WAVE_MODE_DST_SRC0_SRC1_VGPR_MSB_SIZE), 0 + s_mov_b32 s_save_tmp, 0 + s_setreg_b32 hwreg(HW_REG_WAVE_MODE, SQ_WAVE_MODE_DST_SRC0_SRC1_VGPR_MSB_SHIFT, SQ_WAVE_MODE_DST_SRC0_SRC1_VGPR_MSB_SIZE), s_save_tmp #endif // Trap temporaries must be saved via VGPR but all VGPRs are in use.
Signature · 1 line
2.52.0
Alex Deucher
maintainerPATCH 1/1 drm/amdkfd: Apply VGPR bank state fixup on gfx12.1 trap exit
In reply to Alex DeucherFrom: Jay Cornwall <[email protected]>
- Identify co-issue of S_SET_VGPR_MSB and VALU with banked VGPR
- Restore previous bank setting when exiting the trap
v2:
- Refine VOP3PX2 detection
- Improve load pipelining
- Fix a comment typo
--- .../gpu/drm/amd/amdkfd/cwsr_trap_handler.h | 955 ++++++++++-------- .../amd/amdkfd/cwsr_trap_handler_gfx12.asm | 166 ++- 2 files changed, 706 insertions(+), 415 deletions(-)
drivers/gpu/drm/amd/amdkfd/cwsr_trap_handler.h +541 -414
@@ -4666,14 +4666,14 @@ static const uint32_t cwsr_trap_gfx9_5_0_hex[] = { };static const uint32_t cwsr_trap_gfx12_1_0_hex[] = { -0xbfa00001 ,0xbfa002a2 , +0xbfa00001 ,0xbfa003b7 ,0xb0804009 ,0xb8f8f804 ,0x9178ff78 ,0x00008c00 ,0xb8fbf811 ,0x8b6eff78 ,0x00004000 ,0xbfa10008 ,0x8b6eff7b ,0x00000080 ,0xbfa20018 ,0x8b6ea07b , -0xbfa2004f ,0xbf830010 , +0xbfa200e1 ,0xbf830010 ,0xb8fbf811 ,0xbfa0fffb ,0x8b6eff7b ,0x00000bd0 ,0xbfa20010 ,0xb8eef812 ,
@@ -4684,7 +4684,7 @@ static const uint32_t cwsr_trap_gfx12_1_0_hex[] = {0xf0000000 ,0xbfa20005 ,0x8b6fff6f ,0x00000200 ,0xbfa20002 ,0x8b6ea07b , -0xbfa20039 ,0x9177ff77 , +0xbfa200cb ,0x9177ff77 ,0x007fc000 ,0xb8fa04a1 ,0x847a967a ,0x8c777a77 , 0xb8fa0421, 0x847a957a,
@@ -4710,169 +4710,330 @@ static const uint32_t cwsr_trap_gfx12_1_0_hex[] = {0x80ec886c ,0x82ed806d ,0xbfa00002 ,0x806c846c ,0x826d806d ,0x8b6dff6d , -0x01ffffff ,0x8bfe7e7e , +0x01ffffff ,0xb8fbf811 , +0xbf0d847b ,0xbfa20078 , +0xf4003eb6 ,0xf8000000 , +0xf4003bb6 ,0xf8000008 , +0xbfc70001 ,0x8b76ff7a , +0x80000000 ,0xbfa20027 , +0x9376ff7a ,0x00060019 , +0x81f9a376 ,0xbf0b8179 , +0xbfa20068 ,0x81f9ac76 , +0xbf0b8179 ,0xbfa20062 , +0x81f9b776 ,0xbf0b8179 , +0xbfa2005f ,0x8b76ff7a , +0x000001ff ,0xbf06ff76 , +0x000000fe ,0xbfa2005d , +0xbf06ff76 ,0x000000ff , +0xbfa20057 ,0xbf06ff76 , +0x000000fa ,0xbfa20054 , +0x81f9ff76 ,0x000000e9 , +0xbf0b8179 ,0xbfa20050 , +0x8b76ff7b ,0xffff0000 , +0xbf06ff76 ,0xbf860000 , +0xbfa10051 ,0x9376ff7b , +0x0002000e ,0x8b79ff7b , +0x00003f00 ,0x85798679 , +0x8c767976 ,0xb9763b01 , +0xbfa00049 ,0x8b76ff7a , +0xfc000000 ,0xbf06ff76 , +0xd4000000 ,0xbfa20013 , +0xbf06ff76 ,0xc8000000 , +0xbfa20027 ,0x8b76ff7a , +0xff000000 ,0xbf06ff76 , +0xcf000000 ,0xbfa20039 , +0x8b79ff7a ,0xffff0000 , +0xbf06ff79 ,0xcc350000 , +0xbfa20037 ,0xbf06ff79 , +0xcc3a0000 ,0xbfa20034 , +0xbf06ff76 ,0xcc000000 , +0xbfa10031 ,0x8b76ff7b , +0x000001ff ,0xbf06ff76 , +0x000000ff ,0xbfa20029 , +0xbf06ff76 ,0x000000fa , +0xbfa20026 ,0x81f6ff76 , +0x000000e9 ,0xbf0b8176 , +0xbfa20022 ,0x8b76ff7b , +0x0003fe00 ,0xbf06ff76 , +0x0001fe00 ,0xbfa2001d , +0x8b76ff7b ,0x07fc0000 , +0xbf06ff76 ,0x03fc0000 , +0xbfa20018 ,0xbfa00014 , +0x9376ff7a ,0x00040016 , +0x81f68176 ,0xbf0b8176 , +0xbfa20012 ,0x9376ff7a , +0x00050011 ,0x81f68176 , +0xbf0b8176 ,0xbfa2000d , +0x8b76ff7a ,0x000001ff , +0xbf06ff76 ,0x000000ff , +0xbfa20008 ,0x8b76ff7b , +0x000001ff ,0xbf06ff76 , +0x000000ff ,0xbfa20003 , +0xbfc70000 ,0xbefb006e , +0xbfa0ffad ,0xbfc70000 , +0xbefb006f ,0xbfa0ffaa , +0xbfc70000 ,0x857a9677 , +0xb97a04a1 ,0x857a9577 , +0xb97a0421 ,0x857a8e77 , +0xb97a3021 ,0x8bfe7e7e ,0x8bea6a6a ,0x85788978 ,0xb9783244 ,0xbe804a6c ,0xb8faf802 ,0xbf0d987a ,0xbfa10001 ,0xbfb00000 ,0x8b6dff6d ,0x01ffffff ,0xbefa0080 ,0xb97a0151 , +0x9177ff77 ,0x007fc000 , +0xb8fa04a1 ,0x847a967a , +0x8c777a77 ,0xb8fa0421 , +0x847a957a ,0x8c777a77 , +0xb8fa3021 ,0x847a8e7a , +0x8c777a77 ,0xb980f821 , +0x00000000 ,0xbf0d847b , +0xbfa20078 ,0xf4003eb6 , +0xf8000000 ,0xf4003bb6 , +0xf8000008 ,0xbfc70001 , +0x8b76ff7a ,0x80000000 , +0xbfa20027 ,0x9376ff7a , +0x00060019 ,0x81f9a376 , +0xbf0b8179 ,0xbfa20068 , +0x81f9ac76 ,0xbf0b8179 , +0xbfa20062 ,0x81f9b776 , +0xbf0b8179 ,0xbfa2005f , +0x8b76ff7a ,0x000001ff , +0xbf06ff76 ,0x000000fe , +0xbfa2005d ,0xbf06ff76 , +0x000000ff ,0xbfa20057 , +0xbf06ff76 ,0x000000fa , +0xbfa20054 ,0x81f9ff76 , +0x000000e9 ,0xbf0b8179 , +0xbfa20050 ,0x8b76ff7b , +0xffff0000 ,0xbf06ff76 , +0xbf860000 ,0xbfa10051 , +0x9376ff7b ,0x0002000e , +0x8b79ff7b ,0x00003f00 , +0x85798679 ,0x8c767976 , +0xb9763b01 ,0xbfa00049 , +0x8b76ff7a ,0xfc000000 , +0xbf06ff76 ,0xd4000000 , +0xbfa20013 ,0xbf06ff76 , +0xc8000000 ,0xbfa20027 , +0x8b76ff7a ,0xff000000 , +0xbf06ff76 ,0xcf000000 , +0xbfa20039 ,0x8b79ff7a , +0xffff0000 ,0xbf06ff79 , +0xcc350000 ,0xbfa20037 , +0xbf06ff79 ,0xcc3a0000 , +0xbfa20034 ,0xbf06ff76 , +0xcc000000 ,0xbfa10031 , +0x8b76ff7b ,0x000001ff , +0xbf06ff76 ,0x000000ff , +0xbfa20029 ,0xbf06ff76 , +0x000000fa ,0xbfa20026 , +0x81f6ff76 ,0x000000e9 , +0xbf0b8176 ,0xbfa20022 , +0x8b76ff7b ,0x0003fe00 , +0xbf06ff76 ,0x0001fe00 , +0xbfa2001d ,0x8b76ff7b , +0x07fc0000 ,0xbf06ff76 , +0x03fc0000 ,0xbfa20018 , +0xbfa00014 ,0x9376ff7a , +0x00040016 ,0x81f68176 , +0xbf0b8176 ,0xbfa20012 , +0x9376ff7a ,0x00050011 , +0x81f68176 ,0xbf0b8176 , +0xbfa2000d ,0x8b76ff7a , +0x000001ff ,0xbf06ff76 , +0x000000ff ,0xbfa20008 , +0x8b76ff7b ,0x000001ff , +0xbf06ff76 ,0x000000ff , +0xbfa20003 ,0xbfc70000 , +0xbefb006e ,0xbfa0ffad , +0xbfc70000 ,0xbefb006f , +0xbfa0ffaa ,0xbfc70000 ,0xbeee007e ,0xbeef007f ,0xbefe0180 ,0xbefe4d84 ,0xbf8a0000 ,0x8b7aff7f ,0x04000000 ,0x847a857a , -0x8c6d7a6d ,0x9177ff77 , -0x007fc000 ,0xb8fa04a1 , -0x847a967a ,0x8c777a77 , -0xb8fa0421 ,0x847a957a , -0x8c777a77 ,0xb8fa3021 , -0x847a8e7a ,0x8c777a77 , -0xb980f821 ,0x00000000 , -0xb8eff822 ,0xb980f822 , -0x00000000 ,0xb8fa2b01 , -0x847a997a ,0x8c6d7a6d , -0xbefa0080 ,0xb97a2b01 , -0xbefa007e ,0x8b7bff7f , -0x01ffffff ,0xbefe00c1 , -0xbeff00c1 ,0xee0a407a , -0x000c0000 ,0x00000000 , -0x7e000280 ,0xbefe007a , -0xbeff007b ,0xb8fb0742 , -0x847b997b ,0xb8fa3b05 , -0x807a817a ,0xbf0d997b , -0xbfa20002 ,0x847a897a , -0xbfa00001 ,0x847a8a7a , +0x8c6d7a6d ,0xb8eff822 , +0xb980f822 ,0x00000000 , +0xb8fa2b01 ,0x847a997a , +0x8c6d7a6d ,0xbefa0080 , +0xb97a2b01 ,0xbefa007e ,0x8b7bff7f ,0x01ffffff , -0x807aff7a ,0x000001c0 , -0x807a7e7a ,0x827b807b , -0xd7610000 ,0x00010870 , -0xd7610000 ,0x00010a71 , -0xd7610000 ,0x00010c72 , -0xd7610000 ,0x00010e73 , -0xd7610000 ,0x00011074 , -0xd7610000 ,0x00011275 , -0xd7610000 ,0x00011476 , -0xd7610000 ,0x00011677 , -0xd7610000 ,0x00011a79 , -0xd7610000 ,0x00011c7e , -0xd7610000 ,0x00011e7f , -0xbefe00ff ,0x00003fff , -0xbeff0080 ,0xee0a407a , -0x000c0000 ,0x00000000 , -0xd760007a ,0x00011d00 , -0xd760007b ,0x00011f00 , +0xbefe00c1 ,0xbeff00c1 , +0xee0a407a ,0x000c0000 , +0x00000000 ,0x7e000280 ,0xbefe007a ,0xbeff007b , -0xbef4007e ,0x8b75ff7f , -0x01ffffff ,0xbef1007d , -0xb8f30742 ,0x84739973 , -0xbefe00c1 ,0x857d9973 , -0x8b7d817d ,0xbf06817d , -0xbfa20002 ,0xbeff0080 , -0xbfa00002 ,0xbeff00c1 , -0xbfa0000a ,0xee0a4074 , -0x008c0000 ,0x00008000 , -0xee0a4074 ,0x010c0000 , +0xb8fb0742 ,0x847b997b , +0xb8fa3b05 ,0x807a817a , +0xbf0d997b ,0xbfa20002 , +0x847a897a ,0xbfa00001 , +0x847a8a7a ,0x8b7bff7f , +0x01ffffff ,0x807aff7a , +0x000001c0 ,0x807a7e7a , +0x827b807b ,0xd7610000 , +0x00010870 ,0xd7610000 , +0x00010a71 ,0xd7610000 , +0x00010c72 ,0xd7610000 , +0x00010e73 ,0xd7610000 , +0x00011074 ,0xd7610000 , +0x00011275 ,0xd7610000 , +0x00011476 ,0xd7610000 , +0x00011677 ,0xd7610000 , +0x00011a79 ,0xd7610000 , +0x00011c7e ,0xd7610000 , +0x00011e7f ,0xbefe00ff , +0x00003fff ,0xbeff0080 , +0xee0a407a ,0x000c0000 , +0x00000000 ,0xd760007a , +0x00011d00 ,0xd760007b , +0x00011f00 ,0xbefe007a , +0xbeff007b ,0xbef4007e , +0x8b75ff7f ,0x01ffffff , +0xbef1007d ,0xb8f30742 , +0x84739973 ,0xbefe00c1 , +0x857d9973 ,0x8b7d817d , +0xbf06817d ,0xbfa20002 , +0xbeff0080 ,0xbfa00002 , +0xbeff00c1 ,0xbfa0000a , +0xee0a4074 ,0x008c0000 , +0x00008000 ,0xee0a4074 , +0x010c0000 ,0x00010000 , +0xee0a4074 ,0x018c0000 , +0x00018000 ,0xbfa00009 , +0xee0a4074 ,0x008c0000 ,0x00010000 ,0xee0a4074 , -0x018c0000 ,0x00018000 , -0xbfa00009 ,0xee0a4074 , -0x008c0000 ,0x00010000 , -0xee0a4074 ,0x010c0000 , -0x00020000 ,0xee0a4074 , -0x018c0000 ,0x00030000 , -0xb8f03b05 ,0x80708170 , -0xbf0d9973 ,0xbfa20002 , -0x84708970 ,0xbfa00001 , -0x84708a70 ,0x8070ff70 , -0x00000200 ,0x7e000280 , -0x7e020280 ,0x7e040280 , -0xbefd0080 ,0xb8faf802 , -0xbf0c8b7a ,0xbfa20003 , -0xbe804fc2 ,0xbf94fffe , -0xbfa10001 ,0xbe804ec4 , -0xbf94fffc ,0xb8faf804 , -0x8b7aff7a ,0x0001000c , -0x9178ff78 ,0x0001000c , -0x8c787a78 ,0xd7610002 , -0x0000fa71 ,0x807d817d , -0xd7610002 ,0x0000fa6c , -0x807d817d ,0x917aff6d , -0x80000000 ,0xd7610002 , +0x010c0000 ,0x00020000 , +0xee0a4074 ,0x018c0000 , +0x00030000 ,0xb8f03b05 , +0x80708170 ,0xbf0d9973 , +0xbfa20002 ,0x84708970 , +0xbfa00001 ,0x84708a70 , +0x8070ff70 ,0x00000200 , +0x7e000280 ,0x7e020280 , +0x7e040280 ,0xbefd0080 , +0xb8faf802 ,0xbf0c8b7a , +0xbfa20003 ,0xbe804fc2 , +0xbf94fffe ,0xbfa10001 , +0xbe804ec4 ,0xbf94fffc , +0xb8faf804 ,0x8b7aff7a , +0x0001000c ,0x9178ff78 , +0x0001000c ,0x8c787a78 , +0xd7610002 ,0x0000fa71 , +0x807d817d ,0xd7610002 , +0x0000fa6c ,0x807d817d , +0x917aff6d ,0x80000000 , +0xd7610002 ,0x0000fa7a , +0x807d817d ,0xd7610002 , +0x0000fa6e ,0x807d817d , +0xbefa0080 ,0xd7610002 ,0x0000fa7a ,0x807d817d , -0xd7610002 ,0x0000fa6e , -0x807d817d ,0xbefa0080 , +0xd7610002 ,0x0000fa78 , +0x807d817d ,0xb8faf811 ,0xd7610002 ,0x0000fa7a ,0x807d817d ,0xd7610002 , -0x0000fa78 ,0x807d817d , -0xb8faf811 ,0xd7610002 , +0x0000fa6f ,0x807d817d , +0xb8f1f801 ,0x937aff6d , +0x00060019 ,0x847a8c7a , +0x8c717a71 ,0xd7610002 , +0x0000fa71 ,0x807d817d , +0xb8f1f814 ,0xd7610002 , +0x0000fa71 ,0x807d817d , +0xb8f1f815 ,0xd7610002 , +0x0000fa71 ,0x807d817d , +0xb8f1f812 ,0xd7610002 , +0x0000fa71 ,0x807d817d , +0xb8f1f813 ,0xd7610002 , +0x0000fa71 ,0x807d817d , +0xb8faf802 ,0xd7610002 ,0x0000fa7a ,0x807d817d , -0xd7610002 ,0x0000fa6f , -0x807d817d ,0xb8f1f801 , -0x937aff6d ,0x00060019 , -0x847a8c7a ,0x8c717a71 , -0xd7610002 ,0x0000fa71 , -0x807d817d ,0xb8f1f814 , -0xd7610002 ,0x0000fa71 , -0x807d817d ,0xb8f1f815 , -0xd7610002 ,0x0000fa71 , -0x807d817d ,0xb8f1f812 , -0xd7610002 ,0x0000fa71 , -0x807d817d ,0xb8f1f813 , -0xd7610002 ,0x0000fa71 , -0x807d817d ,0xb8faf802 , +0xbefa50c1 ,0xbfc70000 ,0xd7610002 ,0x0000fa7a , -0x807d817d ,0xbefa50c1 , +0x807d817d ,0xbefa4c88 ,0xbfc70000 ,0xd7610002 ,0x0000fa7a ,0x807d817d , -0xbefa4c88 ,0xbfc70000 , -0xd7610002 ,0x0000fa7a , -0x807d817d ,0xbefe00ff , -0x0000ffff ,0xbeff0080 , -0x80767074 ,0x82778075 , +0xbefe00ff ,0x0000ffff , +0xbeff0080 ,0x80767074 , +0x82778075 ,0xee0a4076 , +0x010c0000 ,0x00000000 , +0xbefe00c1 ,0x7e040280 , +0xbefa5081 ,0xbfc70000 , +0xd7610002 ,0x0001007a , +0xbefa5082 ,0xbfc70000 , +0xd7610002 ,0x0001027a , +0xbefa5083 ,0xbfc70000 , +0xd7610002 ,0x0001047a , +0xbefa5084 ,0xbfc70000 , +0xd7610002 ,0x0001067a , +0xbefa5085 ,0xbfc70000 , +0xd7610002 ,0x0001087a , +0xbefa5086 ,0xbfc70000 , +0xd7610002 ,0x00010a7a , +0xbefa5087 ,0xbfc70000 , +0xd7610002 ,0x00010c7a , +0xbefa5088 ,0xbfc70000 , +0xd7610002 ,0x00010e7a , +0xbefa5089 ,0xbfc70000 , +0xd7610002 ,0x0001107a , +0xbefa508a ,0xbfc70000 , +0xd7610002 ,0x0001127a , +0xbefa508b ,0xbfc70000 , +0xd7610002 ,0x0001147a , +0xbefa508c ,0xbfc70000 , +0xd7610002 ,0x0001167a , +0xbefa508d ,0xbfc70000 , +0xd7610002 ,0x0001187a , +0xbefa508e ,0xbfc70000 , +0xd7610002 ,0x00011a7a , +0xbefa508f ,0xbfc70000 , +0xd7610002 ,0x00011c7a , +0xbefa5090 ,0xbfc70000 , +0xd7610002 ,0x00011e7a ,0xee0a4076 ,0x010c0000 , -0x00000000 ,0xbefe00c1 , -0x7e040280 ,0xbefa5081 , -0xbfc70000 ,0xd7610002 , -0x0001007a ,0xbefa5082 , -0xbfc70000 ,0xd7610002 , -0x0001027a ,0xbefa5083 , -0xbfc70000 ,0xd7610002 , -0x0001047a ,0xbefa5084 , -0xbfc70000 ,0xd7610002 , -0x0001067a ,0xbefa5085 , -0xbfc70000 ,0xd7610002 , -0x0001087a ,0xbefa5086 , -0xbfc70000 ,0xd7610002 , -0x00010a7a ,0xbefa5087 , -0xbfc70000 ,0xd7610002 , -0x00010c7a ,0xbefa5088 , -0xbfc70000 ,0xd7610002 , -0x00010e7a ,0xbefa5089 , -0xbfc70000 ,0xd7610002 , -0x0001107a ,0xbefa508a , -0xbfc70000 ,0xd7610002 , -0x0001127a ,0xbefa508b , -0xbfc70000 ,0xd7610002 , -0x0001147a ,0xbefa508c , -0xbfc70000 ,0xd7610002 , -0x0001167a ,0xbefa508d , -0xbfc70000 ,0xd7610002 , -0x0001187a ,0xbefa508e , -0xbfc70000 ,0xd7610002 , -0x00011a7a ,0xbefa508f , -0xbfc70000 ,0xd7610002 , -0x00011c7a ,0xbefa5090 , -0xbfc70000 ,0xd7610002 , -0x00011e7a ,0xee0a4076 , -0x010c0000 ,0x00008000 , -0xb8f03b05 ,0x80708170 , -0xbf0d9973 ,0xbfa20002 , -0x84708970 ,0xbfa00001 , -0x84708a70 ,0xbef90080 , -0xbefd0080 ,0xbf800000 , +0x00008000 ,0xb8f03b05 , +0x80708170 ,0xbf0d9973 , +0xbfa20002 ,0x84708970 , +0xbfa00001 ,0x84708a70 , +0xbef90080 ,0xbefd0080 , +0xbf800000 ,0xbe804100 , +0xbe824102 ,0xbe844104 , +0xbe864106 ,0xbe884108 , +0xbe8a410a ,0xbe8c410c , +0xbe8e410e ,0xd7610002 , +0x0000f200 ,0x80798179 , +0xd7610002 ,0x0000f201 , +0x80798179 ,0xd7610002 , +0x0000f202 ,0x80798179 , +0xd7610002 ,0x0000f203 , +0x80798179 ,0xd7610002 , +0x0000f204 ,0x80798179 , +0xd7610002 ,0x0000f205 , +0x80798179 ,0xd7610002 , +0x0000f206 ,0x80798179 , +0xd7610002 ,0x0000f207 , +0x80798179 ,0xd7610002 , +0x0000f208 ,0x80798179 , +0xd7610002 ,0x0000f209 , +0x80798179 ,0xd7610002 , +0x0000f20a ,0x80798179 , +0xd7610002 ,0x0000f20b , +0x80798179 ,0xd7610002 , +0x0000f20c ,0x80798179 , +0xd7610002 ,0x0000f20d , +0x80798179 ,0xd7610002 , +0x0000f20e ,0x80798179 , +0xd7610002 ,0x0000f20f , +0x80798179 ,0xbf06a079 , +0xbfa10009 ,0x80767074 , +0x82778075 ,0xee0a4076 , +0x010c0000 ,0x00000000 , +0x8070ff70 ,0x00000080 , +0xbef90080 ,0x7e040280 , +0x807d907d ,0xbf0aff7d , +0x00000060 ,0xbfa2ffb9 ,0xbe804100 ,0xbe824102 ,0xbe844104 ,0xbe864106 ,0xbe884108 ,0xbe8a410a , -0xbe8c410c ,0xbe8e410e ,0xd7610002 ,0x0000f200 ,0x80798179 ,0xd7610002 , 0x0000f201, 0x80798179,
@@ -4891,63 +5052,39 @@ static const uint32_t cwsr_trap_gfx12_1_0_hex[] = {0xd7610002 ,0x0000f20a ,0x80798179 ,0xd7610002 ,0x0000f20b ,0x80798179 , -0xd7610002 ,0x0000f20c , -0x80798179 ,0xd7610002 , -0x0000f20d ,0x80798179 , -0xd7610002 ,0x0000f20e , -0x80798179 ,0xd7610002 , -0x0000f20f ,0x80798179 , -0xbf06a079 ,0xbfa10009 , +0xbefe00ff ,0x0000ffff ,0x80767074 ,0x82778075 ,0xee0a4076 ,0x010c0000 , -0x00000000 ,0x8070ff70 , -0x00000080 ,0xbef90080 , -0x7e040280 ,0x807d907d , -0xbf0aff7d ,0x00000060 , -0xbfa2ffb9 ,0xbe804100 , -0xbe824102 ,0xbe844104 , -0xbe864106 ,0xbe884108 , -0xbe8a410a ,0xd7610002 , -0x0000f200 ,0x80798179 , -0xd7610002 ,0x0000f201 , -0x80798179 ,0xd7610002 , -0x0000f202 ,0x80798179 , -0xd7610002 ,0x0000f203 , -0x80798179 ,0xd7610002 , -0x0000f204 ,0x80798179 , -0xd7610002 ,0x0000f205 , -0x80798179 ,0xd7610002 , -0x0000f206 ,0x80798179 , -0xd7610002 ,0x0000f207 , -0x80798179 ,0xd7610002 , -0x0000f208 ,0x80798179 , -0xd7610002 ,0x0000f209 , -0x80798179 ,0xd7610002 , -0x0000f20a ,0x80798179 , -0xd7610002 ,0x0000f20b , -0x80798179 ,0xbefe00ff , -0x0000ffff ,0x80767074 , +0x00000000 ,0xbefe00c1 , +0x857d9973 ,0x8b7d817d , +0xbf06817d ,0xbfa20002 , +0xbeff0080 ,0xbfa00001 , +0xbeff00c1 ,0xb8fb4306 , +0x8b7bc17b ,0xbfa10042 , +0x8b7aff6d ,0x80000000 , +0xbfa1003f ,0x847b8a7b , +0xb8f03b05 ,0x80708170 , +0xbf0d9973 ,0xbfa20002 , +0x84708970 ,0xbfa00001 , +0x84708a70 ,0x8070ff70 , +0x00000200 ,0x8070ff70 , +0x00000200 ,0xd71f0000 , +0x000100c1 ,0xd7200000 , +0x000200c1 ,0x16000084 , +0x857d9973 ,0x8b7d817d , +0xbf06817d ,0xbefd0080 , +0xbfa20015 ,0xbe8300ff , +0x00000080 ,0xbf800000 , +0xbf800000 ,0xbf800000 , +0xd8d80000 ,0x01000000 , +0xbf8a0000 ,0x80767074 ,0x82778075 ,0xee0a4076 , -0x010c0000 ,0x00000000 , -0xbefe00c1 ,0x857d9973 , -0x8b7d817d ,0xbf06817d , -0xbfa20002 ,0xbeff0080 , -0xbfa00001 ,0xbeff00c1 , -0xb8fb4306 ,0x8b7bc17b , -0xbfa10042 ,0x8b7aff6d , -0x80000000 ,0xbfa1003f , -0x847b8a7b ,0xb8f03b05 , -0x80708170 ,0xbf0d9973 , -0xbfa20002 ,0x84708970 , -0xbfa00001 ,0x84708a70 , -0x8070ff70 ,0x00000200 , -0x8070ff70 ,0x00000200 , -0xd71f0000 ,0x000100c1 , -0xd7200000 ,0x000200c1 , -0x16000084 ,0x857d9973 , -0x8b7d817d ,0xbf06817d , -0xbefd0080 ,0xbfa20015 , -0xbe8300ff ,0x00000080 , +0x008c0000 ,0x00000000 , +0x807d037d ,0x80700370 , +0xd5250000 ,0x0001ff00 , +0x00000080 ,0xbf0a7b7d , +0xbfa2fff1 ,0xbfa00014 , +0xbe8300ff ,0x00000100 ,0xbf800000 ,0xbf800000 ,0xbf800000 ,0xd8d80000 , 0x01000000, 0xbf8a0000,
@@ -4955,252 +5092,242 @@ static const uint32_t cwsr_trap_gfx12_1_0_hex[] = {0xee0a4076 ,0x008c0000 ,0x00000000 ,0x807d037d ,0x80700370 ,0xd5250000 , -0x0001ff00 ,0x00000080 , +0x0001ff00 ,0x00000100 ,0xbf0a7b7d ,0xbfa2fff1 , -0xbfa00014 ,0xbe8300ff , -0x00000100 ,0xbf800000 , -0xbf800000 ,0xbf800000 , -0xd8d80000 ,0x01000000 , -0xbf8a0000 ,0x80767074 , -0x82778075 ,0xee0a4076 , -0x008c0000 ,0x00000000 , -0x807d037d ,0x80700370 , -0xd5250000 ,0x0001ff00 , -0x00000100 ,0xbf0a7b7d , -0xbfa2fff1 ,0xbefe00c1 , -0x857d9973 ,0x8b7d817d , -0xbf06817d ,0xbfa20004 , -0xbef000ff ,0x00000200 , -0xbeff0080 ,0xbfa00003 , -0xbef000ff ,0x00000400 , -0xbeff00c1 ,0xb8fb3b05 , -0x807b817b ,0x847b827b , -0x857d9973 ,0x8b7d817d , -0xbf06817d ,0xbfa2001b , +0xbefe00c1 ,0x857d9973 , +0x8b7d817d ,0xbf06817d , +0xbfa20004 ,0xbef000ff , +0x00000200 ,0xbeff0080 , +0xbfa00003 ,0xbef000ff , +0x00000400 ,0xbeff00c1 , +0xb8fb3b05 ,0x807b817b , +0x847b827b ,0x857d9973 , +0x8b7d817d ,0xbf06817d , +0xbfa2001b ,0xbefd0084 , +0xbf0a7b7d ,0xbfa10032 , +0x7e008700 ,0x7e028701 , +0x7e048702 ,0x7e068703 , +0x80767074 ,0x82778075 , +0xee0a4076 ,0x000c0000 , +0x00000000 ,0xee0a4076 , +0x008c0000 ,0x00008000 , +0xee0a4076 ,0x010c0000 , +0x00010000 ,0xee0a4076 , +0x018c0000 ,0x00018000 , +0x807d847d ,0x8070ff70 , +0x00000200 ,0xbf0a7b7d , +0xbfa2ffe9 ,0xbfa0001a ,0xbefd0084 ,0xbf0a7b7d , -0xbfa10032 ,0x7e008700 , +0xbfa10017 ,0x7e008700 ,0x7e028701 ,0x7e048702 ,0x7e068703 ,0x80767074 ,0x82778075 ,0xee0a4076 ,0x000c0000 ,0x00000000 ,0xee0a4076 ,0x008c0000 , -0x00008000 ,0xee0a4076 , -0x010c0000 ,0x00010000 , +0x00010000 ,0xee0a4076 , +0x010c0000 ,0x00020000 ,0xee0a4076 ,0x018c0000 , -0x00018000 ,0x807d847d , -0x8070ff70 ,0x00000200 , +0x00030000 ,0x807d847d , +0x8070ff70 ,0x00000400 ,0xbf0a7b7d ,0xbfa2ffe9 , -0xbfa0001a ,0xbefd0084 , -0xbf0a7b7d ,0xbfa10017 , -0x7e008700 ,0x7e028701 , -0x7e048702 ,0x7e068703 , -0x80767074 ,0x82778075 , -0xee0a4076 ,0x000c0000 , -0x00000000 ,0xee0a4076 , -0x008c0000 ,0x00010000 , -0xee0a4076 ,0x010c0000 , -0x00020000 ,0xee0a4076 , -0x018c0000 ,0x00030000 , -0x807d847d ,0x8070ff70 , -0x00000400 ,0xbf0a7b7d , -0xbfa2ffe9 ,0xbfa00180 , -0xbef4007e ,0x8b75ff7f , -0x01ffffff ,0xbef1007f , -0xb8f20742 ,0x84729972 , -0x8b6eff7f ,0x04000000 , -0xbfa10044 ,0xbefe00c1 , -0x857d9972 ,0x8b7d817d , -0xbf06817d ,0xbfa20002 , -0xbeff0080 ,0xbfa00001 , -0xbeff00c1 ,0xb8ef4306 , -0x8b6fc16f ,0xbfa10039 , -0x846f8a6f ,0xb8f83b05 , -0x80788178 ,0xbf0d9972 , -0xbfa20002 ,0x84788978 , -0xbfa00001 ,0x84788a78 , -0x8078ff78 ,0x00000200 , -0x8078ff78 ,0x00000200 , -0x857d9972 ,0x8b7d817d , -0xbf06817d ,0xbefd0080 , -0xd71f0001 ,0x000100c1 , -0xd7200001 ,0x000202c1 , -0x30020282 ,0xbfa20012 , -0x80767874 ,0x82778075 , -0xee0a0076 ,0x000c0000 , -0x00000000 ,0xbf8a0000 , -0xd8340000 ,0x00000001 , -0xd5250001 ,0x0001ff01 , -0x00000080 ,0x807dff7d , -0x00000080 ,0x8078ff78 , -0x00000080 ,0xbf0a6f7d , -0xbfa2ffef ,0xbfa00011 , -0x80767874 ,0x82778075 , -0xee0a0076 ,0x000c0000 , -0x00000000 ,0xbf8a0000 , -0xd8340000 ,0x00000001 , -0xd5250001 ,0x0001ff01 , -0x00000100 ,0x807dff7d , -0x00000100 ,0x8078ff78 , -0x00000100 ,0xbf0a6f7d , -0xbfa2ffef ,0xbef80080 , +0xbfa00180 ,0xbef4007e , +0x8b75ff7f ,0x01ffffff , +0xbef1007f ,0xb8f20742 , +0x84729972 ,0x8b6eff7f , +0x04000000 ,0xbfa10044 ,0xbefe00c1 ,0x857d9972 ,0x8b7d817d ,0xbf06817d ,0xbfa20002 ,0xbeff0080 ,0xbfa00001 ,0xbeff00c1 , -0xb8ef3b05 ,0x806f816f , -0x846f826f ,0x857d9972 , +0xb8ef4306 ,0x8b6fc16f , +0xbfa10039 ,0x846f8a6f , +0xb8f83b05 ,0x80788178 , +0xbf0d9972 ,0xbfa20002 , +0x84788978 ,0xbfa00001 , +0x84788a78 ,0x8078ff78 , +0x00000200 ,0x8078ff78 , +0x00000200 ,0x857d9972 ,0x8b7d817d ,0xbf06817d , -0xbfa2002c ,0xbeee0078 , -0x8078ff78 ,0x00000200 , -0xbefd0084 ,0x80767874 , -0x82778075 ,0xee0a0076 , -0x000c0000 ,0x00000000 , -0xee0a0076 ,0x000c0001 , -0x00008000 ,0xee0a0076 , -0x000c0002 ,0x00010000 , -0xee0a0076 ,0x000c0003 , -0x00018000 ,0xbf8a0000 , -0x7e008500 ,0x7e028501 , -0x7e048502 ,0x7e068503 , -0x807d847d ,0x8078ff78 , -0x00000200 ,0xbf0a6f7d , -0xbfa2ffe8 ,0x80766e74 , +0xbefd0080 ,0xd71f0001 , +0x000100c1 ,0xd7200001 , +0x000202c1 ,0x30020282 , +0xbfa20012 ,0x80767874 ,0x82778075 ,0xee0a0076 ,0x000c0000 ,0x00000000 , -0xee0a0076 ,0x000c0001 , -0x00008000 ,0xee0a0076 , -0x000c0002 ,0x00010000 , -0xee0a0076 ,0x000c0003 , -0x00018000 ,0xbf8a0000 , -0xbfa0002d ,0xbeee0078 , -0x8078ff78 ,0x00000400 , -0xbefd0084 ,0xbf0a6f7d , -0xbfa10018 ,0x80767874 , +0xbf8a0000 ,0xd8340000 , +0x00000001 ,0xd5250001 , +0x0001ff01 ,0x00000080 , +0x807dff7d ,0x00000080 , +0x8078ff78 ,0x00000080 , +0xbf0a6f7d ,0xbfa2ffef , +0xbfa00011 ,0x80767874 ,0x82778075 ,0xee0a0076 ,0x000c0000 ,0x00000000 , -0xee0a0076 ,0x000c0001 , +0xbf8a0000 ,0xd8340000 , +0x00000001 ,0xd5250001 , +0x0001ff01 ,0x00000100 , +0x807dff7d ,0x00000100 , +0x8078ff78 ,0x00000100 , +0xbf0a6f7d ,0xbfa2ffef , +0xbef80080 ,0xbefe00c1 , +0x857d9972 ,0x8b7d817d , +0xbf06817d ,0xbfa20002 , +0xbeff0080 ,0xbfa00001 , +0xbeff00c1 ,0xb8ef3b05 , +0x806f816f ,0x846f826f , +0x857d9972 ,0x8b7d817d , +0xbf06817d ,0xbfa2002c , +0xbeee0078 ,0x8078ff78 , +0x00000200 ,0xbefd0084 , +0x80767874 ,0x82778075 , +0xee0a0076 ,0x000c0000 , +0x00000000 ,0xee0a0076 , +0x000c0001 ,0x00008000 , +0xee0a0076 ,0x000c0002 ,0x00010000 ,0xee0a0076 , -0x000c0002 ,0x00020000 , -0xee0a0076 ,0x000c0003 , -0x00030000 ,0xbf8a0000 , -0x7e008500 ,0x7e028501 , -0x7e048502 ,0x7e068503 , -0x807d847d ,0x8078ff78 , -0x00000400 ,0xbf0a6f7d , -0xbfa2ffe8 ,0x80766e74 , -0x82778075 ,0xee0a0076 , -0x000c0000 ,0x00000000 , -0xee0a0076 ,0x000c0001 , +0x000c0003 ,0x00018000 , +0xbf8a0000 ,0x7e008500 , +0x7e028501 ,0x7e048502 , +0x7e068503 ,0x807d847d , +0x8078ff78 ,0x00000200 , +0xbf0a6f7d ,0xbfa2ffe8 , +0x80766e74 ,0x82778075 , +0xee0a0076 ,0x000c0000 , +0x00000000 ,0xee0a0076 , +0x000c0001 ,0x00008000 , +0xee0a0076 ,0x000c0002 ,0x00010000 ,0xee0a0076 , -0x000c0002 ,0x00020000 , -0xee0a0076 ,0x000c0003 , -0x00030000 ,0xbf8a0000 , -0xb8f83b05 ,0x80788178 , -0xbf0d9972 ,0xbfa20002 , -0x84788978 ,0xbfa00001 , -0x84788a78 ,0x8078ff78 , -0x00000200 ,0x80f8ff78 , -0x00000060 ,0x80767874 , -0x82778075 ,0xbefd00ff , -0x0000006c ,0xf460403b , -0xf8000000 ,0xbf8a0000 , -0x80fd847d ,0xbf800000 , -0xbe804300 ,0xbe824302 , -0x80f6a076 ,0x82f78077 , -0xf460603b ,0xf8000000 , -0xbf8a0000 ,0x80fd887d , +0x000c0003 ,0x00018000 , +0xbf8a0000 ,0xbfa0002d , +0xbeee0078 ,0x8078ff78 , +0x00000400 ,0xbefd0084 , +0xbf0a6f7d ,0xbfa10018 , +0x80767874 ,0x82778075 , +0xee0a0076 ,0x000c0000 , +0x00000000 ,0xee0a0076 , +0x000c0001 ,0x00010000 , +0xee0a0076 ,0x000c0002 , +0x00020000 ,0xee0a0076 , +0x000c0003 ,0x00030000 , +0xbf8a0000 ,0x7e008500 , +0x7e028501 ,0x7e048502 , +0x7e068503 ,0x807d847d , +0x8078ff78 ,0x00000400 , +0xbf0a6f7d ,0xbfa2ffe8 , +0x80766e74 ,0x82778075 , +0xee0a0076 ,0x000c0000 , +0x00000000 ,0xee0a0076 , +0x000c0001 ,0x00010000 , +0xee0a0076 ,0x000c0002 , +0x00020000 ,0xee0a0076 , +0x000c0003 ,0x00030000 , +0xbf8a0000 ,0xb8f83b05 , +0x80788178 ,0xbf0d9972 , +0xbfa20002 ,0x84788978 , +0xbfa00001 ,0x84788a78 , +0x8078ff78 ,0x00000200 , +0x80f8ff78 ,0x00000060 , +0x80767874 ,0x82778075 , +0xbefd00ff ,0x0000006c , +0xf460403b ,0xf8000000 , +0xbf8a0000 ,0x80fd847d ,0xbf800000 ,0xbe804300 , -0xbe824302 ,0xbe844304 , -0xbe864306 ,0x80f6c076 , -0x82f78077 ,0xf460803b , +0xbe824302 ,0x80f6a076 , +0x82f78077 ,0xf460603b ,0xf8000000 ,0xbf8a0000 , -0x80fd907d ,0xbf800000 , +0x80fd887d ,0xbf800000 ,0xbe804300 ,0xbe824302 ,0xbe844304 ,0xbe864306 , -0xbe884308 ,0xbe8a430a , -0xbe8c430c ,0xbe8e430e , -0xbf06807d ,0xbfa1ffef , -0xb980f801 ,0x00000000 , -0xb8f83b05 ,0x80788178 , -0xbf0d9972 ,0xbfa20002 , -0x84788978 ,0xbfa00001 , -0x84788a78 ,0x8078ff78 , -0x00000200 ,0x80767874 , -0x82778075 ,0xbeff0071 , -0xf4601bfb ,0xf8000000 , -0xf4601b3b ,0xf8000004 , -0xf4601b7b ,0xf8000008 , -0xf4601c3b ,0xf800000c , -0xf4601c7b ,0xf8000010 , -0xf4601ebb ,0xf8000014 , -0xf4601efb ,0xf8000018 , -0xf4601e7b ,0xf800001c , -0xf4601cfb ,0xf8000020 , -0xf4601bbb ,0xf8000024 , -0xbf8a0000 ,0xb96ef814 , -0xf4601bbb ,0xf8000028 , -0xbf8a0000 ,0xb96ef815 , -0xf4601bbb ,0xf800002c , -0xbf8a0000 ,0xb96ef812 , -0xf4601bbb ,0xf8000030 , -0xbf8a0000 ,0xb96ef813 , -0x8b6eff7f ,0x04000000 , -0xbfa10022 ,0xf4601bbb , -0xf8000038 ,0xbf8a0000 , -0xbf0d806e ,0xbfa1001d , -0x856e906e ,0x8b6e6e6e , -0xbfa10003 ,0xbe804ec1 , -0x816ec16e ,0xbfa0fffb , -0xbef800ff ,0x00000080 , -0xbefd0081 ,0xf4601bbb , -0xf0000000 ,0xbfc70000 , -0x80788478 ,0x937eff6e , -0x00070004 ,0x847e907e , -0x8c7d7e7d ,0xbe80517d , -0x917dff7d ,0x007f0000 , -0x856e906e ,0x8b6e6e6e , -0xbfa10003 ,0xbe804e7d , -0x816ec16e ,0xbfa0fffb , -0x807d817d ,0xbf08907d , -0xbfa1ffec ,0xf4601bbb , -0xf800003c ,0xbfc70000 , -0xbf0d806e ,0xbfa1000c , -0xbf0d9a7f ,0xbfa10002 , -0xbf068180 ,0xbe804fc4 , -0xbf94fffc ,0xbfa10006 , -0x856e906e ,0x8b6e6e6e , -0xbfa10003 ,0xbe804ec3 , -0x816ec16e ,0xbfa0fffb , -0xbefd006f ,0xbefe0070 , -0xbeff0071 ,0xb979f822 , -0xb97b2011 ,0x857b867b , -0xb97b0191 ,0x857b827b , -0xb97bba11 ,0xb973f801 , -0xb8ee3b05 ,0x806e816e , -0xbf0d9972 ,0xbfa20002 , -0x846e896e ,0xbfa00001 , -0x846e8a6e ,0x806eff6e , -0x000001c0 ,0x806e746e , -0x826f8075 ,0xf4605c37 , -0xf8000010 ,0xf4605d37 , -0xf8000020 ,0xf4601e77 , -0xf8000034 ,0xbf8a0000 , -0x856e9677 ,0xb96e04a1 , -0x856e9577 ,0xb96e0421 , -0x856e8e77 ,0xb96e3021 , -0x8b6dff6d ,0x01ffffff , -0x8bfe7e7e ,0x8bea6a6a , -0xb97af804 ,0xb8eef802 , -0xbf0c8b6e ,0xbfa20003 , -0xbe804fc2 ,0xbf94fffe , -0xbfa10001 ,0xbe804ec4 , -0xbf94fffc ,0x857a897a , -0xb97a0244 ,0xbe804a6c , +0x80f6c076 ,0x82f78077 , +0xf460803b ,0xf8000000 , +0xbf8a0000 ,0x80fd907d , +0xbf800000 ,0xbe804300 , +0xbe824302 ,0xbe844304 , +0xbe864306 ,0xbe884308 , +0xbe8a430a ,0xbe8c430c , +0xbe8e430e ,0xbf06807d , +0xbfa1ffef ,0xb980f801 , +0x00000000 ,0xb8f83b05 , +0x80788178 ,0xbf0d9972 , +0xbfa20002 ,0x84788978 , +0xbfa00001 ,0x84788a78 , +0x8078ff78 ,0x00000200 , +0x80767874 ,0x82778075 , +0xbeff0071 ,0xf4601bfb , +0xf8000000 ,0xf4601b3b , +0xf8000004 ,0xf4601b7b , +0xf8000008 ,0xf4601c3b , +0xf800000c ,0xf4601c7b , +0xf8000010 ,0xf4601ebb , +0xf8000014 ,0xf4601efb , +0xf8000018 ,0xf4601e7b , +0xf800001c ,0xf4601cfb , +0xf8000020 ,0xf4601bbb , +0xf8000024 ,0xbf8a0000 , +0xb96ef814 ,0xf4601bbb , +0xf8000028 ,0xbf8a0000 , +0xb96ef815 ,0xf4601bbb , +0xf800002c ,0xbf8a0000 , +0xb96ef812 ,0xf4601bbb , +0xf8000030 ,0xbf8a0000 , +0xb96ef813 ,0x8b6eff7f , +0x04000000 ,0xbfa10022 , +0xf4601bbb ,0xf8000038 , +0xbf8a0000 ,0xbf0d806e , +0xbfa1001d ,0x856e906e , +0x8b6e6e6e ,0xbfa10003 , +0xbe804ec1 ,0x816ec16e , +0xbfa0fffb ,0xbef800ff , +0x00000080 ,0xbefd0081 , +0xf4601bbb ,0xf0000000 , +0xbfc70000 ,0x80788478 , +0x937eff6e ,0x00070004 , +0x847e907e ,0x8c7d7e7d , +0xbe80517d ,0x917dff7d , +0x007f0000 ,0x856e906e , +0x8b6e6e6e ,0xbfa10003 , +0xbe804e7d ,0x816ec16e , +0xbfa0fffb ,0x807d817d , +0xbf08907d ,0xbfa1ffec , +0xf4601bbb ,0xf800003c , +0xbfc70000 ,0xbf0d806e , +0xbfa1000c ,0xbf0d9a7f , +0xbfa10002 ,0xbf068180 , +0xbe804fc4 ,0xbf94fffc , +0xbfa10006 ,0x856e906e , +0x8b6e6e6e ,0xbfa10003 , +0xbe804ec3 ,0x816ec16e , +0xbfa0fffb ,0xbefd006f , +0xbefe0070 ,0xbeff0071 , +0xb979f822 ,0xb97b2011 , +0x857b867b ,0xb97b0191 , +0x857b827b ,0xb97bba11 , +0xb973f801 ,0xb8ee3b05 , +0x806e816e ,0xbf0d9972 , +0xbfa20002 ,0x846e896e , +0xbfa00001 ,0x846e8a6e , +0x806eff6e ,0x000001c0 , +0x806e746e ,0x826f8075 , +0xf4605c37 ,0xf8000010 , +0xf4605d37 ,0xf8000020 , +0xf4601e77 ,0xf8000034 , +0xbf8a0000 ,0x856e9677 , +0xb96e04a1 ,0x856e9577 , +0xb96e0421 ,0x856e8e77 , +0xb96e3021 ,0x8b6dff6d , +0x01ffffff ,0x8bfe7e7e , +0x8bea6a6a ,0xb97af804 ,0xb8eef802 ,0xbf0c8b6e ,0xbfa20003 ,0xbe804fc2 ,0xbf94fffe ,0xbfa10001 ,0xbe804ec4 ,0xbf94fffc , -0xbfb10000 ,0xbf9f0000 , +0x857a897a ,0xb97a0244 , +0xbe804a6c ,0xb8eef802 , +0xbf0c8b6e ,0xbfa20003 , +0xbe804fc2 ,0xbf94fffe , +0xbfa10001 ,0xbe804ec4 , +0xbf94fffc ,0xbfb10000 ,0xbf9f0000 ,0xbf9f0000 ,0xbf9f0000 ,0xbf9f0000 , + 0xbf9f0000, 0x00000000, };
drivers/gpu/drm/amd/amdkfd/cwsr_trap_handler_gfx12.asm +165 -1
193 lines not on this page · raw message
Signature · 1 line
2.52.0
Alex Deucher
maintainerPATCH 1/1 drm/amdgpu: set aid_mask for soc v1
In reply to Alex DeucherFrom: Likun Gao <[email protected]>
Set aid_mask via xcc_mask.
v2: squash in follow up change
--- drivers/gpu/drm/amd/amdgpu/soc_v1_0.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/soc_v1_0.c +10 -2
@@ -781,9 +781,17 @@ static int soc_v1_0_xcp_mgr_init(struct amdgpu_device *adev)int soc_v1_0_init_soc_config (struct amdgpu_device *adev) { -int ret; +int ret, i; +int xcc_inst_per_aid =4 ; +uint16_t xcc_mask; + + xcc_mask = adev->gfx.xcc_mask; + adev->aid_mask =0 ; +for (i =0 ; xcc_mask; xcc_mask >>= xcc_inst_per_aid, i++) { +if (xcc_mask & ((1U << xcc_inst_per_aid) -1 )) + adev->aid_mask |= (1 << i); + } -/*TODO: init soc config */ adev->sdma.num_inst_per_xcc =2 ; adev->sdma.num_instances =NUM_XCC (adev->gfx.xcc_mask) * adev->sdma.num_inst_per_xcc;
Signature · 1 line
2.52.0
Alex Deucher
maintainerPATCH 1/1 drm/amdgpu: add helpers to access cross-die registers smn addr for soc v1_0
In reply to Alex DeucherFrom: Le Ma <[email protected]>
Encode die_id/socket_id for upper 32bits of soc v1_0 registers SMN address.
--- drivers/gpu/drm/amd/amdgpu/soc_v1_0.c | 32 +++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/soc_v1_0.h | 1 + 2 files changed, 33 insertions(+)
drivers/gpu/drm/amd/amdgpu/soc_v1_0.c +32 -0
@@ -72,6 +72,37 @@ static void soc_v1_0_doorbell_index_init(struct amdgpu_device *adev) adev->doorbell_index.max_assignment =AMDGPU_SOC_V1_0_DOORBELL_MAX_ASSIGNMENT <<1 ; } +/* Fixed pattern for upper 32bits smn addressing. +* bit[47:40]: Socket ID +* bit[39:34]: Die ID +* bit[32]: local or remote die in same socket +* The ext_id is comprised of socket_id and die_id. +* ext_id = (socket_id << 6) | (die_id) +*/ +u64 soc_v1_0_encode_ext_smn_addressing (int ext_id) +{ +u64 ext_offset; +int socket_id, die_id; + +/* local die routing for MID0 on local socket */ +if (ext_id ==0 ) +return 0 ; + + die_id = ext_id &0x3 ; + socket_id = (ext_id >>6 ) &&0xff ; + +/* Initiated from host, accessing to non-MID0 is cross-die traffic */ +if (socket_id ==0 ) + ext_offset = ((u64 )die_id <<34 ) | (1ULL <<32 ); +else if (socket_id !=0 && die_id !=0 ) + ext_offset = ((u64 )socket_id <<40 ) | ((u64 )die_id <<34 ) | + (3ULL <<32 ); +else + ext_offset = ((u64 )socket_id <<40 ) | (1ULL <<33 ); + +return ext_offset; +} +static u32 soc_v1_0_get_config_memsize (struct amdgpu_device *adev) {return adev->nbio.funcs->get_memsize (adev);
@@ -211,6 +242,7 @@ static const struct amdgpu_asic_funcs soc_v1_0_asic_funcs = { .need_full_reset = &soc_v1_0_need_full_reset, .init_doorbell_index = &soc_v1_0_doorbell_index_init, .need_reset_on_init = &soc_v1_0_need_reset_on_init, + .encode_ext_smn_addressing = &soc_v1_0_encode_ext_smn_addressing, .reset = soc_v1_0_asic_reset, };
drivers/gpu/drm/amd/amdgpu/soc_v1_0.h +1 -0
@@ -32,5 +32,6 @@ void soc_v1_0_grbm_select(struct amdgpu_device *adev,int soc_v1_0_init_soc_config (struct amdgpu_device *adev);bool soc_v1_0_normalize_xcc_reg_range (uint32_t reg);uint32_t soc_v1_0_normalize_xcc_reg_offset (uint32_t reg); +u64 soc_v1_0_encode_ext_smn_addressing (int ext_id);#endif
Signature · 1 line
2.52.0
Alex Deucher
maintainerPATCH 1/1 drm/amdgpu: Add sysfs up clean for gfx_v12_1
In reply to Alex DeucherFrom: Asad Kamal <[email protected]>
Add sysfs clean up for gfx_v12_1 during gfx fini sequence. This will prevent following crash while reloading driver
2645.490824] R13: 000055d0cb186330 R14: 000055d0cb185ed0 R15: 000055d0cb188f40
[ 2645.490825] </TASK> [ 2645.490836] amdgpu 0000:02:00.0: amdgpu: failed to create xcp sysfs files [ 2645.490937] amdgpu 0000:02:00.0: amdgpu: sw_init of IP block <gfx_v12_1> failed -17 [ 2645.491018] amdgpu 0000:02:00.0: amdgpu: amdgpu_device_ip_init failed [ 2645.491098] amdgpu 0000:02:00.0: amdgpu: Fatal error during GPU init [ 2645.491547] amdgpu 0000:02:00.0: amdgpu: amdgpu: finishing device. [ 2648.549939] ------------[ cut here ]------------ [ 2648.549942] WARNING: CPU: 0 PID: 2459 at /tmp/amd.aIpOeG3c/amd/amdgpu/amdgpu_irq.c:
--- drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c +1 -0
@@ -1282,6 +1282,7 @@ static int gfx_v12_1_sw_fini(struct amdgpu_ip_block *ip_block)gfx_v12_1_rlc_autoload_buffer_fini (adev);gfx_v12_1_free_microcode (adev); +amdgpu_gfx_sysfs_fini (adev);return 0 ; }
Signature · 1 line
2.52.0
Alex Deucher
maintainerPATCH 1/1 drm/amdgpu: enable CP interrupt for gfx v12_1 in frontdoor loading case
In reply to Alex DeucherFrom: Le Ma <[email protected]>
Enable cp interrupt for event detection since GFX CGCG and LS has been enabled by firmware.
v2: enable CP INT by merely checking fw_load_type
--- drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c +3 -2
@@ -2479,8 +2479,9 @@ static int gfx_v12_1_xcc_cp_resume(struct amdgpu_device *adev, uint16_t xcc_maskreturn r; } -if (!(adev->flags &AMD_IS_APU )) -gfx_v12_1_xcc_enable_gui_idle_interrupt (adev, false, xcc_id); +/* GFX CGCG and LS is set by default */ +if (adev->firmware.load_type ==AMDGPU_FW_LOAD_PSP ) +gfx_v12_1_xcc_enable_gui_idle_interrupt (adev, true, xcc_id);gfx_v12_1_xcc_cp_set_doorbell_range (adev, xcc_id);
Signature · 1 line
2.52.0
Alex Deucher
maintainerPATCH 1/1 drm/amdkfd: Add back CWSR trap handler for GFX 12.1
In reply to Alex DeucherFrom: Mukul Joshi <[email protected]>
CWSR Trap handler for GFX 12.1 was missed when merging changes from 6.14 NPI branch to 6.16 NPI branch. This change adds back the CWSR trap handler for GFX 12.1.
--- .../gpu/drm/amd/amdkfd/cwsr_trap_handler.h | 540 +++++++++++++ .../amd/amdkfd/cwsr_trap_handler_gfx12.asm | 746 +++++++++++------- drivers/gpu/drm/amd/amdkfd/kfd_device.c | 7 +- 3 files changed, 997 insertions(+), 296 deletions(-)
drivers/gpu/drm/amd/amdkfd/cwsr_trap_handler.h +540 -0
@@ -4664,3 +4664,543 @@ static const uint32_t cwsr_trap_gfx9_5_0_hex[] = {0xbf8a0000 ,0xbe801f6c , 0xbf9b0000, 0x00000000, }; + +static const uint32_t cwsr_trap_gfx12_1_0_hex[] = { +0xbfa00001 ,0xbfa002a2 , +0xb0804009 ,0xb8f8f804 , +0x9178ff78 ,0x00008c00 , +0xb8fbf811 ,0x8b6eff78 , +0x00004000 ,0xbfa10008 , +0x8b6eff7b ,0x00000080 , +0xbfa20018 ,0x8b6ea07b , +0xbfa2004f ,0xbf830010 , +0xb8fbf811 ,0xbfa0fffb , +0x8b6eff7b ,0x00000bd0 , +0xbfa20010 ,0xb8eef812 , +0x8b6f8f7b ,0xbfa10002 , +0x8c6eff6e ,0x00000080 , +0xb8eff813 ,0x8b6e6e6f , +0xbfa20008 ,0x8b6eff6d , +0xf0000000 ,0xbfa20005 , +0x8b6fff6f ,0x00000200 , +0xbfa20002 ,0x8b6ea07b , +0xbfa20039 ,0x9177ff77 , +0x007fc000 ,0xb8fa04a1 , +0x847a967a ,0x8c777a77 , +0xb8fa0421 ,0x847a957a , +0x8c777a77 ,0xb8fa3021 , +0x847a8e7a ,0x8c777a77 , +0xb980f821 ,0x00000000 , +0xbefa4d82 ,0xbf8a0000 , +0x84fa887a ,0xbf0d987b , +0xbfa10002 ,0x8c7bff7b , +0xfe000000 ,0xf4601bbd , +0xf8000010 ,0xbf8a0000 , +0x846e976e ,0x9177ff77 , +0x00800000 ,0x8c776e77 , +0xf4603bbd ,0xf8000000 , +0xbf8a0000 ,0xf4603ebd , +0xf8000008 ,0xbf8a0000 , +0x8bee6e6e ,0xbfa10001 , +0xbe80486e ,0x8b6eff6d , +0xf0000000 ,0xbfa20009 , +0xb8eef811 ,0x8b6eff6e , +0x00000080 ,0xbfa20007 , +0x8c78ff78 ,0x00004000 , +0x80ec886c ,0x82ed806d , +0xbfa00002 ,0x806c846c , +0x826d806d ,0x8b6dff6d , +0x01ffffff ,0x8bfe7e7e , +0x8bea6a6a ,0x85788978 , +0xb9783244 ,0xbe804a6c , +0xb8faf802 ,0xbf0d987a , +0xbfa10001 ,0xbfb00000 , +0x8b6dff6d ,0x01ffffff , +0xbefa0080 ,0xb97a0151 , +0xbeee007e ,0xbeef007f , +0xbefe0180 ,0xbefe4d84 , +0xbf8a0000 ,0x8b7aff7f , +0x04000000 ,0x847a857a , +0x8c6d7a6d ,0x9177ff77 , +0x007fc000 ,0xb8fa04a1 , +0x847a967a ,0x8c777a77 , +0xb8fa0421 ,0x847a957a , +0x8c777a77 ,0xb8fa3021 , +0x847a8e7a ,0x8c777a77 , +0xb980f821 ,0x00000000 , +0xb8eff822 ,0xb980f822 , +0x00000000 ,0xb8fa2b01 , +0x847a997a ,0x8c6d7a6d , +0xb9802b01 ,0x00000000 , +0xbefa007e ,0x8b7bff7f , +0x01ffffff ,0xbefe00c1 , +0xbeff00c1 ,0xee0a407a , +0x000c0000 ,0x00000000 , +0x7e000280 ,0xbefe007a , +0xbeff007b ,0xb8fb0742 , +0x847b997b ,0xb8fa3b05 , +0x807a817a ,0xbf0d997b , +0xbfa20002 ,0x847a897a , +0xbfa00001 ,0x847a8a7a , +0x8b7bff7f ,0x01ffffff , +0x807aff7a ,0x000001c0 , +0x807a7e7a ,0x827b807b , +0xd7610000 ,0x00010870 , +0xd7610000 ,0x00010a71 , +0xd7610000 ,0x00010c72 , +0xd7610000 ,0x00010e73 , +0xd7610000 ,0x00011074 , +0xd7610000 ,0x00011275 , +0xd7610000 ,0x00011476 , +0xd7610000 ,0x00011677 , +0xd7610000 ,0x00011a79 , +0xd7610000 ,0x00011c7e , +0xd7610000 ,0x00011e7f , +0xbefe00ff ,0x00003fff , +0xbeff0080 ,0xee0a407a , +0x000c0000 ,0x00000000 , +0xd760007a ,0x00011d00 , +0xd760007b ,0x00011f00 , +0xbefe007a ,0xbeff007b , +0xbef4007e ,0x8b75ff7f , +0x01ffffff ,0xbef1007d , +0xb8f30742 ,0x84739973 , +0xbefe00c1 ,0x857d9973 , +0x8b7d817d ,0xbf06817d , +0xbfa20002 ,0xbeff0080 , +0xbfa00002 ,0xbeff00c1 , +0xbfa0000a ,0xee0a4074 , +0x008c0000 ,0x00008000 , +0xee0a4074 ,0x010c0000 , +0x00010000 ,0xee0a4074 , +0x018c0000 ,0x00018000 , +0xbfa00009 ,0xee0a4074 , +0x008c0000 ,0x00010000 , +0xee0a4074 ,0x010c0000 , +0x00020000 ,0xee0a4074 , +0x018c0000 ,0x00030000 , +0xb8f03b05 ,0x80708170 , +0xbf0d9973 ,0xbfa20002 , +0x84708970 ,0xbfa00001 , +0x84708a70 ,0x8070ff70 , +0x00000200 ,0x7e000280 , +0x7e020280 ,0x7e040280 , +0xbefd0080 ,0xb8faf802 , +0xbf0c8b7a ,0xbfa20003 , +0xbe804fc2 ,0xbf94fffe , +0xbfa10001 ,0xbe804ec4 , +0xbf94fffc ,0xb8faf804 , +0x8b7aff7a ,0x0001000c , +0x9178ff78 ,0x0001000c , +0x8c787a78 ,0xd7610002 , +0x0000fa71 ,0x807d817d , +0xd7610002 ,0x0000fa6c , +0x807d817d ,0x917aff6d , +0x80000000 ,0xd7610002 , +0x0000fa7a ,0x807d817d , +0xd7610002 ,0x0000fa6e , +0x807d817d ,0xbefa0080 , +0xd7610002 ,0x0000fa7a , +0x807d817d ,0xd7610002 , +0x0000fa78 ,0x807d817d , +0xb8faf811 ,0xd7610002 , +0x0000fa7a ,0x807d817d , +0xd7610002 ,0x0000fa6f , +0x807d817d ,0xb8f1f801 , +0x937aff6d ,0x00060019 , +0x847a8c7a ,0x8c717a71 , +0xd7610002 ,0x0000fa71 , +0x807d817d ,0xb8f1f814 , +0xd7610002 ,0x0000fa71 , +0x807d817d ,0xb8f1f815 , +0xd7610002 ,0x0000fa71 , +0x807d817d ,0xb8f1f812 , +0xd7610002 ,0x0000fa71 , +0x807d817d ,0xb8f1f813 , +0xd7610002 ,0x0000fa71 , +0x807d817d ,0xb8faf802 , +0xd7610002 ,0x0000fa7a , +0x807d817d ,0xbefa50c1 , +0xbfc70000 ,0xd7610002 , +0x0000fa7a ,0x807d817d , +0xbefa4c88 ,0xbfc70000 , +0xd7610002 ,0x0000fa7a , +0x807d817d ,0xbefe00ff , +0x0000ffff ,0xbeff0080 , +0x80767074 ,0x82778075 , +0xee0a4076 ,0x010c0000 , +0x00000000 ,0xbefe00c1 , +0x7e040280 ,0xbefa5081 , +0xbfc70000 ,0xd7610002 , +0x0001007a ,0xbefa5082 , +0xbfc70000 ,0xd7610002 , +0x0001027a ,0xbefa5083 , +0xbfc70000 ,0xd7610002 , +0x0001047a ,0xbefa5084 , +0xbfc70000 ,0xd7610002 , +0x0001067a ,0xbefa5085 , +0xbfc70000 ,0xd7610002 , +0x0001087a ,0xbefa5086 , +0xbfc70000 ,0xd7610002 , +0x00010a7a ,0xbefa5087 , +0xbfc70000 ,0xd7610002 , +0x00010c7a ,0xbefa5088 , +0xbfc70000 ,0xd7610002 , +0x00010e7a ,0xbefa5089 , +0xbfc70000 ,0xd7610002 , +0x0001107a ,0xbefa508a , +0xbfc70000 ,0xd7610002 , +0x0001127a ,0xbefa508b , +0xbfc70000 ,0xd7610002 , +0x0001147a ,0xbefa508c , +0xbfc70000 ,0xd7610002 , +0x0001167a ,0xbefa508d , +0xbfc70000 ,0xd7610002 , +0x0001187a ,0xbefa508e , +0xbfc70000 ,0xd7610002 , +0x00011a7a ,0xbefa508f , +0xbfc70000 ,0xd7610002 , +0x00011c7a ,0xbefa5090 , +0xbfc70000 ,0xd7610002 , +0x00011e7a ,0xee0a4076 , +0x010c0000 ,0x00008000 , +0xb8f03b05 ,0x80708170 , +0xbf0d9973 ,0xbfa20002 , +0x84708970 ,0xbfa00001 , +0x84708a70 ,0xbef90080 , +0xbefd0080 ,0xbf800000 , +0xbe804100 ,0xbe824102 , +0xbe844104 ,0xbe864106 , +0xbe884108 ,0xbe8a410a , +0xbe8c410c ,0xbe8e410e , +0xd7610002 ,0x0000f200 , +0x80798179 ,0xd7610002 , +0x0000f201 ,0x80798179 , +0xd7610002 ,0x0000f202 , +0x80798179 ,0xd7610002 , +0x0000f203 ,0x80798179 , +0xd7610002 ,0x0000f204 , +0x80798179 ,0xd7610002 , +0x0000f205 ,0x80798179 , +0xd7610002 ,0x0000f206 , +0x80798179 ,0xd7610002 , +0x0000f207 ,0x80798179 , +0xd7610002 ,0x0000f208 , +0x80798179 ,0xd7610002 , +0x0000f209 ,0x80798179 , +0xd7610002 ,0x0000f20a , +0x80798179 ,0xd7610002 , +0x0000f20b ,0x80798179 , +0xd7610002 ,0x0000f20c , +0x80798179 ,0xd7610002 , +0x0000f20d ,0x80798179 , +0xd7610002 ,0x0000f20e , +0x80798179 ,0xd7610002 , +0x0000f20f ,0x80798179 , +0xbf06a079 ,0xbfa10009 , +0x80767074 ,0x82778075 , +0xee0a4076 ,0x010c0000 , +0x00000000 ,0x8070ff70 , +0x00000080 ,0xbef90080 , +0x7e040280 ,0x807d907d , +0xbf0aff7d ,0x00000060 , +0xbfa2ffb9 ,0xbe804100 , +0xbe824102 ,0xbe844104 , +0xbe864106 ,0xbe884108 , +0xbe8a410a ,0xd7610002 , +0x0000f200 ,0x80798179 , +0xd7610002 ,0x0000f201 , +0x80798179 ,0xd7610002 , +0x0000f202 ,0x80798179 , +0xd7610002 ,0x0000f203 , +0x80798179 ,0xd7610002 , +0x0000f204 ,0x80798179 , +0xd7610002 ,0x0000f205 , +0x80798179 ,0xd7610002 , +0x0000f206 ,0x80798179 , +0xd7610002 ,0x0000f207 , +0x80798179 ,0xd7610002 , +0x0000f208 ,0x80798179 , +0xd7610002 ,0x0000f209 , +0x80798179 ,0xd7610002 , +0x0000f20a ,0x80798179 , +0xd7610002 ,0x0000f20b , +0x80798179 ,0xbefe00ff , +0x0000ffff ,0x80767074 , +0x82778075 ,0xee0a4076 , +0x010c0000 ,0x00000000 , +0xbefe00c1 ,0x857d9973 , +0x8b7d817d ,0xbf06817d , +0xbfa20002 ,0xbeff0080 , +0xbfa00001 ,0xbeff00c1 , +0xb8fb4306 ,0x8b7bc17b , +0xbfa10042 ,0x8b7aff6d , +0x80000000 ,0xbfa1003f , +0x847b8a7b ,0xb8f03b05 , +0x80708170 ,0xbf0d9973 , +0xbfa20002 ,0x84708970 , +0xbfa00001 ,0x84708a70 , +0x8070ff70 ,0x00000200 , +0x8070ff70 ,0x00000200 , +0xd71f0000 ,0x000100c1 , +0xd7200000 ,0x000200c1 , +0x16000084 ,0x857d9973 , +0x8b7d817d ,0xbf06817d , +0xbefd0080 ,0xbfa20015 , +0xbe8300ff ,0x00000080 , +0xbf800000 ,0xbf800000 , +0xbf800000 ,0xd8d80000 , +0x01000000 ,0xbf8a0000 , +0x80767074 ,0x82778075 , +0xee0a4076 ,0x008c0000 , +0x00000000 ,0x807d037d , +0x80700370 ,0xd5250000 , +0x0001ff00 ,0x00000080 , +0xbf0a7b7d ,0xbfa2fff1 , +0xbfa00014 ,0xbe8300ff , +0x00000100 ,0xbf800000 , +0xbf800000 ,0xbf800000 , +0xd8d80000 ,0x01000000 , +0xbf8a0000 ,0x80767074 , +0x82778075 ,0xee0a4076 , +0x008c0000 ,0x00000000 , +0x807d037d ,0x80700370 , +0xd5250000 ,0x0001ff00 , +0x00000100 ,0xbf0a7b7d , +0xbfa2fff1 ,0xbefe00c1 , +0x857d9973 ,0x8b7d817d , +0xbf06817d ,0xbfa20004 , +0xbef000ff ,0x00000200 , +0xbeff0080 ,0xbfa00003 , +0xbef000ff ,0x00000400 , +0xbeff00c1 ,0xb8fb3b05 , +0x807b817b ,0x847b827b , +0x857d9973 ,0x8b7d817d , +0xbf06817d ,0xbfa2001b , +0xbefd0084 ,0xbf0a7b7d , +0xbfa10032 ,0x7e008700 , +0x7e028701 ,0x7e048702 , +0x7e068703 ,0x80767074 , +0x82778075 ,0xee0a4076 , +0x000c0000 ,0x00000000 , +0xee0a4076 ,0x008c0000 , +0x00008000 ,0xee0a4076 , +0x010c0000 ,0x00010000 , +0xee0a4076 ,0x018c0000 , +0x00018000 ,0x807d847d , +0x8070ff70 ,0x00000200 , +0xbf0a7b7d ,0xbfa2ffe9 , +0xbfa0001a ,0xbefd0084 , +0xbf0a7b7d ,0xbfa10017 , +0x7e008700 ,0x7e028701 , +0x7e048702 ,0x7e068703 , +0x80767074 ,0x82778075 , +0xee0a4076 ,0x000c0000 , +0x00000000 ,0xee0a4076 , +0x008c0000 ,0x00010000 , +0xee0a4076 ,0x010c0000 , +0x00020000 ,0xee0a4076 , +0x018c0000 ,0x00030000 , +0x807d847d ,0x8070ff70 , +0x00000400 ,0xbf0a7b7d , +0xbfa2ffe9 ,0xbfa00180 , +0xbef4007e ,0x8b75ff7f , +0x01ffffff ,0xbef1007f , +0xb8f20742 ,0x84729972 , +0x8b6eff7f ,0x04000000 , +0xbfa10044 ,0xbefe00c1 , +0x857d9972 ,0x8b7d817d , +0xbf06817d ,0xbfa20002 , +0xbeff0080 ,0xbfa00001 , +0xbeff00c1 ,0xb8ef4306 , +0x8b6fc16f ,0xbfa10039 , +0x846f8a6f ,0xb8f83b05 , +0x80788178 ,0xbf0d9972 , +0xbfa20002 ,0x84788978 , +0xbfa00001 ,0x84788a78 , +0x8078ff78 ,0x00000200 , +0x8078ff78 ,0x00000200 , +0x857d9972 ,0x8b7d817d , +0xbf06817d ,0xbefd0080 , +0xd71f0001 ,0x000100c1 , +0xd7200001 ,0x000202c1 , +0x30020282 ,0xbfa20012 , +0x80767874 ,0x82778075 , +0xee0a0076 ,0x000c0000 , +0x00000000 ,0xbf8a0000 , +0xd8340000 ,0x00000001 , +0xd5250001 ,0x0001ff01 , +0x00000080 ,0x807dff7d , +0x00000080 ,0x8078ff78 , +0x00000080 ,0xbf0a6f7d , +0xbfa2ffef ,0xbfa00011 , +0x80767874 ,0x82778075 , +0xee0a0076 ,0x000c0000 , +0x00000000 ,0xbf8a0000 , +0xd8340000 ,0x00000001 , +0xd5250001 ,0x0001ff01 , +0x00000100 ,0x807dff7d , +0x00000100 ,0x8078ff78 , +0x00000100 ,0xbf0a6f7d , +0xbfa2ffef ,0xbef80080 , +0xbefe00c1 ,0x857d9972 , +0x8b7d817d ,0xbf06817d , +0xbfa20002 ,0xbeff0080 , +0xbfa00001 ,0xbeff00c1 , +0xb8ef3b05 ,0x806f816f , +0x846f826f ,0x857d9972 , +0x8b7d817d ,0xbf06817d , +0xbfa2002c ,0xbeee0078 , +0x8078ff78 ,0x00000200 , +0xbefd0084 ,0x80767874 , +0x82778075 ,0xee0a0076 , +0x000c0000 ,0x00000000 , +0xee0a0076 ,0x000c0001 , +0x00008000 ,0xee0a0076 , +0x000c0002 ,0x00010000 , +0xee0a0076 ,0x000c0003 , +0x00018000 ,0xbf8a0000 , +0x7e008500 ,0x7e028501 , +0x7e048502 ,0x7e068503 , +0x807d847d ,0x8078ff78 , +0x00000200 ,0xbf0a6f7d , +0xbfa2ffe8 ,0x80766e74 , +0x82778075 ,0xee0a0076 , +0x000c0000 ,0x00000000 , +0xee0a0076 ,0x000c0001 , +0x00008000 ,0xee0a0076 , +0x000c0002 ,0x00010000 , +0xee0a0076 ,0x000c0003 , +0x00018000 ,0xbf8a0000 , +0xbfa0002d ,0xbeee0078 , +0x8078ff78 ,0x00000400 , +0xbefd0084 ,0xbf0a6f7d , +0xbfa10018 ,0x80767874 , +0x82778075 ,0xee0a0076 , +0x000c0000 ,0x00000000 , +0xee0a0076 ,0x000c0001 , +0x00010000 ,0xee0a0076 , +0x000c0002 ,0x00020000 , +0xee0a0076 ,0x000c0003 , +0x00030000 ,0xbf8a0000 , +0x7e008500 ,0x7e028501 , +0x7e048502 ,0x7e068503 , +0x807d847d ,0x8078ff78 , +0x00000400 ,0xbf0a6f7d , +0xbfa2ffe8 ,0x80766e74 , +0x82778075 ,0xee0a0076 , +0x000c0000 ,0x00000000 , +0xee0a0076 ,0x000c0001 , +0x00010000 ,0xee0a0076 , +0x000c0002 ,0x00020000 , +0xee0a0076 ,0x000c0003 , +0x00030000 ,0xbf8a0000 , +0xb8f83b05 ,0x80788178 , +0xbf0d9972 ,0xbfa20002 , +0x84788978 ,0xbfa00001 , +0x84788a78 ,0x8078ff78 , +0x00000200 ,0x80f8ff78 , +0x00000060 ,0x80767874 , +0x82778075 ,0xbefd00ff , +0x0000006c ,0xf460403b , +0xf8000000 ,0xbf8a0000 , +0x80fd847d ,0xbf800000 , +0xbe804300 ,0xbe824302 , +0x80f6a076 ,0x82f78077 , +0xf460603b ,0xf8000000 , +0xbf8a0000 ,0x80fd887d , +0xbf800000 ,0xbe804300 , +0xbe824302 ,0xbe844304 , +0xbe864306 ,0x80f6c076 , +0x82f78077 ,0xf460803b , +0xf8000000 ,0xbf8a0000 , +0x80fd907d ,0xbf800000 , +0xbe804300 ,0xbe824302 , +0xbe844304 ,0xbe864306 , +0xbe884308 ,0xbe8a430a , +0xbe8c430c ,0xbe8e430e , +0xbf06807d ,0xbfa1ffef , +0xb980f801 ,0x00000000 , +0xb8f83b05 ,0x80788178 , +0xbf0d9972 ,0xbfa20002 , +0x84788978 ,0xbfa00001 , +0x84788a78 ,0x8078ff78 , +0x00000200 ,0x80767874 , +0x82778075 ,0xbeff0071 , +0xf4601bfb ,0xf8000000 , +0xf4601b3b ,0xf8000004 , +0xf4601b7b ,0xf8000008 , +0xf4601c3b ,0xf800000c , +0xf4601c7b ,0xf8000010 , +0xf4601ebb ,0xf8000014 , +0xf4601efb ,0xf8000018 , +0xf4601e7b ,0xf800001c , +0xf4601cfb ,0xf8000020 , +0xf4601bbb ,0xf8000024 , +0xbf8a0000 ,0xb96ef814 , +0xf4601bbb ,0xf8000028 , +0xbf8a0000 ,0xb96ef815 , +0xf4601bbb ,0xf800002c , +0xbf8a0000 ,0xb96ef812 , +0xf4601bbb ,0xf8000030 , +0xbf8a0000 ,0xb96ef813 , +0x8b6eff7f ,0x04000000 , +0xbfa10022 ,0xf4601bbb , +0xf8000038 ,0xbf8a0000 , +0xbf0d806e ,0xbfa1001d , +0x856e906e ,0x8b6e6e6e , +0xbfa10003 ,0xbe804ec1 , +0x816ec16e ,0xbfa0fffb , +0xbef800ff ,0x00000080 , +0xbefd0081 ,0xf4601bbb , +0xf0000000 ,0xbfc70000 , +0x80788478 ,0x937eff6e , +0x00070004 ,0x847e907e , +0x8c7d7e7d ,0xbe80517d , +0x917dff7d ,0x007f0000 , +0x856e906e ,0x8b6e6e6e , +0xbfa10003 ,0xbe804e7d , +0x816ec16e ,0xbfa0fffb , +0x807d817d ,0xbf08907d , +0xbfa1ffec ,0xf4601bbb , +0xf800003c ,0xbfc70000 , +0xbf0d806e ,0xbfa1000c , +0xbf0d9a7f ,0xbfa10002 , +0xbf068180 ,0xbe804fc4 , +0xbf94fffc ,0xbfa10006 , +0x856e906e ,0x8b6e6e6e , +0xbfa10003 ,0xbe804ec3 , +0x816ec16e ,0xbfa0fffb , +0xbefd006f ,0xbefe0070 , +0xbeff0071 ,0xb979f822 , +0xb97b2011 ,0x857b867b , +0xb97b0191 ,0x857b827b , +0xb97bba11 ,0xb973f801 , +0xb8ee3b05 ,0x806e816e , +0xbf0d9972 ,0xbfa20002 , +0x846e896e ,0xbfa00001 , +0x846e8a6e ,0x806eff6e , +0x000001c0 ,0x806e746e , +0x826f8075 ,0xf4605c37 , +0xf8000010 ,0xf4605d37 , +0xf8000020 ,0xf4601e77 , +0xf8000034 ,0xbf8a0000 , +0x856e9677 ,0xb96e04a1 , +0x856e9577 ,0xb96e0421 , +0x856e8e77 ,0xb96e3021 , +0x8b6dff6d ,0x01ffffff , +0x8bfe7e7e ,0x8bea6a6a , +0xb97af804 ,0xb8eef802 , +0xbf0c8b6e ,0xbfa20003 , +0xbe804fc2 ,0xbf94fffe , +0xbfa10001 ,0xbe804ec4 , +0xbf94fffc ,0x857a897a , +0xb97a0244 ,0xbe804a6c , +0xb8eef802 ,0xbf0c8b6e , +0xbfa20003 ,0xbe804fc2 , +0xbf94fffe ,0xbfa10001 , +0xbe804ec4 ,0xbf94fffc , +0xbfb10000 ,0xbf9f0000 , +0xbf9f0000 ,0xbf9f0000 , +0xbf9f0000 ,0xbf9f0000 , +};
drivers/gpu/drm/amd/amdkfd/cwsr_trap_handler_gfx12.asm +451 -295
1,183 lines not on this page · raw message
drivers/gpu/drm/amd/amdkfd/kfd_device.c +6 -1
@@ -539,11 +539,16 @@ static void kfd_cwsr_init(struct kfd_dev *kfd)BUILD_BUG_ON (sizeof (cwsr_trap_gfx11_hex) >PAGE_SIZE ); kfd->cwsr_isa = cwsr_trap_gfx11_hex; kfd->cwsr_isa_size =sizeof (cwsr_trap_gfx11_hex); - }else { + }else if (KFD_GC_VERSION (kfd) <IP_VERSION (12 ,1 ,0 )) {BUILD_BUG_ON (sizeof (cwsr_trap_gfx12_hex) >KFD_CWSR_TMA_OFFSET ); kfd->cwsr_isa = cwsr_trap_gfx12_hex; kfd->cwsr_isa_size =sizeof (cwsr_trap_gfx12_hex); + }else { +BUILD_BUG_ON (sizeof (cwsr_trap_gfx12_1_0_hex) + >KFD_CWSR_TMA_OFFSET ); + kfd->cwsr_isa = cwsr_trap_gfx12_1_0_hex; + kfd->cwsr_isa_size =sizeof (cwsr_trap_gfx12_1_0_hex); } kfd->cwsr_enabled = true;
Signature · 1 line
2.52.0
Alex Deucher
maintainerPATCH 1/1 drm/amdgpu: reserve umf hole size at vram high end for gfx v12.1
In reply to Alex DeucherFrom: Le Ma <[email protected]>
This region is reserved by firmware thus carve it out in driver.
v2: set reserve size based on aid configuration.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +7 -1
@@ -1835,7 +1835,13 @@ static int amdgpu_ttm_reserve_tmr(struct amdgpu_device *adev) amdgpu_ip_version(adev, GC_HWIP, 0) == IP_VERSION(9, 4, 4) || amdgpu_ip_version(adev, GC_HWIP, 0) == IP_VERSION(9, 5, 0))) reserve_size =max (reserve_size, (uint32_t )280 <<20 ); - else if (!reserve_size) + else if (!adev->bios && + amdgpu_ip_version(adev, GC_HWIP, 0) == IP_VERSION(12, 1, 0)) { +if (hweight32 (adev->aid_mask) ==1 ) + reserve_size =max (reserve_size, (uint32_t )128 <<20 ); +else + reserve_size =max (reserve_size, (uint32_t )144 <<20 ); + } else if (!reserve_size) reserve_size =DISCOVERY_TMR_OFFSET ;if (mem_train_support) {
Signature · 1 line
2.52.0