Skip to content

Commit 25a12de

Browse files
softwareckikv2019i
authored andcommitted
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 73e0624 commit 25a12de

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

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)