Skip to content

Commit aaa41a2

Browse files
committed
dp: Disable DP task deadline recalculation from userspace DP thread
Disable DP tasks deadline recalculation from DP threads running in userspace. Recalculation requires information about other DP threads, which is not available from a DP thread operating in userspace. This is a temporary change until a better solution is found. Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
1 parent 6f6535b commit aaa41a2

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/schedule/zephyr_dp_schedule.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -405,10 +405,13 @@ static void dp_thread_fn(void *p1, void *p2, void *p3)
405405
(void)p2;
406406
(void)p3;
407407
struct task_dp_pdata *task_pdata = task->priv_data;
408+
struct scheduler_dp_data *dp_sch = NULL;
408409
unsigned int lock_key;
409410
enum task_state state;
410411
bool task_stop;
411-
struct scheduler_dp_data *dp_sch = scheduler_get_data(SOF_SCHEDULE_DP);
412+
413+
if (!(task->flags & K_USER))
414+
dp_sch = scheduler_get_data(SOF_SCHEDULE_DP);
412415

413416
do {
414417
/*
@@ -454,7 +457,8 @@ static void dp_thread_fn(void *p1, void *p2, void *p3)
454457
* TODO: it should be for all tasks, for all cores
455458
* currently its limited to current core only
456459
*/
457-
scheduler_dp_recalculate(dp_sch, false);
460+
if (dp_sch)
461+
scheduler_dp_recalculate(dp_sch, false);
458462

459463
scheduler_dp_unlock(lock_key);
460464
} while (!task_stop);

0 commit comments

Comments
 (0)