# HG changeset patch # User Paul Boddie # Date 1496523028 -7200 # Node ID 2d185cb3e4373abfe8f6b002e43635b10158b6dd # Parent b106107349679a1bf2805d3592138a89157a7573 Disable the line channel only when its completion is being handled. diff -r b10610734967 -r 2d185cb3e437 vga.S --- a/vga.S Sat Jun 03 22:04:36 2017 +0200 +++ b/vga.S Sat Jun 03 22:50:28 2017 +0200 @@ -876,12 +876,6 @@ la $s1, vfp_active - /* Disable the line channel. */ - - la $v0, DCH0ECON - li $v1, (1 << 4) - sw $v1, CLR($v0) - _visible_active_ret: jr $ra nop @@ -892,6 +886,23 @@ visible_update_address: + /* Test for the last visible line. */ + + la $v0, vfp_active + bne $s1, $v0, _visible_update_address + nop + + /* Disable the line channel. */ + + la $v0, DCH0ECON + li $v1, (1 << 4) + sw $v1, CLR($v0) + + j _visible_update_ret + nop + +_visible_update_address: + /* Update the line data address if the line counter (referring to the next line) is even.