vga: replace debug printf with trace points

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Laurent Vivier <lvivier@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: 1486561893-26470-1-git-send-email-kraxel@redhat.com
This commit is contained in:
Gerd Hoffmann 2017-02-08 14:51:32 +01:00
parent 5e8e3c4c75
commit cf7dabeebc
2 changed files with 10 additions and 23 deletions

View File

@ -119,3 +119,9 @@ qxl_set_client_capabilities_unsupported_by_revision(int qid, int revision) "%d r
qxl_render_blit(int32_t stride, int32_t left, int32_t right, int32_t top, int32_t bottom) "stride=%d [%d, %d, %d, %d]" qxl_render_blit(int32_t stride, int32_t left, int32_t right, int32_t top, int32_t bottom) "stride=%d [%d, %d, %d, %d]"
qxl_render_guest_primary_resized(int32_t width, int32_t height, int32_t stride, int32_t bytes_pp, int32_t bits_pp) "%dx%d, stride %d, bpp %d, depth %d" qxl_render_guest_primary_resized(int32_t width, int32_t height, int32_t stride, int32_t bytes_pp, int32_t bits_pp) "%dx%d, stride %d, bpp %d, depth %d"
qxl_render_update_area_done(void *cookie) "%p" qxl_render_update_area_done(void *cookie) "%p"
# hw/display/vga.c
vga_std_read_io(uint32_t addr, uint32_t val) "addr 0x%x, val 0x%x"
vga_std_write_io(uint32_t addr, uint32_t val) "addr 0x%x, val 0x%x"
vga_vbe_read(uint32_t index, uint32_t val) "index 0x%x, val 0x%x"
vga_vbe_write(uint32_t index, uint32_t val) "index 0x%x, val 0x%x"

View File

@ -34,12 +34,9 @@
#include "hw/xen/xen.h" #include "hw/xen/xen.h"
#include "trace.h" #include "trace.h"
//#define DEBUG_VGA
//#define DEBUG_VGA_MEM //#define DEBUG_VGA_MEM
//#define DEBUG_VGA_REG //#define DEBUG_VGA_REG
//#define DEBUG_BOCHS_VBE
/* 16 state changes per vertical frame @60 Hz */ /* 16 state changes per vertical frame @60 Hz */
#define VGA_TEXT_CURSOR_PERIOD_MS (1000 * 2 * 16 / 60) #define VGA_TEXT_CURSOR_PERIOD_MS (1000 * 2 * 16 / 60)
@ -428,9 +425,7 @@ uint32_t vga_ioport_read(void *opaque, uint32_t addr)
break; break;
} }
} }
#if defined(DEBUG_VGA) trace_vga_std_read_io(addr, val);
printf("VGA: read addr=0x%04x data=0x%02x\n", addr, val);
#endif
return val; return val;
} }
@ -443,9 +438,7 @@ void vga_ioport_write(void *opaque, uint32_t addr, uint32_t val)
if (vga_ioport_invalid(s, addr)) { if (vga_ioport_invalid(s, addr)) {
return; return;
} }
#ifdef DEBUG_VGA trace_vga_std_write_io(addr, val);
printf("VGA: write addr=0x%04x data=0x%02x\n", addr, val);
#endif
switch(addr) { switch(addr) {
case VGA_ATT_W: case VGA_ATT_W:
@ -733,9 +726,7 @@ uint32_t vbe_ioport_read_data(void *opaque, uint32_t addr)
} else { } else {
val = 0; val = 0;
} }
#ifdef DEBUG_BOCHS_VBE trace_vga_vbe_read(s->vbe_index, val);
printf("VBE: read index=0x%x val=0x%x\n", s->vbe_index, val);
#endif
return val; return val;
} }
@ -750,9 +741,7 @@ void vbe_ioport_write_data(void *opaque, uint32_t addr, uint32_t val)
VGACommonState *s = opaque; VGACommonState *s = opaque;
if (s->vbe_index <= VBE_DISPI_INDEX_NB) { if (s->vbe_index <= VBE_DISPI_INDEX_NB) {
#ifdef DEBUG_BOCHS_VBE trace_vga_vbe_write(s->vbe_index, val);
printf("VBE: write index=0x%x val=0x%x\n", s->vbe_index, val);
#endif
switch(s->vbe_index) { switch(s->vbe_index) {
case VBE_DISPI_INDEX_ID: case VBE_DISPI_INDEX_ID:
if (val == VBE_DISPI_ID0 || if (val == VBE_DISPI_ID0 ||
@ -1543,17 +1532,9 @@ static void vga_draw_graphic(VGACommonState *s, int full_update)
height, format, s->line_offset, height, format, s->line_offset,
s->vram_ptr + (s->start_addr * 4)); s->vram_ptr + (s->start_addr * 4));
dpy_gfx_replace_surface(s->con, surface); dpy_gfx_replace_surface(s->con, surface);
#ifdef DEBUG_VGA
printf("VGA: Using shared surface for depth=%d swap=%d\n",
depth, byteswap);
#endif
} else { } else {
qemu_console_resize(s->con, disp_width, height); qemu_console_resize(s->con, disp_width, height);
surface = qemu_console_surface(s->con); surface = qemu_console_surface(s->con);
#ifdef DEBUG_VGA
printf("VGA: Using shadow surface for depth=%d swap=%d\n",
depth, byteswap);
#endif
} }
s->last_scr_width = disp_width; s->last_scr_width = disp_width;
s->last_scr_height = height; s->last_scr_height = height;