On Fri, 15 Mar 2019, Gerd Hoffmann wrote:
On Thu, Mar 14, 2019 at 08:11:21PM +0100, BALATON Zoltan wrote:
On Thu, 14 Mar 2019, Gerd Hoffmann wrote:
gets radeonfb going for me, on top of your i2c patches.
---
@@ -512,15 +531,15 @@ static void ati_mm_write(void *opaque, hwaddr addr,
if (s->dev_id == PCI_DEVICE_ID_ATI_RAGE128_PF) {
break;
}
- s->regs.gpio_vga_ddc = data & 0xf000f;
- if (data & BIT(17)) {
- s->regs.gpio_monid |= !!(data & BIT(1)) << 9;
- bitbang_i2c_set(s->bbi2c, BITBANG_I2C_SCL, (data & BIT(1)) != 0);
- }
- if (data & BIT(16)) {
- s->regs.gpio_monid |= bitbang_i2c_set(s->bbi2c, BITBANG_I2C_SDA,
- data & BIT(0)) << 8;
+#if 0
+ s->regs.gpio_vga_ddc = ati_i2c(s->bbi2c, data);
+#endif
Thanks, I'll try and merge this. What's this #if 0 line?
Avoid the monitor show up on both vga ...
Regards,
BALATON Zoltan
+ break;
+ case GPIO_DVI_DDC:
+ if (s->dev_id == PCI_DEVICE_ID_ATI_RAGE128_PF) {
+ break;
}
+ s->regs.gpio_dvi_ddc = ati_i2c(s->bbi2c, data);
... and dvi.
A more correct model would probably be to create two i2c busses for
that, then hook up the ddc to one of them (possibly depending on a
config option).
Isn't it enough to only emulate the DVI port DDC then? I've sent an
updated patch as v2 that also cleans up the bitbang_i2c.h header
inclusion. (I've checked that Linux first checks DVI then VGA so my
original patch may have also worked if the copy paste error is fixed and
updated the right reg bits instead of gpio_monid. But let's go with the
default and use a DVI port, then we likely not need VGA as we don't have
a mointor there.)
Regards,
BALATON Zoltan