@@ -538,9 +538,14 @@ static void ati_mm_write(void *opaque, hwaddr addr,
case GPIO_MONID ... GPIO_MONID + 3:
/* FIXME What does Radeon have here? */
if (s->dev_id == PCI_DEVICE_ID_ATI_RAGE128_PF) {
- /* Rage128p accesses DDC used to get EDID on these pins */
ati_reg_write_offs(&s->regs.gpio_monid,
addr - GPIO_MONID, data, size);
+ /*
+ * Rage128p accesses DDC used to get EDID via these bits.
+ * Only touch i2c when write overlaps 3rd byte because some
+ * drivers access this reg via multiple partial writes and
+ * without this spurious bits would be sent.
+ */
if ((s->regs.gpio_monid & BIT(25)) &&
addr <= GPIO_MONID + 2 && addr + size > GPIO_MONID + 2) {
s->regs.gpio_monid = ati_i2c(s->bbi2c, s->regs.gpio_monid, 1);
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu> --- hw/display/ati.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)