*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "qemu/log.h"
+#include "qemu/module.h"
#include "hw/display/xlnx_dp.h"
#ifndef DEBUG_DP
if (DEBUG_DP) { \
qemu_log("xlnx_dp: " fmt , ## __VA_ARGS__); \
} \
-} while (0);
+} while (0)
/*
* Register offset for DP.
case AV_BUF_STC_SNAPSHOT1:
case AV_BUF_HCOUNT_VCOUNT_INT0:
case AV_BUF_HCOUNT_VCOUNT_INT1:
- qemu_log_mask(LOG_UNIMP, "avbufm: unimplmented");
+ qemu_log_mask(LOG_UNIMP, "avbufm: unimplemented register 0x%04"
+ PRIx64 "\n",
+ offset << 2);
break;
default:
s->avbufm_registers[offset] = value;
/*
* XXX: We might want to update only what changed.
*/
- dpy_gfx_update(s->console, 0, 0, surface_width(s->g_plane.surface),
- surface_height(s->g_plane.surface));
+ dpy_gfx_update_full(s->console);
}
static const GraphicHwOps xlnx_dp_gfx_ops = {
object_property_add_link(obj, "dpdma", TYPE_XLNX_DPDMA,
(Object **) &s->dpdma,
xlnx_dp_set_dpdma,
- OBJ_PROP_LINK_UNREF_ON_RELEASE,
+ OBJ_PROP_LINK_STRONG,
&error_abort);
/*
/*
* Initialize DPCD and EDID..
*/
- s->dpcd = DPCD(aux_create_slave(s->aux_bus, "dpcd", 0x00000));
+ s->dpcd = DPCD(aux_create_slave(s->aux_bus, "dpcd"));
+ object_property_add_child(OBJECT(s), "dpcd", OBJECT(s->dpcd), NULL);
+
s->edid = I2CDDC(qdev_create(BUS(aux_get_i2c_bus(s->aux_bus)), "i2c-ddc"));
i2c_set_slave_address(I2C_SLAVE(s->edid), 0x50);
+ object_property_add_child(OBJECT(s), "edid", OBJECT(s->edid), NULL);
fifo8_create(&s->rx_fifo, 16);
fifo8_create(&s->tx_fifo, 16);
DisplaySurface *surface;
struct audsettings as;
+ qdev_init_nofail(DEVICE(s->dpcd));
+ aux_map_slave(AUX_SLAVE(s->dpcd), 0x0000);
+
s->console = graphic_console_init(dev, 0, &xlnx_dp_gfx_ops, s);
surface = qemu_console_surface(s->console);
xlnx_dpdma_set_host_data_location(s->dpdma, DP_GRAPHIC_DMA_CHANNEL,
as.freq = 44100;
as.nchannels = 2;
- as.fmt = AUD_FMT_S16;
+ as.fmt = AUDIO_FORMAT_S16;
as.endianness = 0;
AUD_register_card("xlnx_dp.audio", &s->aud_card);