Skip to contentSkip to conversation

i2c: switch ddc to use the new edid generator

PATCH In review Gerd Hoffmann 2 participants 2 messages Oct 5, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 i2c: switch ddc to use the new edid generator

This also makes the default display resolution configurable, via xres and yres properties. The default is 1024x768.

The old code had a hard-coded resolution of 1600x1200.

Cc Linus Walleij <[email protected]>
Cc BALATON Zoltan <[email protected]>
---
 include/hw/i2c/i2c-ddc.h |   4 +-
 hw/i2c/i2c-ddc.c         | 200 ++---------------------------------------------
 2 files changed, 11 insertions(+), 193 deletions(-)
include/hw/i2c/i2c-ddc.h +3 -1
index d9b5f33f58..c29443c5af 100644
@@ -19,14 +19,16 @@
 #ifndef I2C_DDC_H
 #define I2C_DDC_H
 
+#include "hw/display/edid.h"
+
 /* A simple I2C slave which just returns the contents of its EDID blob. */
-
 struct I2CDDCState {
     /*< private >*/
     I2CSlave i2c;
     /*< public >*/
     bool firstbyte;
     uint8_t reg;
+    qemu_edid_info edid_info;
     uint8_t edid_blob[128];
 };
 
hw/i2c/i2c-ddc.c +8 -192

224 lines not on this page · raw message

Signature · 1 line
2.9.3
#1 lore raw
Quoted 5 lines · Gerd Hoffmann

This also makes the default display resolution configurable, via xres and yres properties. The default is 1024x768.

The old code had a hard-coded resolution of 1600x1200.

Quoted 7 lines
Cc Linus Walleij <[email protected]>
Cc BALATON Zoltan <[email protected]>
---
 include/hw/i2c/i2c-ddc.h |   4 +-
 hw/i2c/i2c-ddc.c         | 200 ++---------------------------------------------
 2 files changed, 11 insertions(+), 193 deletions(-)

Nice diffstat :-)

Technically this is a migration break potentially if the guest was halfway through reading the EDID data, but I think we can live with that for the boards it affects (vexpress, sam460ex).

thanks
-- PYMM