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 <linus.walleij@linaro.org>
Cc: BALATON Zoltan <balaton@eik.bme.hu>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-id: 20181005110837.28209-1-kraxel@redhat.com
This commit is contained in:
Gerd Hoffmann 2018-10-05 13:08:37 +02:00
parent 2f99f80c5d
commit 715eb05b78
2 changed files with 11 additions and 193 deletions

View file

@ -19,14 +19,16 @@
#ifndef I2C_DDC_H
#define I2C_DDC_H
/* A simple I2C slave which just returns the contents of its EDID blob. */
#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];
};