Skip to content

Commit dcc8fa8

Browse files
dlibemanogabbay
authored andcommitted
accel/habanalabs: use binning info when handling razwi
When receiving sei interrupt from tpc or decoder, we need to check the binning mask because if the engine is binned, the razwi info won't be in the router of the binned engine, instead will be in the router of the substitute engine. Signed-off-by: Dani Liberman <[email protected]> Reviewed-by: Oded Gabbay <[email protected]> Signed-off-by: Oded Gabbay <[email protected]>
1 parent 583f12a commit dcc8fa8

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

drivers/accel/habanalabs/gaudi2/gaudi2.c

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8040,14 +8040,21 @@ static void gaudi2_ack_module_razwi_event_handler(struct hl_device *hdev,
80408040
u8 module_sub_idx, u64 *event_mask)
80418041
{
80428042
bool via_sft = false;
8043-
u32 hbw_rtr_id, lbw_rtr_id, dcore_id, dcore_rtr_id, eng_id;
8043+
u32 hbw_rtr_id, lbw_rtr_id, dcore_id, dcore_rtr_id, eng_id, binned_idx;
80448044
u64 hbw_rtr_mstr_if_base_addr, lbw_rtr_mstr_if_base_addr;
80458045
u32 hbw_shrd_aw = 0, hbw_shrd_ar = 0;
80468046
u32 lbw_shrd_aw = 0, lbw_shrd_ar = 0;
80478047
char initiator_name[64];
80488048

80498049
switch (module) {
80508050
case RAZWI_TPC:
8051+
sprintf(initiator_name, "TPC_%u", module_idx);
8052+
if (hdev->tpc_binning) {
8053+
binned_idx = __ffs(hdev->tpc_binning);
8054+
if (binned_idx == module_idx)
8055+
module_idx = TPC_ID_DCORE0_TPC6;
8056+
}
8057+
80518058
hbw_rtr_id = gaudi2_tpc_initiator_hbw_rtr_id[module_idx];
80528059

80538060
if (hl_is_fw_sw_ver_below(hdev, 1, 9) &&
@@ -8056,7 +8063,6 @@ static void gaudi2_ack_module_razwi_event_handler(struct hl_device *hdev,
80568063
lbw_rtr_id = DCORE0_RTR0;
80578064
else
80588065
lbw_rtr_id = gaudi2_tpc_initiator_lbw_rtr_id[module_idx];
8059-
sprintf(initiator_name, "TPC_%u", module_idx);
80608066
break;
80618067
case RAZWI_MME:
80628068
sprintf(initiator_name, "MME_%u", module_idx);
@@ -8115,9 +8121,14 @@ static void gaudi2_ack_module_razwi_event_handler(struct hl_device *hdev,
81158121
sprintf(initiator_name, "NIC_%u", module_idx);
81168122
break;
81178123
case RAZWI_DEC:
8124+
sprintf(initiator_name, "DEC_%u", module_idx);
8125+
if (hdev->decoder_binning) {
8126+
binned_idx = __ffs(hdev->decoder_binning);
8127+
if (binned_idx == module_idx)
8128+
module_idx = DEC_ID_PCIE_VDEC1;
8129+
}
81188130
hbw_rtr_id = gaudi2_dec_initiator_hbw_rtr_id[module_idx];
81198131
lbw_rtr_id = gaudi2_dec_initiator_lbw_rtr_id[module_idx];
8120-
sprintf(initiator_name, "DEC_%u", module_idx);
81218132
break;
81228133
case RAZWI_ROT:
81238134
hbw_rtr_id = gaudi2_rot_initiator_hbw_rtr_id[module_idx];

0 commit comments

Comments
 (0)