Patchwork [PATCHv2,2/4] qxl: add mode to debugprint on destroy primary

login
register
mail settings
Submitter Alon Levy
Date April 28, 2011, 8:29 a.m.
Message ID <1303979358-4421-3-git-send-email-alevy@redhat.com>
Download mbox | patch
Permalink /patch/93196/
State New
Headers show

Comments

Alon Levy - April 28, 2011, 8:29 a.m.
---
 hw/qxl.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Gerd Hoffmann - April 29, 2011, 12:01 p.m.
On 04/28/11 10:29, Alon Levy wrote:
> ---
>   hw/qxl.c |    2 +-
>   1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/hw/qxl.c b/hw/qxl.c
> index 63e295b..ccd820c 100644
> --- a/hw/qxl.c
> +++ b/hw/qxl.c
> @@ -1009,7 +1009,7 @@ static void ioport_write(void *opaque, uint32_t addr, uint32_t val)
>           break;
>       case QXL_IO_DESTROY_PRIMARY:
>           PANIC_ON(val != 0);
> -        dprint(d, 1, "QXL_IO_DESTROY_PRIMARY\n");
> +        dprint(d, 1, "QXL_IO_DESTROY_PRIMARY (%s)\n", qxl_mode_to_string(d->mode));
>           qxl_destroy_primary(d);
>           break;
>       case QXL_IO_DESTROY_SURFACE_WAIT:

Squash into the first?  Maybe there are a few more places where a 
pretty-printed mode would be useful?

cheers,
   Gerd
Alon Levy - April 29, 2011, 9:54 p.m.
On Fri, Apr 29, 2011 at 02:01:57PM +0200, Gerd Hoffmann wrote:
> On 04/28/11 10:29, Alon Levy wrote:
> >---
> >  hw/qxl.c |    2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> >
> >diff --git a/hw/qxl.c b/hw/qxl.c
> >index 63e295b..ccd820c 100644
> >--- a/hw/qxl.c
> >+++ b/hw/qxl.c
> >@@ -1009,7 +1009,7 @@ static void ioport_write(void *opaque, uint32_t addr, uint32_t val)
> >          break;
> >      case QXL_IO_DESTROY_PRIMARY:
> >          PANIC_ON(val != 0);
> >-        dprint(d, 1, "QXL_IO_DESTROY_PRIMARY\n");
> >+        dprint(d, 1, "QXL_IO_DESTROY_PRIMARY (%s)\n", qxl_mode_to_string(d->mode));
> >          qxl_destroy_primary(d);
> >          break;
> >      case QXL_IO_DESTROY_SURFACE_WAIT:
> 
> Squash into the first?  Maybe there are a few more places where a
> pretty-printed mode would be useful?
ok, I'll look for more usage ops and do the squash.

> 
> cheers,
>   Gerd

Patch

diff --git a/hw/qxl.c b/hw/qxl.c
index 63e295b..ccd820c 100644
--- a/hw/qxl.c
+++ b/hw/qxl.c
@@ -1009,7 +1009,7 @@  static void ioport_write(void *opaque, uint32_t addr, uint32_t val)
         break;
     case QXL_IO_DESTROY_PRIMARY:
         PANIC_ON(val != 0);
-        dprint(d, 1, "QXL_IO_DESTROY_PRIMARY\n");
+        dprint(d, 1, "QXL_IO_DESTROY_PRIMARY (%s)\n", qxl_mode_to_string(d->mode));
         qxl_destroy_primary(d);
         break;
     case QXL_IO_DESTROY_SURFACE_WAIT: