Message ID | 20231106081541.53688-5-laurent@vivier.eu |
---|---|
State | New |
Headers | show |
Series | [PULL,1/4] macfb: don't clear interrupts when writing to DAFB_RESET | expand |
diff --git a/hw/display/macfb.c b/hw/display/macfb.c index 4a1c75d5720f..d61541ccb5d5 100644 --- a/hw/display/macfb.c +++ b/hw/display/macfb.c @@ -537,6 +537,11 @@ static uint64_t macfb_ctrl_read(void *opaque, case DAFB_MODE_SENSE: val = macfb_sense_read(s); break; + case DAFB_LUT ... DAFB_LUT + 3: + val = s->color_palette[s->palette_current]; + s->palette_current = (s->palette_current + 1) % + ARRAY_SIZE(s->color_palette); + break; default: if (addr < MACFB_CTRL_TOPADDR) { val = s->regs[addr >> 2];