Skip to content

Commit

Permalink
dma: dma channel null condition check
Browse files Browse the repository at this point in the history
dma channel null condition check for pipelines
without using any of the specified dma channels.

Signed-off-by: maruthi machani <[email protected]>
  • Loading branch information
maruthi machani authored and kv2019i committed Nov 15, 2023
1 parent 8862f88 commit f217130
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/schedule/dma_multi_chan_domain.c
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,10 @@ static int dma_multi_chan_domain_register(struct ll_schedule_domain *domain,
if (!pipe_task->registrable)
goto out;

for (i = 0; i < dma_domain->num_dma; ++i) {
for (j = 0; j < dmas[i].plat_data.channels; ++j) {
for (i = 0; i < dma_domain->num_dma ; ++i) {
if (dmas[i].chan == NULL)
continue;
for (j = 0; j < dmas[i].plat_data.channels ; ++j) {
/* channel not set as scheduling source */
if (!dma_is_scheduling_source(&dmas[i].chan[j]))
continue;
Expand Down Expand Up @@ -222,7 +224,9 @@ static int dma_multi_chan_domain_unregister(struct ll_schedule_domain *domain,
return 0;

for (i = 0; i < dma_domain->num_dma; ++i) {
for (j = 0; j < dmas[i].plat_data.channels; ++j) {
if (dmas[i].chan == NULL)
continue;
for (j = 0; j < dmas[i].plat_data.channels ; ++j) {
/* channel not set as scheduling source */
if (!dma_is_scheduling_source(&dmas[i].chan[j]))
continue;
Expand Down Expand Up @@ -280,6 +284,8 @@ static bool dma_multi_chan_domain_is_pending(struct ll_schedule_domain *domain,
int j;

for (i = 0; i < dma_domain->num_dma; ++i) {
if (dmas[i].chan == NULL)
continue;
for (j = 0; j < dmas[i].plat_data.channels; ++j) {
if (!*comp) {
status = dma_interrupt_legacy(&dmas[i].chan[j],
Expand Down

0 comments on commit f217130

Please sign in to comment.