All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] hw/display/xlnx_dp: Fix memory region size, improve logging
@ 2020-05-25  3:44 Philippe Mathieu-Daudé
  2020-05-25  3:44 ` [PATCH 1/4] hw/misc/auxbus: Use qemu_log_mask(UNIMP) instead of debug printf Philippe Mathieu-Daudé
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-05-25  3:44 UTC (permalink / raw)
  To: qemu-devel
  Cc: Peter Maydell, qemu-trivial, Alistair Francis,
	Philippe Mathieu-Daudé,
	qemu-arm, Edgar E. Iglesias

A collection of cleanup patches written while fuzzing
the Xilinx Display Port device.

Philippe Mathieu-Daudé (4):
  hw/misc/auxbus: Use qemu_log_mask(UNIMP) instead of debug printf
  hw/display/dpcd: Fix memory region size
  hw/display/dpcd: Convert debug printf()s to trace events
  hw/display/xlnx_dp: Replace disabled DPRINTF() by error_report()

 hw/display/dpcd.c       | 20 +++++---------------
 hw/display/xlnx_dp.c    | 14 ++++++++------
 hw/misc/auxbus.c        |  2 +-
 hw/display/trace-events |  4 ++++
 4 files changed, 18 insertions(+), 22 deletions(-)

-- 
2.21.3



^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 1/4] hw/misc/auxbus: Use qemu_log_mask(UNIMP) instead of debug printf
  2020-05-25  3:44 [PATCH 0/4] hw/display/xlnx_dp: Fix memory region size, improve logging Philippe Mathieu-Daudé
@ 2020-05-25  3:44 ` Philippe Mathieu-Daudé
  2020-05-26 16:17   ` Alistair Francis
  2020-05-25  3:44 ` [PATCH 2/4] hw/display/dpcd: Fix memory region size Philippe Mathieu-Daudé
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 9+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-05-25  3:44 UTC (permalink / raw)
  To: qemu-devel
  Cc: Peter Maydell, qemu-trivial, Alistair Francis,
	Philippe Mathieu-Daudé,
	qemu-arm, Edgar E. Iglesias

Convert the deprecated DPRINTF() call by qemu_log_mask(LOG_UNIMP).

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 hw/misc/auxbus.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/misc/auxbus.c b/hw/misc/auxbus.c
index f8e7b97971..06aabf20c5 100644
--- a/hw/misc/auxbus.c
+++ b/hw/misc/auxbus.c
@@ -196,7 +196,7 @@ AUXReply aux_request(AUXBus *bus, AUXCommand cmd, uint32_t address,
         }
         break;
     default:
-        DPRINTF("Not implemented!\n");
+        qemu_log_mask(LOG_UNIMP, "AUX cmd=%u not implemented\n", cmd);
         return AUX_NACK;
     }
 
-- 
2.21.3



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 2/4] hw/display/dpcd: Fix memory region size
  2020-05-25  3:44 [PATCH 0/4] hw/display/xlnx_dp: Fix memory region size, improve logging Philippe Mathieu-Daudé
  2020-05-25  3:44 ` [PATCH 1/4] hw/misc/auxbus: Use qemu_log_mask(UNIMP) instead of debug printf Philippe Mathieu-Daudé
@ 2020-05-25  3:44 ` Philippe Mathieu-Daudé
  2020-05-26 16:38   ` Alistair Francis
  2020-05-25  3:44 ` [PATCH 3/4] hw/display/dpcd: Convert debug printf()s to trace events Philippe Mathieu-Daudé
  2020-05-25  3:44 ` [PATCH 4/4] hw/display/xlnx_dp: Replace disabled DPRINTF() by error_report() Philippe Mathieu-Daudé
  3 siblings, 1 reply; 9+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-05-25  3:44 UTC (permalink / raw)
  To: qemu-devel
  Cc: Peter Maydell, qemu-trivial, Alistair Francis,
	Philippe Mathieu-Daudé,
	qemu-arm, Edgar E. Iglesias

The memory region size is 512K.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 hw/display/dpcd.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/display/dpcd.c b/hw/display/dpcd.c
index 170545c605..0c1b7b35fb 100644
--- a/hw/display/dpcd.c
+++ b/hw/display/dpcd.c
@@ -1,5 +1,5 @@
 /*
- * dpcd.c
+ * Xilinx Display Port Control Data
  *
  *  Copyright (C) 2015 : GreenSocs Ltd
  *      http://www.greensocs.com/ , email: info@greensocs.com
@@ -137,7 +137,7 @@ static void dpcd_init(Object *obj)
 {
     DPCDState *s = DPCD(obj);
 
-    memory_region_init_io(&s->iomem, obj, &aux_ops, s, TYPE_DPCD, 0x7FFFF);
+    memory_region_init_io(&s->iomem, obj, &aux_ops, s, TYPE_DPCD, 0x80000);
     aux_init_mmio(AUX_SLAVE(obj), &s->iomem);
 }
 
-- 
2.21.3



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 3/4] hw/display/dpcd: Convert debug printf()s to trace events
  2020-05-25  3:44 [PATCH 0/4] hw/display/xlnx_dp: Fix memory region size, improve logging Philippe Mathieu-Daudé
  2020-05-25  3:44 ` [PATCH 1/4] hw/misc/auxbus: Use qemu_log_mask(UNIMP) instead of debug printf Philippe Mathieu-Daudé
  2020-05-25  3:44 ` [PATCH 2/4] hw/display/dpcd: Fix memory region size Philippe Mathieu-Daudé
@ 2020-05-25  3:44 ` Philippe Mathieu-Daudé
  2020-05-26 16:39   ` Alistair Francis
  2020-05-25  3:44 ` [PATCH 4/4] hw/display/xlnx_dp: Replace disabled DPRINTF() by error_report() Philippe Mathieu-Daudé
  3 siblings, 1 reply; 9+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-05-25  3:44 UTC (permalink / raw)
  To: qemu-devel
  Cc: Peter Maydell, qemu-trivial, Alistair Francis,
	Philippe Mathieu-Daudé,
	qemu-arm, Edgar E. Iglesias

Convert DPRINTF() to trace events and remove ifdef'ry.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 hw/display/dpcd.c       | 16 +++-------------
 hw/display/trace-events |  4 ++++
 2 files changed, 7 insertions(+), 13 deletions(-)

diff --git a/hw/display/dpcd.c b/hw/display/dpcd.c
index 0c1b7b35fb..64463654a1 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 e6e22bef88..00543f1601 100644
--- a/hw/display/trace-events
+++ b/hw/display/trace-events
@@ -151,3 +151,7 @@ artist_vram_write(unsigned int size, uint64_t addr, uint64_t val) "%u 0x%"PRIx64
 artist_fill_window(unsigned int start_x, unsigned int start_y, unsigned int width, unsigned int height, uint32_t op, uint32_t ctlpln) "start=%ux%u length=%ux%u op=0x%08x ctlpln=0x%08x"
 artist_block_move(unsigned int start_x, unsigned int start_y, unsigned int dest_x, unsigned int dest_y, unsigned int width, unsigned int height) "source %ux%u -> dest %ux%u size %ux%u"
 artist_draw_line(unsigned int start_x, unsigned int start_y, unsigned int end_x, unsigned int end_y) "%ux%u %ux%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"
-- 
2.21.3



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 4/4] hw/display/xlnx_dp: Replace disabled DPRINTF() by error_report()
  2020-05-25  3:44 [PATCH 0/4] hw/display/xlnx_dp: Fix memory region size, improve logging Philippe Mathieu-Daudé
                   ` (2 preceding siblings ...)
  2020-05-25  3:44 ` [PATCH 3/4] hw/display/dpcd: Convert debug printf()s to trace events Philippe Mathieu-Daudé
@ 2020-05-25  3:44 ` Philippe Mathieu-Daudé
  2020-05-26 16:40   ` Alistair Francis
  3 siblings, 1 reply; 9+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-05-25  3:44 UTC (permalink / raw)
  To: qemu-devel
  Cc: Peter Maydell, qemu-trivial, Alistair Francis,
	Philippe Mathieu-Daudé,
	qemu-arm, Edgar E. Iglesias

DPRINTF() calls are disabled by default, so when unexpected
data is used, the whole process abort without information.

Display a bit of information with error_report() before crashing.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 hw/display/xlnx_dp.c | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/hw/display/xlnx_dp.c b/hw/display/xlnx_dp.c
index 3e5fb44e06..8d940cd8d1 100644
--- a/hw/display/xlnx_dp.c
+++ b/hw/display/xlnx_dp.c
@@ -1,5 +1,5 @@
 /*
- * xlnx_dp.c
+ * Xilinx Display Port
  *
  *  Copyright (C) 2015 : GreenSocs Ltd
  *      http://www.greensocs.com/ , email: info@greensocs.com
@@ -24,6 +24,7 @@
 
 #include "qemu/osdep.h"
 #include "qapi/error.h"
+#include "qemu/error-report.h"
 #include "qemu/log.h"
 #include "qemu/module.h"
 #include "hw/display/xlnx_dp.h"
@@ -465,7 +466,7 @@ static uint8_t xlnx_dp_aux_pop_tx_fifo(XlnxDPState *s)
     uint8_t ret;
 
     if (fifo8_is_empty(&s->tx_fifo)) {
-        DPRINTF("tx_fifo underflow..\n");
+        error_report("%s: TX_FIFO underflow", __func__);
         abort();
     }
     ret = fifo8_pop(&s->tx_fifo);
@@ -525,6 +526,7 @@ static void xlnx_dp_aux_set_command(XlnxDPState *s, uint32_t value)
         qemu_log_mask(LOG_UNIMP, "xlnx_dp: Write i2c status not implemented\n");
         break;
     default:
+        error_report("%s: invalid command: %u", __func__, cmd);
         abort();
     }
 
@@ -631,8 +633,8 @@ static void xlnx_dp_change_graphic_fmt(XlnxDPState *s)
         s->g_plane.format = PIXMAN_b8g8r8;
         break;
     default:
-        DPRINTF("error: unsupported graphic format %u.\n",
-                s->avbufm_registers[AV_BUF_FORMAT] & DP_GRAPHIC_MASK);
+        error_report("%s: unsupported graphic format %u", __func__,
+                     s->avbufm_registers[AV_BUF_FORMAT] & DP_GRAPHIC_MASK);
         abort();
     }
 
@@ -647,8 +649,8 @@ static void xlnx_dp_change_graphic_fmt(XlnxDPState *s)
         s->v_plane.format = PIXMAN_x8b8g8r8;
         break;
     default:
-        DPRINTF("error: unsupported video format %u.\n",
-                s->avbufm_registers[AV_BUF_FORMAT] & DP_NL_VID_FMT_MASK);
+        error_report("%s: unsupported video format %u", __func__,
+                     s->avbufm_registers[AV_BUF_FORMAT] & DP_NL_VID_FMT_MASK);
         abort();
     }
 
-- 
2.21.3



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/4] hw/misc/auxbus: Use qemu_log_mask(UNIMP) instead of debug printf
  2020-05-25  3:44 ` [PATCH 1/4] hw/misc/auxbus: Use qemu_log_mask(UNIMP) instead of debug printf Philippe Mathieu-Daudé
@ 2020-05-26 16:17   ` Alistair Francis
  0 siblings, 0 replies; 9+ messages in thread
From: Alistair Francis @ 2020-05-26 16:17 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Peter Maydell, QEMU Trivial, Alistair Francis,
	qemu-devel@nongnu.org Developers, qemu-arm, Edgar E. Iglesias

On Sun, May 24, 2020 at 8:46 PM Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
>
> Convert the deprecated DPRINTF() call by qemu_log_mask(LOG_UNIMP).
>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

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

Alistair

> ---
>  hw/misc/auxbus.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/misc/auxbus.c b/hw/misc/auxbus.c
> index f8e7b97971..06aabf20c5 100644
> --- a/hw/misc/auxbus.c
> +++ b/hw/misc/auxbus.c
> @@ -196,7 +196,7 @@ AUXReply aux_request(AUXBus *bus, AUXCommand cmd, uint32_t address,
>          }
>          break;
>      default:
> -        DPRINTF("Not implemented!\n");
> +        qemu_log_mask(LOG_UNIMP, "AUX cmd=%u not implemented\n", cmd);
>          return AUX_NACK;
>      }
>
> --
> 2.21.3
>
>


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 2/4] hw/display/dpcd: Fix memory region size
  2020-05-25  3:44 ` [PATCH 2/4] hw/display/dpcd: Fix memory region size Philippe Mathieu-Daudé
@ 2020-05-26 16:38   ` Alistair Francis
  0 siblings, 0 replies; 9+ messages in thread
From: Alistair Francis @ 2020-05-26 16:38 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Peter Maydell, QEMU Trivial, Alistair Francis,
	qemu-devel@nongnu.org Developers, qemu-arm, Edgar E. Iglesias

On Sun, May 24, 2020 at 8:48 PM Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
>
> The memory region size is 512K.
>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

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

Alistair

> ---
>  hw/display/dpcd.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/hw/display/dpcd.c b/hw/display/dpcd.c
> index 170545c605..0c1b7b35fb 100644
> --- a/hw/display/dpcd.c
> +++ b/hw/display/dpcd.c
> @@ -1,5 +1,5 @@
>  /*
> - * dpcd.c
> + * Xilinx Display Port Control Data
>   *
>   *  Copyright (C) 2015 : GreenSocs Ltd
>   *      http://www.greensocs.com/ , email: info@greensocs.com
> @@ -137,7 +137,7 @@ static void dpcd_init(Object *obj)
>  {
>      DPCDState *s = DPCD(obj);
>
> -    memory_region_init_io(&s->iomem, obj, &aux_ops, s, TYPE_DPCD, 0x7FFFF);
> +    memory_region_init_io(&s->iomem, obj, &aux_ops, s, TYPE_DPCD, 0x80000);
>      aux_init_mmio(AUX_SLAVE(obj), &s->iomem);
>  }
>
> --
> 2.21.3
>
>


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 3/4] hw/display/dpcd: Convert debug printf()s to trace events
  2020-05-25  3:44 ` [PATCH 3/4] hw/display/dpcd: Convert debug printf()s to trace events Philippe Mathieu-Daudé
@ 2020-05-26 16:39   ` Alistair Francis
  0 siblings, 0 replies; 9+ messages in thread
From: Alistair Francis @ 2020-05-26 16:39 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Peter Maydell, QEMU Trivial, Alistair Francis,
	qemu-devel@nongnu.org Developers, qemu-arm, Edgar E. Iglesias

On Sun, May 24, 2020 at 8:46 PM Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
>
> 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>

Alistair

> ---
>  hw/display/dpcd.c       | 16 +++-------------
>  hw/display/trace-events |  4 ++++
>  2 files changed, 7 insertions(+), 13 deletions(-)
>
> diff --git a/hw/display/dpcd.c b/hw/display/dpcd.c
> index 0c1b7b35fb..64463654a1 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 e6e22bef88..00543f1601 100644
> --- a/hw/display/trace-events
> +++ b/hw/display/trace-events
> @@ -151,3 +151,7 @@ artist_vram_write(unsigned int size, uint64_t addr, uint64_t val) "%u 0x%"PRIx64
>  artist_fill_window(unsigned int start_x, unsigned int start_y, unsigned int width, unsigned int height, uint32_t op, uint32_t ctlpln) "start=%ux%u length=%ux%u op=0x%08x ctlpln=0x%08x"
>  artist_block_move(unsigned int start_x, unsigned int start_y, unsigned int dest_x, unsigned int dest_y, unsigned int width, unsigned int height) "source %ux%u -> dest %ux%u size %ux%u"
>  artist_draw_line(unsigned int start_x, unsigned int start_y, unsigned int end_x, unsigned int end_y) "%ux%u %ux%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"
> --
> 2.21.3
>
>


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 4/4] hw/display/xlnx_dp: Replace disabled DPRINTF() by error_report()
  2020-05-25  3:44 ` [PATCH 4/4] hw/display/xlnx_dp: Replace disabled DPRINTF() by error_report() Philippe Mathieu-Daudé
@ 2020-05-26 16:40   ` Alistair Francis
  0 siblings, 0 replies; 9+ messages in thread
From: Alistair Francis @ 2020-05-26 16:40 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Peter Maydell, QEMU Trivial, Alistair Francis,
	qemu-devel@nongnu.org Developers, qemu-arm, Edgar E. Iglesias

On Sun, May 24, 2020 at 8:49 PM Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
>
> DPRINTF() calls are disabled by default, so when unexpected
> data is used, the whole process abort without information.
>
> Display a bit of information with error_report() before crashing.
>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

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

Alistair

> ---
>  hw/display/xlnx_dp.c | 14 ++++++++------
>  1 file changed, 8 insertions(+), 6 deletions(-)
>
> diff --git a/hw/display/xlnx_dp.c b/hw/display/xlnx_dp.c
> index 3e5fb44e06..8d940cd8d1 100644
> --- a/hw/display/xlnx_dp.c
> +++ b/hw/display/xlnx_dp.c
> @@ -1,5 +1,5 @@
>  /*
> - * xlnx_dp.c
> + * Xilinx Display Port
>   *
>   *  Copyright (C) 2015 : GreenSocs Ltd
>   *      http://www.greensocs.com/ , email: info@greensocs.com
> @@ -24,6 +24,7 @@
>
>  #include "qemu/osdep.h"
>  #include "qapi/error.h"
> +#include "qemu/error-report.h"
>  #include "qemu/log.h"
>  #include "qemu/module.h"
>  #include "hw/display/xlnx_dp.h"
> @@ -465,7 +466,7 @@ static uint8_t xlnx_dp_aux_pop_tx_fifo(XlnxDPState *s)
>      uint8_t ret;
>
>      if (fifo8_is_empty(&s->tx_fifo)) {
> -        DPRINTF("tx_fifo underflow..\n");
> +        error_report("%s: TX_FIFO underflow", __func__);
>          abort();
>      }
>      ret = fifo8_pop(&s->tx_fifo);
> @@ -525,6 +526,7 @@ static void xlnx_dp_aux_set_command(XlnxDPState *s, uint32_t value)
>          qemu_log_mask(LOG_UNIMP, "xlnx_dp: Write i2c status not implemented\n");
>          break;
>      default:
> +        error_report("%s: invalid command: %u", __func__, cmd);
>          abort();
>      }
>
> @@ -631,8 +633,8 @@ static void xlnx_dp_change_graphic_fmt(XlnxDPState *s)
>          s->g_plane.format = PIXMAN_b8g8r8;
>          break;
>      default:
> -        DPRINTF("error: unsupported graphic format %u.\n",
> -                s->avbufm_registers[AV_BUF_FORMAT] & DP_GRAPHIC_MASK);
> +        error_report("%s: unsupported graphic format %u", __func__,
> +                     s->avbufm_registers[AV_BUF_FORMAT] & DP_GRAPHIC_MASK);
>          abort();
>      }
>
> @@ -647,8 +649,8 @@ static void xlnx_dp_change_graphic_fmt(XlnxDPState *s)
>          s->v_plane.format = PIXMAN_x8b8g8r8;
>          break;
>      default:
> -        DPRINTF("error: unsupported video format %u.\n",
> -                s->avbufm_registers[AV_BUF_FORMAT] & DP_NL_VID_FMT_MASK);
> +        error_report("%s: unsupported video format %u", __func__,
> +                     s->avbufm_registers[AV_BUF_FORMAT] & DP_NL_VID_FMT_MASK);
>          abort();
>      }
>
> --
> 2.21.3
>
>


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-05-26 16:56 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-25  3:44 [PATCH 0/4] hw/display/xlnx_dp: Fix memory region size, improve logging Philippe Mathieu-Daudé
2020-05-25  3:44 ` [PATCH 1/4] hw/misc/auxbus: Use qemu_log_mask(UNIMP) instead of debug printf Philippe Mathieu-Daudé
2020-05-26 16:17   ` Alistair Francis
2020-05-25  3:44 ` [PATCH 2/4] hw/display/dpcd: Fix memory region size Philippe Mathieu-Daudé
2020-05-26 16:38   ` Alistair Francis
2020-05-25  3:44 ` [PATCH 3/4] hw/display/dpcd: Convert debug printf()s to trace events Philippe Mathieu-Daudé
2020-05-26 16:39   ` Alistair Francis
2020-05-25  3:44 ` [PATCH 4/4] hw/display/xlnx_dp: Replace disabled DPRINTF() by error_report() Philippe Mathieu-Daudé
2020-05-26 16:40   ` Alistair Francis

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.