Skip to content

ati: Correct VBL status and interrupt handling - #208

Merged
dingusdev merged 2 commits into
dingusdev:masterfrom
mihaip:upstream-ati-vbl
Aug 12, 2026
Merged

ati: Correct VBL status and interrupt handling#208
dingusdev merged 2 commits into
dingusdev:masterfrom
mihaip:upstream-ati-vbl

Conversation

@mihaip

@mihaip mihaip commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Correct two issues with ATI vertical blank handling:

  • Ensure the live VBL status bit is cleared when vertical blank ends.
  • Keep PCI interrupts asserted based on enabled pending events, rather than tying them directly to the physical VBL interval.

This improves Mac OS X 10.4 Tiger booting on the iMac G3. The ATI driver can complete more of its display initialization, allowing the guest to progress past the apparent "Waiting for IFC" hang and into WindowServer startup.

A separate CPU timing fix is still needed for loginwindow to connect before WindowServer's timeout.

See commit messages for details.

mihaip added 2 commits August 11, 2026 21:43
insert_bits expects its final argument to be the field width, but both ATI
VBL callbacks passed the current VBL state. When VBL ended, that meant
using zero as the width, so the update was a no-op. After the first vertical
blank began, the ATI_CRTC_VBLANK status bit was never cleared, confusing
guest code that polls the live VBL state.
More accurately model the VBL interrupt behavior of ATI chips. When VBL
begins, set the interrupt-pending bits and derive the PCI IRQ from each
pending bit and its matching enable bit. Keep the pending state and PCI IRQ
asserted until the guest driver acknowledges the event, even if VBL has
already ended.

The interrupt may therefore be asserted for less or more time than the
physical VBL interval, depending on when the guest acknowledges it.

This allows the driver to acknowledge the interrupt and resume other work
while VBL may still be active. Previously the PCI IRQ followed the entire
VBL interval, so it could remain asserted after the pending event had been
acknowledged.

Track the PCI IRQ output level and notify the interrupt controller only when
that level changes.
@dingusdev
dingusdev merged commit bb16a5d into dingusdev:master Aug 12, 2026
7 checks passed
@mihaip
mihaip deleted the upstream-ati-vbl branch August 13, 2026 06:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants