qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Incorrect hw/omap_dss.c:chip[] index for RFBI_READ and RFBI


From: Stefan Hajnoczi
Subject: [Qemu-devel] Incorrect hw/omap_dss.c:chip[] index for RFBI_READ and RFBI_STATUS?
Date: Fri, 6 Jan 2012 16:55:11 +0000

Is the following code correct in hw/omap_dss.c:

case 0x58:  /* RFBI_READ */
    if ((s->rfbi.control & (1 << 2)) && s->rfbi.chip[0])
        s->rfbi.rxbuf = s->rfbi.chip[0]->read(s->rfbi.chip[0]->opaque, 1);
    else if ((s->rfbi.control & (1 << 3)) && s->rfbi.chip[1])
        s->rfbi.rxbuf = s->rfbi.chip[0]->read(s->rfbi.chip[0]->opaque, 1);
    if (!-- s->rfbi.pixels)
        omap_rfbi_transfer_stop(s);
    break;

case 0x5c:  /* RFBI_STATUS */
    if ((s->rfbi.control & (1 << 2)) && s->rfbi.chip[0])
        s->rfbi.rxbuf = s->rfbi.chip[0]->read(s->rfbi.chip[0]->opaque, 0);
    else if ((s->rfbi.control & (1 << 3)) && s->rfbi.chip[1])
        s->rfbi.rxbuf = s->rfbi.chip[0]->read(s->rfbi.chip[0]->opaque, 0);
    if (!-- s->rfbi.pixels)
        omap_rfbi_transfer_stop(s);
    break;

It checks chip[1] in the "else if" statement.  But notice it actually
operates on chip[0].

Is this intentional or should it use chip[1]?

Reported-by: Dr David Alan Gilbert <address@hidden>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]