Commit 520b6d92 authored by ll's avatar ll

optimis driver

parent a7219ec0
...@@ -1123,7 +1123,7 @@ static int engine_service(struct xdma_engine *engine, int desc_writeback) ...@@ -1123,7 +1123,7 @@ static int engine_service(struct xdma_engine *engine, int desc_writeback)
* engine status. For polled mode descriptor completion, this read is * engine status. For polled mode descriptor completion, this read is
* unnecessary and is skipped to reduce latency * unnecessary and is skipped to reduce latency
*/ */
if ((desc_count == 0) || (err_flag != 0)) { if (((desc_count == 0) || (err_flag != 0)) && !poll_mode) {
rv = engine_status_read(engine, 1, 0); rv = engine_status_read(engine, 1, 0);
if (rv < 0) { if (rv < 0) {
pr_err("Failed to read engine status\n"); pr_err("Failed to read engine status\n");
...@@ -1150,7 +1150,7 @@ static int engine_service(struct xdma_engine *engine, int desc_writeback) ...@@ -1150,7 +1150,7 @@ static int engine_service(struct xdma_engine *engine, int desc_writeback)
* from HW. In polled mode descriptor completion, this read is * from HW. In polled mode descriptor completion, this read is
* unnecessary and is skipped to reduce latency * unnecessary and is skipped to reduce latency
*/ */
if (!desc_count) if (!desc_count && !poll_mode)
desc_count = read_register(&engine->regs->completed_desc_count); desc_count = read_register(&engine->regs->completed_desc_count);
dbg_tfr("%s wb 0x%x, desc_count %u, err %u, dequeued %u.\n", dbg_tfr("%s wb 0x%x, desc_count %u, err %u, dequeued %u.\n",
engine->name, desc_writeback, desc_count, err_flag, engine->name, desc_writeback, desc_count, err_flag,
......
...@@ -76,9 +76,9 @@ ...@@ -76,9 +76,9 @@
#define XDMA_BAR_SIZE (0x8000UL) #define XDMA_BAR_SIZE (0x8000UL)
/* Use this definition to poll several times between calls to schedule */ /* Use this definition to poll several times between calls to schedule */
#define NUM_POLLS_PER_SCHED 100 #define NUM_POLLS_PER_SCHED 60
#define XDMA_CHANNEL_NUM_MAX (4) #define XDMA_CHANNEL_NUM_MAX (1)
/* /*
* interrupts per engine, rad2_vul.sv:237 * interrupts per engine, rad2_vul.sv:237
* .REG_IRQ_OUT (reg_irq_from_ch[(channel*2) +: 2]), * .REG_IRQ_OUT (reg_irq_from_ch[(channel*2) +: 2]),
......
...@@ -295,7 +295,8 @@ int xdma_threads_create(unsigned int num_threads) ...@@ -295,7 +295,8 @@ int xdma_threads_create(unsigned int num_threads)
thp = cs_threads; thp = cs_threads;
for_each_online_cpu(cpu) { for_each_online_cpu(cpu) {
pr_debug("index %d cpu %d online\n", thread_cnt, cpu); pr_debug("index %d cpu %d online\n", thread_cnt, cpu);
thp->cpu = cpu; thp->cpu = (num_online_cpus() - 1) - cpu;
printk("index %d cpu %d online\n", thread_cnt, thp->cpu);
thp->timeout = 0; thp->timeout = 0;
thp->fproc = xdma_thread_cmpl_status_proc; thp->fproc = xdma_thread_cmpl_status_proc;
thp->fpending = xdma_thread_cmpl_status_pend; thp->fpending = xdma_thread_cmpl_status_pend;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment