dma: dma channel null condition check

dma channel null condition check for pipelines
without using any of the specified dma channels.

Signed-off-by: maruthi machani <maruthi.machani@amd.corp-partner.google.com>
This commit is contained in:
maruthi machani 2023-11-06 15:29:12 +05:30 committed by Kai Vehmanen
parent 8862f8863a
commit f217130a53
1 changed files with 9 additions and 3 deletions

View File

@ -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;
@ -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;
@ -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],