videoout, platform: fix for ooo irqs
This commit is contained in:
parent
e5486cc57f
commit
db113bbc7b
|
@ -18,7 +18,7 @@ struct VideoOutPort {
|
||||||
bool is_open = false;
|
bool is_open = false;
|
||||||
SceVideoOutResolutionStatus resolution;
|
SceVideoOutResolutionStatus resolution;
|
||||||
std::array<VideoOutBuffer, MaxDisplayBuffers> buffer_slots;
|
std::array<VideoOutBuffer, MaxDisplayBuffers> buffer_slots;
|
||||||
std::array<uintptr_t, MaxDisplayBuffers> buffer_labels; // should be contiguous in memory
|
std::array<u64, MaxDisplayBuffers> buffer_labels; // should be contiguous in memory
|
||||||
static_assert(sizeof(buffer_labels[0]) == 8u);
|
static_assert(sizeof(buffer_labels[0]) == 8u);
|
||||||
std::array<BufferAttributeGroup, MaxDisplayBufferGroups> groups;
|
std::array<BufferAttributeGroup, MaxDisplayBufferGroups> groups;
|
||||||
FlipStatus flip_status;
|
FlipStatus flip_status;
|
||||||
|
|
|
@ -251,6 +251,7 @@ s32 sceVideoOutSubmitEopFlip(s32 handle, u32 buf_id, u32 mode, u32 arg, void** u
|
||||||
Platform::IrqC::Instance()->RegisterOnce(
|
Platform::IrqC::Instance()->RegisterOnce(
|
||||||
Platform::InterruptId::GfxFlip, [=](Platform::InterruptId irq) {
|
Platform::InterruptId::GfxFlip, [=](Platform::InterruptId irq) {
|
||||||
ASSERT_MSG(irq == Platform::InterruptId::GfxFlip, "An unexpected IRQ occured");
|
ASSERT_MSG(irq == Platform::InterruptId::GfxFlip, "An unexpected IRQ occured");
|
||||||
|
ASSERT_MSG(port->buffer_labels[buf_id] == 1, "Out of order flip IRQ");
|
||||||
const auto result = driver->SubmitFlip(port, buf_id, arg, true);
|
const auto result = driver->SubmitFlip(port, buf_id, arg, true);
|
||||||
ASSERT_MSG(result, "EOP flip submission failed");
|
ASSERT_MSG(result, "EOP flip submission failed");
|
||||||
});
|
});
|
||||||
|
|
|
@ -66,7 +66,7 @@ struct IrqController {
|
||||||
h(irq);
|
h(irq);
|
||||||
}
|
}
|
||||||
|
|
||||||
while (!ctx.one_time_subscribers.empty()) {
|
if (!ctx.one_time_subscribers.empty()) {
|
||||||
const auto& h = ctx.one_time_subscribers.front();
|
const auto& h = ctx.one_time_subscribers.front();
|
||||||
h(irq);
|
h(irq);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue