Commit 2efed8d
committed
fixup! dmaengine: dw-axi-dmac: Add DMA channel selection
Simplify and improve the channel selection scheme by removing the
concept of excluded channels. Requesting more channels than are
available is a configuration error, but otherwise it is better to get
a non-ideal channel than no channel at all.
Give each channel a score based on how well it matches the client's
requirements, then attempt to claim them in order of decreasing score.
A channel which possesses a required flag is scored more highly than one
that doesn't, but not having a trait that isn't wanted also contributes
to a channel's score, just less so.
By walking the list until the end, even channels that don't match at all
will be allocated if there is enough demand.
Signed-off-by: Phil Elwell <[email protected]>1 parent 06a89f0 commit 2efed8d
File tree
2 files changed
+54
-29
lines changed- drivers/dma/dw-axi-dmac
2 files changed
+54
-29
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1499 | 1499 | | |
1500 | 1500 | | |
1501 | 1501 | | |
| 1502 | + | |
| 1503 | + | |
1502 | 1504 | | |
1503 | | - | |
1504 | | - | |
1505 | 1505 | | |
| 1506 | + | |
| 1507 | + | |
| 1508 | + | |
| 1509 | + | |
1506 | 1510 | | |
1507 | 1511 | | |
1508 | | - | |
1509 | | - | |
1510 | | - | |
1511 | | - | |
1512 | | - | |
1513 | | - | |
1514 | | - | |
1515 | | - | |
1516 | | - | |
1517 | | - | |
1518 | | - | |
| 1512 | + | |
| 1513 | + | |
1519 | 1514 | | |
1520 | 1515 | | |
1521 | 1516 | | |
1522 | 1517 | | |
1523 | | - | |
1524 | | - | |
1525 | | - | |
| 1518 | + | |
| 1519 | + | |
| 1520 | + | |
| 1521 | + | |
| 1522 | + | |
| 1523 | + | |
| 1524 | + | |
| 1525 | + | |
| 1526 | + | |
| 1527 | + | |
| 1528 | + | |
| 1529 | + | |
| 1530 | + | |
| 1531 | + | |
| 1532 | + | |
| 1533 | + | |
| 1534 | + | |
| 1535 | + | |
| 1536 | + | |
| 1537 | + | |
| 1538 | + | |
| 1539 | + | |
| 1540 | + | |
| 1541 | + | |
| 1542 | + | |
| 1543 | + | |
| 1544 | + | |
| 1545 | + | |
| 1546 | + | |
| 1547 | + | |
| 1548 | + | |
| 1549 | + | |
| 1550 | + | |
| 1551 | + | |
| 1552 | + | |
| 1553 | + | |
1526 | 1554 | | |
1527 | 1555 | | |
1528 | 1556 | | |
| 1557 | + | |
1529 | 1558 | | |
1530 | 1559 | | |
1531 | 1560 | | |
| |||
1607 | 1636 | | |
1608 | 1637 | | |
1609 | 1638 | | |
1610 | | - | |
1611 | | - | |
1612 | | - | |
1613 | | - | |
1614 | | - | |
1615 | | - | |
1616 | | - | |
1617 | | - | |
1618 | | - | |
1619 | | - | |
1620 | | - | |
| 1639 | + | |
| 1640 | + | |
| 1641 | + | |
| 1642 | + | |
| 1643 | + | |
| 1644 | + | |
| 1645 | + | |
| 1646 | + | |
1621 | 1647 | | |
1622 | 1648 | | |
1623 | 1649 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
62 | | - | |
| 61 | + | |
63 | 62 | | |
64 | 63 | | |
65 | 64 | | |
| |||
0 commit comments