Skip to content

Commit 1afdc24

Browse files
committed
[cru] Ensure FIFO empty reporting follows first pushed Superpage
1 parent 0ef81f5 commit 1afdc24

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/Cru/CruDmaChannel.cxx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,8 @@ bool CruDmaChannel::pushSuperpage(Superpage superpage)
261261
auto busAddress = getBusOffsetAddress(superpage.getOffset());
262262
getBar()->pushSuperpageDescriptor(link.id, dmaPages, busAddress);
263263

264+
mFirstSPPushed = true;
265+
264266
return true;
265267
}
266268

@@ -379,6 +381,10 @@ int32_t CruDmaChannel::getDroppedPackets()
379381

380382
bool CruDmaChannel::areSuperpageFifosHealthy()
381383
{
384+
if (mDmaState != DmaState::STARTED || !mFirstSPPushed) {
385+
return true;
386+
}
387+
382388
bool ok = true;
383389
static std::unordered_map<int, uint32_t> counters;
384390

src/Cru/CruDmaChannel.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,8 @@ class CruDmaChannel final : public DmaChannelPdaBase
159159

160160
/// DMA page size, as specified when opening the channel
161161
const size_t mDmaPageSize;
162+
163+
bool mFirstSPPushed = false;
162164
};
163165

164166
} // namespace roc

0 commit comments

Comments
 (0)