diff --git a/src/runtime_src/core/common/drv/include/xrt_cu.h b/src/runtime_src/core/common/drv/include/xrt_cu.h index 5413f239753..b476d706285 100644 --- a/src/runtime_src/core/common/drv/include/xrt_cu.h +++ b/src/runtime_src/core/common/drv/include/xrt_cu.h @@ -367,7 +367,8 @@ struct xrt_cu { struct timer_list timer; atomic_t tick; u32 start_tick; - + u32 force_intr; + struct xrt_cu_stats stats; /** * @funcs: diff --git a/src/runtime_src/core/common/drv/xrt_cu.c b/src/runtime_src/core/common/drv/xrt_cu.c index d7741965d59..0a4d9ce6bbe 100644 --- a/src/runtime_src/core/common/drv/xrt_cu.c +++ b/src/runtime_src/core/common/drv/xrt_cu.c @@ -385,7 +385,7 @@ static inline int process_rq(struct xrt_cu *xcu) xrt_cu_start(xcu); if (xcu->thread) { xcu->poll_count = 0; - if (xcu->interrupt_used) + if (!xcu->force_intr && xcu->interrupt_used) xrt_cu_switch_to_poll(xcu); } set_xcmd_timestamp(xcmd, KDS_RUNNING); @@ -551,6 +551,8 @@ int xrt_cu_intr_thread(void *data) xcu->interrupt_used = 0; xcu_info(xcu, "CU[%d] start", xcu->info.cu_idx); mod_timer(&xcu->timer, jiffies + CU_TIMER); + if (xcu->force_intr) + xrt_cu_switch_to_interrupt(xcu); while (!xcu->stop) { /* Make sure to submit as many commands as possible. * This is why we call continue here. This is important to make diff --git a/src/runtime_src/core/edge/drm/zocl/cu.c b/src/runtime_src/core/edge/drm/zocl/cu.c index eb2ba71a8af..e2c171e73d6 100644 --- a/src/runtime_src/core/edge/drm/zocl/cu.c +++ b/src/runtime_src/core/edge/drm/zocl/cu.c @@ -431,6 +431,8 @@ static int cu_probe(struct platform_device *pdev) zcu->base.user_manage_irq = user_manage_irq; zcu->base.configure_irq = configure_irq; + /* This is a workaround for DPU kernel */ + zcu->base.force_intr = 1; zocl_info(&pdev->dev, "CU[%d] created", info->inst_idx); return 0;