All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PULL 0/3] Ui 20181012 patches
@ 2018-10-12 13:21 Gerd Hoffmann
  2018-10-12 13:21 ` [Qemu-devel] [PULL 1/3] gtk: Don't vte_terminal_set_encoding() on new VTE versions Gerd Hoffmann
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Gerd Hoffmann @ 2018-10-12 13:21 UTC (permalink / raw)
  To: qemu-devel; +Cc: Gerd Hoffmann

The following changes since commit 75e50c80e051423a6f55a34ee4a1eec842444a5b:

  Merge remote-tracking branch 'remotes/armbru/tags/pull-misc-2018-10-10' into staging (2018-10-11 10:43:37 +0100)

are available in the git repository at:

  git://git.kraxel.org/qemu tags/ui-20181012-pull-request

for you to fetch changes up to 1d454c3fee00d9d1e46e1ec6788d49da5a0bfdb0:

  gtk: fix uninitialized variable (2018-10-12 14:49:03 +0200)

----------------------------------------------------------------
ui: gtk fixes, support more formats in sdl2.

----------------------------------------------------------------

Kevin Wolf (1):
  gtk: Don't vte_terminal_set_encoding() on new VTE versions

Max Reitz (1):
  sdl2: Support all virtio-gpu formats

Paolo Bonzini (1):
  gtk: fix uninitialized variable

 ui/gtk.c     |  8 +++++---
 ui/sdl2-2d.c | 15 +++++++++++++++
 2 files changed, 20 insertions(+), 3 deletions(-)

-- 
2.9.3

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

* [Qemu-devel] [PULL 1/3] gtk: Don't vte_terminal_set_encoding() on new VTE versions
  2018-10-12 13:21 [Qemu-devel] [PULL 0/3] Ui 20181012 patches Gerd Hoffmann
@ 2018-10-12 13:21 ` Gerd Hoffmann
  2018-10-12 13:21 ` [Qemu-devel] [PULL 2/3] sdl2: Support all virtio-gpu formats Gerd Hoffmann
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Gerd Hoffmann @ 2018-10-12 13:21 UTC (permalink / raw)
  To: qemu-devel; +Cc: Gerd Hoffmann, Kevin Wolf

From: Kevin Wolf <kwolf@redhat.com>

The function vte_terminal_set_encoding() is deprecated since VTE 0.54,
so stop calling it from that version on. This fixes a build error
because of our use of warning flags [-Werror=deprecated-declarations].

Fixes: https://bugs.launchpad.net/bugs/1794939
Reported-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-id: 20181011153039.2324-1-kwolf@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 ui/gtk.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/ui/gtk.c b/ui/gtk.c
index 3ddb5fe162..1d68276253 100644
--- a/ui/gtk.c
+++ b/ui/gtk.c
@@ -1951,13 +1951,15 @@ static GSList *gd_vc_vte_init(GtkDisplayState *s, VirtualConsole *vc,
     g_signal_connect(vc->vte.terminal, "commit", G_CALLBACK(gd_vc_in), vc);
 
     /* The documentation says that the default is UTF-8, but actually it is
-     * 7-bit ASCII at least in VTE 0.38.
-     */
+     * 7-bit ASCII at least in VTE 0.38. The function is deprecated since
+     * VTE 0.54 (only UTF-8 is supported now). */
+#if !VTE_CHECK_VERSION(0, 54, 0)
 #if VTE_CHECK_VERSION(0, 38, 0)
     vte_terminal_set_encoding(VTE_TERMINAL(vc->vte.terminal), "UTF-8", NULL);
 #else
     vte_terminal_set_encoding(VTE_TERMINAL(vc->vte.terminal), "UTF-8");
 #endif
+#endif
 
     vte_terminal_set_scrollback_lines(VTE_TERMINAL(vc->vte.terminal), -1);
     vte_terminal_set_size(VTE_TERMINAL(vc->vte.terminal),
-- 
2.9.3

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

* [Qemu-devel] [PULL 2/3] sdl2: Support all virtio-gpu formats
  2018-10-12 13:21 [Qemu-devel] [PULL 0/3] Ui 20181012 patches Gerd Hoffmann
  2018-10-12 13:21 ` [Qemu-devel] [PULL 1/3] gtk: Don't vte_terminal_set_encoding() on new VTE versions Gerd Hoffmann
@ 2018-10-12 13:21 ` Gerd Hoffmann
  2018-10-12 13:21 ` [Qemu-devel] [PULL 3/3] gtk: fix uninitialized variable Gerd Hoffmann
  2018-10-12 16:23 ` [Qemu-devel] [PULL 0/3] Ui 20181012 patches Peter Maydell
  3 siblings, 0 replies; 5+ messages in thread
From: Gerd Hoffmann @ 2018-10-12 13:21 UTC (permalink / raw)
  To: qemu-devel; +Cc: Gerd Hoffmann, Max Reitz

From: Max Reitz <mreitz@redhat.com>

There are some 2D resource formats that can be used through virtio-gpu,
but which are not supported by SDL2 when used for a scanout; these are
all alpha-channel formats and also XBGR (RGBX in non-BE pixman).

Add these formats in the switch converting pixman to SDL format
constants so a guest cannot crash the VM by triggering the
g_assert_not_reached() with an unsupported format.

Signed-off-by: Max Reitz <mreitz@redhat.com>
Message-id: 20181008185013.19371-1-mreitz@redhat.com

[ kraxel: also update sdl2_2d_check_format() ]

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 ui/sdl2-2d.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/ui/sdl2-2d.c b/ui/sdl2-2d.c
index 85484407be..091ecfcc7f 100644
--- a/ui/sdl2-2d.c
+++ b/ui/sdl2-2d.c
@@ -101,15 +101,24 @@ void sdl2_2d_switch(DisplayChangeListener *dcl,
     case PIXMAN_r5g6b5:
         format = SDL_PIXELFORMAT_RGB565;
         break;
+    case PIXMAN_a8r8g8b8:
     case PIXMAN_x8r8g8b8:
         format = SDL_PIXELFORMAT_ARGB8888;
         break;
+    case PIXMAN_a8b8g8r8:
+    case PIXMAN_x8b8g8r8:
+        format = SDL_PIXELFORMAT_ABGR8888;
+        break;
+    case PIXMAN_r8g8b8a8:
     case PIXMAN_r8g8b8x8:
         format = SDL_PIXELFORMAT_RGBA8888;
         break;
     case PIXMAN_b8g8r8x8:
         format = SDL_PIXELFORMAT_BGRX8888;
         break;
+    case PIXMAN_b8g8r8a8:
+        format = SDL_PIXELFORMAT_BGRA8888;
+        break;
     default:
         g_assert_not_reached();
     }
@@ -149,7 +158,13 @@ bool sdl2_2d_check_format(DisplayChangeListener *dcl,
      * the native ones. Thes are the ones I have tested.
      */
     return (format == PIXMAN_x8r8g8b8 ||
+            format == PIXMAN_a8r8g8b8 ||
+            format == PIXMAN_a8b8g8r8 ||
+            format == PIXMAN_x8b8g8r8 ||
             format == PIXMAN_b8g8r8x8 ||
+            format == PIXMAN_b8g8r8a8 ||
+            format == PIXMAN_r8g8b8x8 ||
+            format == PIXMAN_r8g8b8a8 ||
             format == PIXMAN_x1r5g5b5 ||
             format == PIXMAN_r5g6b5);
 }
-- 
2.9.3

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

* [Qemu-devel] [PULL 3/3] gtk: fix uninitialized variable
  2018-10-12 13:21 [Qemu-devel] [PULL 0/3] Ui 20181012 patches Gerd Hoffmann
  2018-10-12 13:21 ` [Qemu-devel] [PULL 1/3] gtk: Don't vte_terminal_set_encoding() on new VTE versions Gerd Hoffmann
  2018-10-12 13:21 ` [Qemu-devel] [PULL 2/3] sdl2: Support all virtio-gpu formats Gerd Hoffmann
@ 2018-10-12 13:21 ` Gerd Hoffmann
  2018-10-12 16:23 ` [Qemu-devel] [PULL 0/3] Ui 20181012 patches Peter Maydell
  3 siblings, 0 replies; 5+ messages in thread
From: Gerd Hoffmann @ 2018-10-12 13:21 UTC (permalink / raw)
  To: qemu-devel; +Cc: Gerd Hoffmann, Paolo Bonzini

From: Paolo Bonzini <pbonzini@redhat.com>

zoom_to_fit is never initialized to false, Coverity complains
(not sure why GCC does not).

Fixes: e8b1386ea1719525a1a92df03377764703fe8c64
Cc: kraxel@redhat.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-id: 20181003121138.22037-1-pbonzini@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 ui/gtk.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ui/gtk.c b/ui/gtk.c
index 1d68276253..c4dd17a6fa 100644
--- a/ui/gtk.c
+++ b/ui/gtk.c
@@ -2138,7 +2138,7 @@ static GSList *gd_vc_gfx_init(GtkDisplayState *s, VirtualConsole *vc,
                               QemuConsole *con, int idx,
                               GSList *group, GtkWidget *view_menu)
 {
-    bool zoom_to_fit;
+    bool zoom_to_fit = false;
 
     vc->label = qemu_console_get_label(con);
     vc->s = s;
-- 
2.9.3

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

* Re: [Qemu-devel] [PULL 0/3] Ui 20181012 patches
  2018-10-12 13:21 [Qemu-devel] [PULL 0/3] Ui 20181012 patches Gerd Hoffmann
                   ` (2 preceding siblings ...)
  2018-10-12 13:21 ` [Qemu-devel] [PULL 3/3] gtk: fix uninitialized variable Gerd Hoffmann
@ 2018-10-12 16:23 ` Peter Maydell
  3 siblings, 0 replies; 5+ messages in thread
From: Peter Maydell @ 2018-10-12 16:23 UTC (permalink / raw)
  To: Gerd Hoffmann; +Cc: QEMU Developers

On 12 October 2018 at 14:21, Gerd Hoffmann <kraxel@redhat.com> wrote:
> The following changes since commit 75e50c80e051423a6f55a34ee4a1eec842444a5b:
>
>   Merge remote-tracking branch 'remotes/armbru/tags/pull-misc-2018-10-10' into staging (2018-10-11 10:43:37 +0100)
>
> are available in the git repository at:
>
>   git://git.kraxel.org/qemu tags/ui-20181012-pull-request
>
> for you to fetch changes up to 1d454c3fee00d9d1e46e1ec6788d49da5a0bfdb0:
>
>   gtk: fix uninitialized variable (2018-10-12 14:49:03 +0200)
>
> ----------------------------------------------------------------
> ui: gtk fixes, support more formats in sdl2.
>
> ----------------------------------------------------------------
>
> Kevin Wolf (1):
>   gtk: Don't vte_terminal_set_encoding() on new VTE versions
>
> Max Reitz (1):
>   sdl2: Support all virtio-gpu formats
>
> Paolo Bonzini (1):
>   gtk: fix uninitialized variable
>
>  ui/gtk.c     |  8 +++++---
>  ui/sdl2-2d.c | 15 +++++++++++++++
>  2 files changed, 20 insertions(+), 3 deletions(-)
>
> --
> 2.9.3

Applied, thanks.

-- PMM

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

end of thread, other threads:[~2018-10-12 16:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-12 13:21 [Qemu-devel] [PULL 0/3] Ui 20181012 patches Gerd Hoffmann
2018-10-12 13:21 ` [Qemu-devel] [PULL 1/3] gtk: Don't vte_terminal_set_encoding() on new VTE versions Gerd Hoffmann
2018-10-12 13:21 ` [Qemu-devel] [PULL 2/3] sdl2: Support all virtio-gpu formats Gerd Hoffmann
2018-10-12 13:21 ` [Qemu-devel] [PULL 3/3] gtk: fix uninitialized variable Gerd Hoffmann
2018-10-12 16:23 ` [Qemu-devel] [PULL 0/3] Ui 20181012 patches Peter Maydell

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.