Skip to content

Commit

Permalink
workaround for CR-1141322 (#7088) (#7092)
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
chvamshi-xilinx and mamin506 authored Oct 7, 2022
1 parent 76727a7 commit 4392623
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/runtime_src/core/common/drv/include/xrt_cu.h
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 3 additions & 1 deletion src/runtime_src/core/common/drv/xrt_cu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions src/runtime_src/core/edge/drm/zocl/cu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 4392623

Please sign in to comment.