Skip to contentSkip to conversation

omap_dss: correct chip[1] index in RFBI_READ/RFBI_STATUS

PATCH Applied Stefan Hajnoczi 3 participants 3 messages Jan 7, 2012 – Jan 12, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 omap_dss: correct chip[1] index in RFBI_READ/RFBI_STATUS

The RFBI_READ/RFBI_STATUS code incorrectly uses chip[0] when it should be using chip[1]. Andrzej Zaborowski <[email protected]> confirmed this bug since I don't know this code well.

---
 hw/omap_dss.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
hw/omap_dss.c +2 -2
index ede640b..86ed6ea 100644
@@ -793,7 +793,7 @@ static void omap_rfbi_write(void *opaque, target_phys_addr_t addr,
         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);
+            s->rfbi.rxbuf = s->rfbi.chip[1]->read(s->rfbi.chip[1]->opaque, 1);
         if (!-- s->rfbi.pixels)
             omap_rfbi_transfer_stop(s);
         break;
@@ -802,7 +802,7 @@ static void omap_rfbi_write(void *opaque, target_phys_addr_t addr,
         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);
+            s->rfbi.rxbuf = s->rfbi.chip[1]->read(s->rfbi.chip[1]->opaque, 0);
         if (!-- s->rfbi.pixels)
             omap_rfbi_transfer_stop(s);
         break;
Signature · 1 line
1.7.7.3
#2 lore raw
In reply to Stefan Hajnoczi
Quoted 9 lines · Stefan Hajnoczi

The RFBI_READ/RFBI_STATUS code incorrectly uses chip[0] when it should be using chip[1]. Andrzej Zaborowski <[email protected]> confirmed this bug since I don't know this code well.

---
 hw/omap_dss.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

Applied to the trivial patches tree:
https://github.com/stefanha/qemu/commits/trivial-patches

Stefan