The problem is that the kthread from submit workqueue aquires the queue_mutex
and blocks the kthread from interrupt workqueue. But the kthread from interrupt
workqueue is the one that should update the used_luts variable (on which the
kthread from submit workqueue keeps polling), but it doesn't have a chance to
do it (because it is blocked by mutex), even if the LUT complete interrupts are
triggered. So the fix is, after the polling to release the mutex so that the
kthread from interrupt workqueue can process the LUT complete interrupts and
update the used_luts variable accordingly.
Signed-off-by: Bogdan Chircu <bogdan-petru.chircu-mare@nxp.com>
Signed-off-by: Robby Cai <robby.cai@nxp.com>
(cherry picked from commit
bcaea8983ca3864bc5df5dc90b49ffe2d0fadf29)
pxp_clear_wb_work_func(fb_data);
used_luts &= ~luts_complete;
fb_data->luts_complete &= ~luts_complete;
+ mutex_unlock(&fb_data->queue_mutex);
+ msleep(10);
+ mutex_lock(&fb_data->queue_mutex);
}
used_luts |= 0x1;