Skip to content

Commit 4392623

Browse files
workaround for CR-1141322 (#7088) (#7092)
Signed-off-by: Min Ma <min.ma@amd.com> Signed-off-by: Min Ma <min.ma@amd.com> Co-authored-by: Min Ma <min.ma@amd.com> (cherry picked from commit 763797f) Co-authored-by: Min Ma <min.ma@xilinx.com>
1 parent 76727a7 commit 4392623

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

src/runtime_src/core/common/drv/include/xrt_cu.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,8 @@ struct xrt_cu {
367367
struct timer_list timer;
368368
atomic_t tick;
369369
u32 start_tick;
370-
370+
u32 force_intr;
371+
371372
struct xrt_cu_stats stats;
372373
/**
373374
* @funcs:

src/runtime_src/core/common/drv/xrt_cu.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ static inline int process_rq(struct xrt_cu *xcu)
385385
xrt_cu_start(xcu);
386386
if (xcu->thread) {
387387
xcu->poll_count = 0;
388-
if (xcu->interrupt_used)
388+
if (!xcu->force_intr && xcu->interrupt_used)
389389
xrt_cu_switch_to_poll(xcu);
390390
}
391391
set_xcmd_timestamp(xcmd, KDS_RUNNING);
@@ -551,6 +551,8 @@ int xrt_cu_intr_thread(void *data)
551551
xcu->interrupt_used = 0;
552552
xcu_info(xcu, "CU[%d] start", xcu->info.cu_idx);
553553
mod_timer(&xcu->timer, jiffies + CU_TIMER);
554+
if (xcu->force_intr)
555+
xrt_cu_switch_to_interrupt(xcu);
554556
while (!xcu->stop) {
555557
/* Make sure to submit as many commands as possible.
556558
* This is why we call continue here. This is important to make

src/runtime_src/core/edge/drm/zocl/cu.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -431,6 +431,8 @@ static int cu_probe(struct platform_device *pdev)
431431

432432
zcu->base.user_manage_irq = user_manage_irq;
433433
zcu->base.configure_irq = configure_irq;
434+
/* This is a workaround for DPU kernel */
435+
zcu->base.force_intr = 1;
434436

435437
zocl_info(&pdev->dev, "CU[%d] created", info->inst_idx);
436438
return 0;

0 commit comments

Comments
 (0)