aboutsummaryrefslogtreecommitdiff
path: root/hw/display/cg3.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2020-05-28 18:13:20 +0100
committerPeter Maydell <peter.maydell@linaro.org>2020-05-28 18:13:20 +0100
commitb8bee16e94df0fcd03bdad9969c30894418b0e6e (patch)
tree6c5a4dbd206e612005e756975392440540a5968a /hw/display/cg3.c
parenta20ab81d22300cca80325c284f21eefee99aa740 (diff)
parentfa0013a1bc5f6011a1017e0e655740403e5555d9 (diff)
Merge remote-tracking branch 'remotes/kraxel/tags/vga-20200528-pull-request' into staging
hw/dispaly/sm501: bugfixes, add sanity checks. hw/display: use tracepoints, misc cleanups. # gpg: Signature made Thu 28 May 2020 13:35:32 BST # gpg: using RSA key 4CB6D8EED3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" [full] # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" [full] # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" [full] # Primary key fingerprint: A032 8CFF B93A 17A7 9901 FE7D 4CB6 D8EE D3E8 7138 * remotes/kraxel/tags/vga-20200528-pull-request: (21 commits) sm501: Remove obsolete changelog and todo comment sm501: Optimize small overlapping blits sm501: Replace hand written implementation with pixman where possible sm501: Clean up local variables in sm501_2d_operation sm501: Use BIT(x) macro to shorten constant sm501: Shorten long variable names in sm501_2d_operation sm501: Convert printf + abort to qemu_log_mask hw/display/pxa2xx_lcd: Replace printf() call by qemu_log_mask() hw/display/omap_dss: Replace fprintf() call by qemu_log_mask(LOG_UNIMP) hw/display/exynos4210_fimd: Use qemu_log_mask(GUEST_ERROR) hw/display/vmware_vga: Let the PCI device own its I/O MemoryRegion hw/display/vmware_vga: Replace printf() calls by qemu_log_mask(ERROR) hw/display/xlnx_dp: Replace disabled DPRINTF() by error_report() hw/display/dpcd: Convert debug printf()s to trace events hw/display/dpcd: Fix memory region size hw/display/cirrus_vga: Convert debug printf() to trace event hw/display/cirrus_vga: Use qemu_log_mask(ERROR) instead of debug printf hw/display/cirrus_vga: Use qemu_log_mask(UNIMP) instead of debug printf hw/display/cirrus_vga: Convert debug printf() to trace event hw/display/cg3: Convert debug printf()s to trace events ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/display/cg3.c')
-rw-r--r--hw/display/cg3.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/hw/display/cg3.c b/hw/display/cg3.c
index f7f1c199ce..7cbe6e56ff 100644
--- a/hw/display/cg3.c
+++ b/hw/display/cg3.c
@@ -35,6 +35,7 @@
#include "hw/qdev-properties.h"
#include "qemu/log.h"
#include "qemu/module.h"
+#include "trace.h"
/* Change to 1 to enable debugging */
#define DEBUG_CG3 0
@@ -63,12 +64,6 @@
#define CG3_VRAM_SIZE 0x100000
#define CG3_VRAM_OFFSET 0x800000
-#define DPRINTF(fmt, ...) do { \
- if (DEBUG_CG3) { \
- printf("CG3: " fmt , ## __VA_ARGS__); \
- } \
-} while (0)
-
#define TYPE_CG3 "cgthree"
#define CG3(obj) OBJECT_CHECK(CG3State, (obj), TYPE_CG3)
@@ -195,7 +190,8 @@ static uint64_t cg3_reg_read(void *opaque, hwaddr addr, unsigned size)
val = 0;
break;
}
- DPRINTF("read %02x from reg %" HWADDR_PRIx "\n", val, addr);
+ trace_cg3_read(addr, val, size);
+
return val;
}
@@ -206,9 +202,7 @@ static void cg3_reg_write(void *opaque, hwaddr addr, uint64_t val,
uint8_t regval;
int i;
- DPRINTF("write %" PRIx64 " to reg %" HWADDR_PRIx " size %d\n",
- val, addr, size);
-
+ trace_cg3_write(addr, val, size);
switch (addr) {
case CG3_REG_BT458_ADDR:
s->dac_index = val;