All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PULL 0/2] Vga 20180604 patches
@ 2018-06-04  8:49 Gerd Hoffmann
  2018-06-04  8:49 ` [Qemu-devel] [PULL 1/2] bochs-display: add missing break Gerd Hoffmann
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Gerd Hoffmann @ 2018-06-04  8:49 UTC (permalink / raw)
  To: qemu-devel; +Cc: Gerd Hoffmann

The following changes since commit 392fba9f583223786f844dce9b2e7f9a0ce0147a:

  Merge remote-tracking branch 'remotes/stsquad/tags/pull-travis-updates-010618-1' into staging (2018-06-01 17:32:30 +0100)

are available in the git repository at:

  git://git.kraxel.org/qemu tags/vga-20180604-pull-request

for you to fetch changes up to 6bc2fd57e1fc2d1957d1ff952793c53764130218:

  vga: cleanup surface handling (2018-06-04 09:44:10 +0200)

----------------------------------------------------------------
Two little vga fixes.

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

Gerd Hoffmann (2):
  bochs-display: add missing break
  vga: cleanup surface handling

 hw/display/bochs-display.c |  1 +
 hw/display/vga.c           | 36 +++++++++++++++++++-----------------
 2 files changed, 20 insertions(+), 17 deletions(-)

-- 
2.9.3

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

* [Qemu-devel] [PULL 1/2] bochs-display: add missing break
  2018-06-04  8:49 [Qemu-devel] [PULL 0/2] Vga 20180604 patches Gerd Hoffmann
@ 2018-06-04  8:49 ` Gerd Hoffmann
  2018-06-04  8:49 ` [Qemu-devel] [PULL 2/2] vga: cleanup surface handling Gerd Hoffmann
  2018-06-04 15:40 ` [Qemu-devel] [PULL 0/2] Vga 20180604 patches Peter Maydell
  2 siblings, 0 replies; 5+ messages in thread
From: Gerd Hoffmann @ 2018-06-04  8:49 UTC (permalink / raw)
  To: qemu-devel; +Cc: Gerd Hoffmann

Fixes: CID 1391291
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: 20180525045344.28347-1-kraxel@redhat.com
---
 hw/display/bochs-display.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hw/display/bochs-display.c b/hw/display/bochs-display.c
index c33524b558..1187d77576 100644
--- a/hw/display/bochs-display.c
+++ b/hw/display/bochs-display.c
@@ -158,6 +158,7 @@ static int bochs_display_get_mode(BochsDisplayState *s,
         /* best effort: support native endianess only */
         mode->format = PIXMAN_r5g6b5;
         mode->bytepp = 2;
+        break;
     case 32:
         mode->format = s->big_endian_fb
             ? PIXMAN_BE_x8r8g8b8
-- 
2.9.3

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

* [Qemu-devel] [PULL 2/2] vga: cleanup surface handling
  2018-06-04  8:49 [Qemu-devel] [PULL 0/2] Vga 20180604 patches Gerd Hoffmann
  2018-06-04  8:49 ` [Qemu-devel] [PULL 1/2] bochs-display: add missing break Gerd Hoffmann
@ 2018-06-04  8:49 ` Gerd Hoffmann
  2018-06-04 15:40 ` [Qemu-devel] [PULL 0/2] Vga 20180604 patches Peter Maydell
  2 siblings, 0 replies; 5+ messages in thread
From: Gerd Hoffmann @ 2018-06-04  8:49 UTC (permalink / raw)
  To: qemu-devel; +Cc: Gerd Hoffmann

Just set the full_update flag if we need a new DisplaySurface.  Create
a new surface when the flag is set instead of having two places where
qemu_create_displaysurface_from() is called.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-id: 20180525131318.28437-1-kraxel@redhat.com
---
 hw/display/vga.c | 36 +++++++++++++++++++-----------------
 1 file changed, 19 insertions(+), 17 deletions(-)

diff --git a/hw/display/vga.c b/hw/display/vga.c
index a7794f6d1f..ed476e4e80 100644
--- a/hw/display/vga.c
+++ b/hw/display/vga.c
@@ -1548,12 +1548,31 @@ static void vga_draw_graphic(VGACommonState *s, int full_update)
     } else {
         share_surface = false;
     }
+
     if (s->line_offset != s->last_line_offset ||
         disp_width != s->last_width ||
         height != s->last_height ||
         s->last_depth != depth ||
         s->last_byteswap != byteswap ||
         share_surface != is_buffer_shared(surface)) {
+        /* display parameters changed -> need new display surface */
+        s->last_scr_width = disp_width;
+        s->last_scr_height = height;
+        s->last_width = disp_width;
+        s->last_height = height;
+        s->last_line_offset = s->line_offset;
+        s->last_depth = depth;
+        s->last_byteswap = byteswap;
+        full_update = 1;
+    }
+    if (surface_data(surface) != s->vram_ptr + (s->start_addr * 4)
+        && is_buffer_shared(surface)) {
+        /* base address changed (page flip) -> shared display surfaces
+         * must be updated with the new base address */
+        full_update = 1;
+    }
+
+    if (full_update) {
         if (share_surface) {
             surface = qemu_create_displaysurface_from(disp_width,
                     height, format, s->line_offset,
@@ -1563,23 +1582,6 @@ static void vga_draw_graphic(VGACommonState *s, int full_update)
             qemu_console_resize(s->con, disp_width, height);
             surface = qemu_console_surface(s->con);
         }
-        s->last_scr_width = disp_width;
-        s->last_scr_height = height;
-        s->last_width = disp_width;
-        s->last_height = height;
-        s->last_line_offset = s->line_offset;
-        s->last_depth = depth;
-        s->last_byteswap = byteswap;
-        full_update = 1;
-    } else if (is_buffer_shared(surface) &&
-               (full_update || surface_data(surface) != s->vram_ptr
-                + (s->start_addr * 4))) {
-        pixman_format_code_t format =
-            qemu_default_pixman_format(depth, !byteswap);
-        surface = qemu_create_displaysurface_from(disp_width,
-                height, format, s->line_offset,
-                s->vram_ptr + (s->start_addr * 4));
-        dpy_gfx_replace_surface(s->con, surface);
     }
 
     if (shift_control == 0) {
-- 
2.9.3

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

* Re: [Qemu-devel] [PULL 0/2] Vga 20180604 patches
  2018-06-04  8:49 [Qemu-devel] [PULL 0/2] Vga 20180604 patches Gerd Hoffmann
  2018-06-04  8:49 ` [Qemu-devel] [PULL 1/2] bochs-display: add missing break Gerd Hoffmann
  2018-06-04  8:49 ` [Qemu-devel] [PULL 2/2] vga: cleanup surface handling Gerd Hoffmann
@ 2018-06-04 15:40 ` Peter Maydell
  2018-06-04 17:33   ` Peter Maydell
  2 siblings, 1 reply; 5+ messages in thread
From: Peter Maydell @ 2018-06-04 15:40 UTC (permalink / raw)
  To: Gerd Hoffmann; +Cc: QEMU Developers, Dr. David Alan Gilbert

On 4 June 2018 at 09:49, Gerd Hoffmann <kraxel@redhat.com> wrote:
> The following changes since commit 392fba9f583223786f844dce9b2e7f9a0ce0147a:
>
>   Merge remote-tracking branch 'remotes/stsquad/tags/pull-travis-updates-010618-1' into staging (2018-06-01 17:32:30 +0100)
>
> are available in the git repository at:
>
>   git://git.kraxel.org/qemu tags/vga-20180604-pull-request
>
> for you to fetch changes up to 6bc2fd57e1fc2d1957d1ff952793c53764130218:
>
>   vga: cleanup surface handling (2018-06-04 09:44:10 +0200)
>
> ----------------------------------------------------------------
> Two little vga fixes.
>
> ----------------------------------------------------------------
>
> Gerd Hoffmann (2):
>   bochs-display: add missing break
>   vga: cleanup surface handling
>
>  hw/display/bochs-display.c |  1 +
>  hw/display/vga.c           | 36 +++++++++++++++++++-----------------
>  2 files changed, 20 insertions(+), 17 deletions(-)

I got a failure in the migration tests with this applied:

  /i386/ahci/migrate/sanity:
/home/petmay01/linaro/qemu-for-merges/migration/
qemu-file.c:119:15: runtime error: member access within misaligned
address 0x101010101010101 for type 'QEMUFile' (aka '
struct QEMUFile'), which requires 8 byte alignment
0x101010101010101: note: pointer points here
<memory cannot be printed>
/home/petmay01/linaro/qemu-for-merges/migration/qemu-file.c:119:15:
runtime error: load of misaligned address 0x1010101
01018545 for type 'int', which requires 4 byte alignment
0x101010101018545: note: pointer points here
<memory cannot be printed>
ahci-test: /home/petmay01/linaro/qemu-for-merges/tests/libqtest.c:113:
void kill_qemu(QTestState *): Assertion `!WCORED
UMP(wstatus)' failed.
FAIL
GTester: last random seed: R02S0741b59625080b71b3c3e7b5f47baf32
(pid=2216)

something going wrong with a clearly bogus pointer...
The file/line reference is to qemu_file_get_error(), so I guess
something has wound up with a stale QEMUFile*.

Unfortunately this doesn't seem to reproduce. I haven't seen
it before, so my guess is this is an intermittent introduced
by your earlier migration pullreq which is now in master ?
Might only manifest when the host machine is under load or
during a 'make check -j8' parallel test run.

thanks
-- PMM

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

* Re: [Qemu-devel] [PULL 0/2] Vga 20180604 patches
  2018-06-04 15:40 ` [Qemu-devel] [PULL 0/2] Vga 20180604 patches Peter Maydell
@ 2018-06-04 17:33   ` Peter Maydell
  0 siblings, 0 replies; 5+ messages in thread
From: Peter Maydell @ 2018-06-04 17:33 UTC (permalink / raw)
  To: Gerd Hoffmann; +Cc: QEMU Developers, Dr. David Alan Gilbert

On 4 June 2018 at 16:40, Peter Maydell <peter.maydell@linaro.org> wrote:
> On 4 June 2018 at 09:49, Gerd Hoffmann <kraxel@redhat.com> wrote:
>> The following changes since commit 392fba9f583223786f844dce9b2e7f9a0ce0147a:
>>
>>   Merge remote-tracking branch 'remotes/stsquad/tags/pull-travis-updates-010618-1' into staging (2018-06-01 17:32:30 +0100)
>>
>> are available in the git repository at:
>>
>>   git://git.kraxel.org/qemu tags/vga-20180604-pull-request
>>
>> for you to fetch changes up to 6bc2fd57e1fc2d1957d1ff952793c53764130218:
>>
>>   vga: cleanup surface handling (2018-06-04 09:44:10 +0200)
>>
>> ----------------------------------------------------------------
>> Two little vga fixes.
>>
>> ----------------------------------------------------------------
>>
>> Gerd Hoffmann (2):
>>   bochs-display: add missing break
>>   vga: cleanup surface handling
>>
>>  hw/display/bochs-display.c |  1 +
>>  hw/display/vga.c           | 36 +++++++++++++++++++-----------------
>>  2 files changed, 20 insertions(+), 17 deletions(-)
>
> I got a failure in the migration tests with this applied:

> Unfortunately this doesn't seem to reproduce. I haven't seen
> it before, so my guess is this is an intermittent introduced
> by your earlier migration pullreq which is now in master ?
> Might only manifest when the host machine is under load or
> during a 'make check -j8' parallel test run.

A rerun didn't show this up, and it doesn't look like it could
be anything in this pull, so I've applied the pullreq.

thanks
-- PMM

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

end of thread, other threads:[~2018-06-04 17:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-04  8:49 [Qemu-devel] [PULL 0/2] Vga 20180604 patches Gerd Hoffmann
2018-06-04  8:49 ` [Qemu-devel] [PULL 1/2] bochs-display: add missing break Gerd Hoffmann
2018-06-04  8:49 ` [Qemu-devel] [PULL 2/2] vga: cleanup surface handling Gerd Hoffmann
2018-06-04 15:40 ` [Qemu-devel] [PULL 0/2] Vga 20180604 patches Peter Maydell
2018-06-04 17:33   ` 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.