aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <f4bug@amsat.org>2020-05-26 08:22:46 +0200
committerGerd Hoffmann <kraxel@redhat.com>2020-05-28 11:38:57 +0200
commiteeb1168032a1f6dfc7eb5897c3bf4e53fdc28b98 (patch)
tree59047756778dc4ed61ea8961f1ebae2e9a5ee1f5 /hw
parent91e7fd3ae5a6fcd270f8d38fd5771033a806abce (diff)
downloadqemu-eeb1168032a1f6dfc7eb5897c3bf4e53fdc28b98.zip
qemu-eeb1168032a1f6dfc7eb5897c3bf4e53fdc28b98.tar.gz
qemu-eeb1168032a1f6dfc7eb5897c3bf4e53fdc28b98.tar.bz2
hw/display/dpcd: Convert debug printf()s to trace events
Convert DPRINTF() to trace events and remove ifdef'ry. Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Message-id: 20200526062252.19852-9-f4bug@amsat.org Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/display/dpcd.c16
-rw-r--r--hw/display/trace-events4
2 files changed, 7 insertions, 13 deletions
diff --git a/hw/display/dpcd.c b/hw/display/dpcd.c
index 0c1b7b3..6446365 100644
--- a/hw/display/dpcd.c
+++ b/hw/display/dpcd.c
@@ -32,16 +32,7 @@
#include "hw/misc/auxbus.h"
#include "migration/vmstate.h"
#include "hw/display/dpcd.h"
-
-#ifndef DEBUG_DPCD
-#define DEBUG_DPCD 0
-#endif
-
-#define DPRINTF(fmt, ...) do { \
- if (DEBUG_DPCD) { \
- qemu_log("dpcd: " fmt, ## __VA_ARGS__); \
- } \
-} while (0)
+#include "trace.h"
#define DPCD_READABLE_AREA 0x600
@@ -70,8 +61,8 @@ static uint64_t dpcd_read(void *opaque, hwaddr offset, unsigned size)
offset);
ret = 0;
}
+ trace_dpcd_read(offset, ret);
- DPRINTF("read 0x%" PRIX8 " @0x%" HWADDR_PRIX "\n", ret, offset);
return ret;
}
@@ -80,8 +71,7 @@ static void dpcd_write(void *opaque, hwaddr offset, uint64_t value,
{
DPCDState *e = DPCD(opaque);
- DPRINTF("write 0x%" PRIX8 " @0x%" HWADDR_PRIX "\n", (uint8_t)value, offset);
-
+ trace_dpcd_write(offset, value);
if (offset < DPCD_READABLE_AREA) {
e->dpcd_info[offset] = value;
} else {
diff --git a/hw/display/trace-events b/hw/display/trace-events
index bb089a5..72d4c98 100644
--- a/hw/display/trace-events
+++ b/hw/display/trace-events
@@ -157,3 +157,7 @@ artist_draw_line(unsigned int start_x, unsigned int start_y, unsigned int end_x,
# cg3.c
cg3_read(uint32_t addr, uint32_t val, unsigned size) "read addr:0x%06"PRIx32" val:0x%08"PRIx32" size:%u"
cg3_write(uint32_t addr, uint32_t val, unsigned size) "write addr:0x%06"PRIx32" val:0x%08"PRIx32" size:%u"
+
+# dpcd.c
+dpcd_read(uint32_t addr, uint8_t val) "read addr:0x%"PRIx32" val:0x%02x"
+dpcd_write(uint32_t addr, uint8_t val) "write addr:0x%"PRIx32" val:0x%02x"