vi: Handle (non-)interlaced modes better.

I accidentally flipped the logic for a bit; if the LSB of
VI_V_SYNC_REG is clear, then interlaced mode is enabled and
vise-versa.
This commit is contained in:
Tyler J. Stachecki 2016-10-18 23:14:22 -04:00
parent 4564751193
commit 6f6f7698e7

View file

@ -50,10 +50,8 @@ int read_vi_regs(void *opaque, uint32_t address, uint32_t *word) {
// Interlaced fields should get the current field number.
// Non-interlaced modes should always get a constant field.
if (vi->regs[VI_V_SYNC_REG] & 0x1)
if (!(vi->regs[VI_V_SYNC_REG] & 0x1))
vi->regs[VI_CURRENT_REG] |= vi->field;
else
vi->regs[VI_CURRENT_REG] |= 1;
}
*word = vi->regs[reg];