All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alistair Francis <alistair23@gmail.com>
To: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
Cc: Peter Maydell <peter.maydell@linaro.org>,
	QEMU Trivial <qemu-trivial@nongnu.org>,
	Alistair Francis <alistair@alistair23.me>,
	Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>,
	"qemu-devel@nongnu.org Developers" <qemu-devel@nongnu.org>,
	Igor Mitsyanko <i.mitsyanko@gmail.com>,
	qemu-arm <qemu-arm@nongnu.org>, Gerd Hoffmann <kraxel@redhat.com>,
	"Edgar E. Iglesias" <edgar.iglesias@gmail.com>
Subject: Re: [PATCH 12/14] hw/display/exynos4210_fimd: Use qemu_log_mask(GUEST_ERROR)
Date: Tue, 26 May 2020 10:27:01 -0700	[thread overview]
Message-ID: <CAKmqyKNH7F2+9FCFza9FYFyj=xycYxjBmr2tSwdkXZSk5T8vrQ@mail.gmail.com> (raw)
In-Reply-To: <20200526062252.19852-13-f4bug@amsat.org>

On Mon, May 25, 2020 at 11:34 PM Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
>
> Replace DPRINT_ERROR() by qemu_log_mask(GUEST_ERROR).
>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

Reviewed-by: Alistair Francis <alistair.francis@wdc.com>

Alistair

> ---
>  hw/display/exynos4210_fimd.c | 46 +++++++++++++++++++++++-------------
>  1 file changed, 29 insertions(+), 17 deletions(-)
>
> diff --git a/hw/display/exynos4210_fimd.c b/hw/display/exynos4210_fimd.c
> index 1c0266ce9f..4b7286b7c9 100644
> --- a/hw/display/exynos4210_fimd.c
> +++ b/hw/display/exynos4210_fimd.c
> @@ -31,6 +31,7 @@
>  #include "ui/pixel_ops.h"
>  #include "qemu/bswap.h"
>  #include "qemu/module.h"
> +#include "qemu/log.h"
>
>  /* Debug messages configuration */
>  #define EXYNOS4210_FIMD_DEBUG              0
> @@ -39,20 +40,15 @@
>  #if EXYNOS4210_FIMD_DEBUG == 0
>      #define DPRINT_L1(fmt, args...)       do { } while (0)
>      #define DPRINT_L2(fmt, args...)       do { } while (0)
> -    #define DPRINT_ERROR(fmt, args...)    do { } while (0)
>  #elif EXYNOS4210_FIMD_DEBUG == 1
>      #define DPRINT_L1(fmt, args...) \
>          do {fprintf(stderr, "QEMU FIMD: "fmt, ## args); } while (0)
>      #define DPRINT_L2(fmt, args...)       do { } while (0)
> -    #define DPRINT_ERROR(fmt, args...)  \
> -        do {fprintf(stderr, "QEMU FIMD ERROR: "fmt, ## args); } while (0)
>  #else
>      #define DPRINT_L1(fmt, args...) \
>          do {fprintf(stderr, "QEMU FIMD: "fmt, ## args); } while (0)
>      #define DPRINT_L2(fmt, args...) \
>          do {fprintf(stderr, "QEMU FIMD: "fmt, ## args); } while (0)
> -    #define DPRINT_ERROR(fmt, args...)  \
> -        do {fprintf(stderr, "QEMU FIMD ERROR: "fmt, ## args); } while (0)
>  #endif
>
>  #if EXYNOS4210_FIMD_MODE_TRACE == 0
> @@ -1108,7 +1104,7 @@ static inline int fimd_get_buffer_id(Exynos4210fimdWindow *w)
>      case FIMD_WINCON_BUF2_STAT:
>          return 2;
>      default:
> -        DPRINT_ERROR("Non-existent buffer index\n");
> +        qemu_log_mask(LOG_GUEST_ERROR, "FIMD: Non-existent buffer index\n");
>          return 0;
>      }
>  }
> @@ -1160,20 +1156,24 @@ static void fimd_update_memory_section(Exynos4210fimdState *s, unsigned win)
>
>      if (int128_get64(w->mem_section.size) != w->fb_len ||
>              !memory_region_is_ram(w->mem_section.mr)) {
> -        DPRINT_ERROR("Failed to find window %u framebuffer region\n", win);
> +        qemu_log_mask(LOG_GUEST_ERROR,
> +                      "FIMD: Failed to find window %u framebuffer region\n",
> +                      win);
>          goto error_return;
>      }
>
>      w->host_fb_addr = cpu_physical_memory_map(fb_start_addr, &fb_mapped_len,
>                                                false);
>      if (!w->host_fb_addr) {
> -        DPRINT_ERROR("Failed to map window %u framebuffer\n", win);
> +        qemu_log_mask(LOG_GUEST_ERROR,
> +                      "FIMD: Failed to map window %u framebuffer\n", win);
>          goto error_return;
>      }
>
>      if (fb_mapped_len != w->fb_len) {
> -        DPRINT_ERROR("Window %u mapped framebuffer length is less then "
> -                "expected\n", win);
> +        qemu_log_mask(LOG_GUEST_ERROR,
> +                      "FIMD: Window %u mapped framebuffer length is less than "
> +                      "expected\n", win);
>          cpu_physical_memory_unmap(w->host_fb_addr, fb_mapped_len, 0, 0);
>          goto error_return;
>      }
> @@ -1490,7 +1490,9 @@ static void exynos4210_fimd_write(void *opaque, hwaddr offset,
>              break;
>          case 3:
>              if (w != 1 && w != 2) {
> -                DPRINT_ERROR("Bad write offset 0x%08x\n", offset);
> +                qemu_log_mask(LOG_GUEST_ERROR,
> +                              "FIMD: Bad write offset 0x%08"HWADDR_PRIx"\n",
> +                              offset);
>                  return;
>              }
>              s->window[w].osdsize = val;
> @@ -1624,7 +1626,9 @@ static void exynos4210_fimd_write(void *opaque, hwaddr offset,
>          break;
>      case FIMD_VIDW0ADD0_B2 ... FIMD_VIDW4ADD0_B2:
>          if (offset & 0x0004) {
> -            DPRINT_ERROR("bad write offset 0x%08x\n", offset);
> +            qemu_log_mask(LOG_GUEST_ERROR,
> +                          "FIMD: bad write offset 0x%08"HWADDR_PRIx"\n",
> +                          offset);
>              break;
>          }
>          w = (offset - FIMD_VIDW0ADD0_B2) >> 3;
> @@ -1638,14 +1642,18 @@ static void exynos4210_fimd_write(void *opaque, hwaddr offset,
>          break;
>      case FIMD_SHD_ADD0_START ... FIMD_SHD_ADD0_END:
>          if (offset & 0x0004) {
> -            DPRINT_ERROR("bad write offset 0x%08x\n", offset);
> +            qemu_log_mask(LOG_GUEST_ERROR,
> +                          "FIMD: bad write offset 0x%08"HWADDR_PRIx"\n",
> +                          offset);
>              break;
>          }
>          s->window[(offset - FIMD_SHD_ADD0_START) >> 3].shadow_buf_start = val;
>          break;
>      case FIMD_SHD_ADD1_START ... FIMD_SHD_ADD1_END:
>          if (offset & 0x0004) {
> -            DPRINT_ERROR("bad write offset 0x%08x\n", offset);
> +            qemu_log_mask(LOG_GUEST_ERROR,
> +                          "FIMD: bad write offset 0x%08"HWADDR_PRIx"\n",
> +                          offset);
>              break;
>          }
>          s->window[(offset - FIMD_SHD_ADD1_START) >> 3].shadow_buf_end = val;
> @@ -1665,7 +1673,8 @@ static void exynos4210_fimd_write(void *opaque, hwaddr offset,
>          s->window[w].palette[i] = val;
>          break;
>      default:
> -        DPRINT_ERROR("bad write offset 0x%08x\n", offset);
> +        qemu_log_mask(LOG_GUEST_ERROR,
> +                      "FIMD: bad write offset 0x%08"HWADDR_PRIx"\n", offset);
>          break;
>      }
>  }
> @@ -1715,7 +1724,9 @@ static uint64_t exynos4210_fimd_read(void *opaque, hwaddr offset,
>              break;
>          case 3:
>              if (w != 1 && w != 2) {
> -                DPRINT_ERROR("bad read offset 0x%08x\n", offset);
> +                qemu_log_mask(LOG_GUEST_ERROR,
> +                              "FIMD: bad read offset 0x%08"HWADDR_PRIx"\n",
> +                              offset);
>                  return 0xBAADBAAD;
>              }
>              ret = s->window[w].osdsize;
> @@ -1809,7 +1820,8 @@ static uint64_t exynos4210_fimd_read(void *opaque, hwaddr offset,
>          return s->window[w].palette[i];
>      }
>
> -    DPRINT_ERROR("bad read offset 0x%08x\n", offset);
> +    qemu_log_mask(LOG_GUEST_ERROR,
> +                  "FIMD: bad read offset 0x%08"HWADDR_PRIx"\n", offset);
>      return 0xBAADBAAD;
>  }
>
> --
> 2.21.3
>
>


  reply	other threads:[~2020-05-26 17:37 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-26  6:22 [PATCH 00/14] hw/display: Omnibus cleanups Philippe Mathieu-Daudé
2020-05-26  6:22 ` [PATCH 01/14] hw/display/edid: Add missing 'qdev-properties.h' header Philippe Mathieu-Daudé
2020-05-26 16:40   ` Alistair Francis
2020-05-26  6:22 ` [PATCH 02/14] hw/display/cg3: Convert debug printf()s to trace events Philippe Mathieu-Daudé
2020-05-26 16:41   ` Alistair Francis
2020-05-26  6:22 ` [PATCH 03/14] hw/display/cirrus_vga: Convert debug printf() to trace event Philippe Mathieu-Daudé
2020-05-26 16:47   ` Alistair Francis
2020-05-26  6:22 ` [PATCH 04/14] hw/display/cirrus_vga: Use qemu_log_mask(UNIMP) instead of debug printf Philippe Mathieu-Daudé
2020-05-26 16:42   ` Alistair Francis
2020-05-26  6:22 ` [PATCH 05/14] hw/display/cirrus_vga: Use qemu_log_mask(ERROR) " Philippe Mathieu-Daudé
2020-05-26 16:44   ` Alistair Francis
2020-05-26  6:22 ` [PATCH 06/14] hw/display/cirrus_vga: Convert debug printf() to trace event Philippe Mathieu-Daudé
2020-05-26 16:46   ` Alistair Francis
2020-05-26  6:22 ` [PATCH 07/14] hw/display/dpcd: Fix memory region size Philippe Mathieu-Daudé
2020-05-26 17:22   ` Alistair Francis
2020-05-26  6:22 ` [PATCH 08/14] hw/display/dpcd: Convert debug printf()s to trace events Philippe Mathieu-Daudé
2020-05-26 17:23   ` Alistair Francis
2020-05-26  6:22 ` [PATCH 09/14] hw/display/xlnx_dp: Replace disabled DPRINTF() by error_report() Philippe Mathieu-Daudé
2020-05-26  9:47   ` Edgar E. Iglesias
2020-05-26 17:24   ` Alistair Francis
2020-05-26  6:22 ` [PATCH 10/14] hw/display/vmware_vga: Replace printf() calls by qemu_log_mask(ERROR) Philippe Mathieu-Daudé
2020-05-26 17:25   ` Alistair Francis
2020-05-26  6:22 ` [PATCH 11/14] hw/display/vmware_vga: Let the PCI device own its I/O MemoryRegion Philippe Mathieu-Daudé
2020-05-26  8:01   ` Gerd Hoffmann
2020-05-26  8:16     ` Philippe Mathieu-Daudé
2020-05-26 10:47       ` Gerd Hoffmann
2020-05-26  6:22 ` [PATCH 12/14] hw/display/exynos4210_fimd: Use qemu_log_mask(GUEST_ERROR) Philippe Mathieu-Daudé
2020-05-26 17:27   ` Alistair Francis [this message]
2020-05-26  6:22 ` [PATCH 13/14] hw/display/omap_dss: Replace fprintf() call by qemu_log_mask(LOG_UNIMP) Philippe Mathieu-Daudé
2020-05-26 17:27   ` Alistair Francis
2020-05-26  6:22 ` [PATCH 14/14] hw/display/pxa2xx_lcd: Replace printf() call by qemu_log_mask() Philippe Mathieu-Daudé
2020-05-26 17:28   ` Alistair Francis
2020-05-26  8:02 ` [PATCH 00/14] hw/display: Omnibus cleanups Gerd Hoffmann
2020-05-26  9:04 ` no-reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAKmqyKNH7F2+9FCFza9FYFyj=xycYxjBmr2tSwdkXZSk5T8vrQ@mail.gmail.com' \
    --to=alistair23@gmail.com \
    --cc=alistair@alistair23.me \
    --cc=edgar.iglesias@gmail.com \
    --cc=f4bug@amsat.org \
    --cc=i.mitsyanko@gmail.com \
    --cc=kraxel@redhat.com \
    --cc=mark.cave-ayland@ilande.co.uk \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.