qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Simon Rowe <simon.rowe@nutanix.com>
Cc: QEMU Developers <qemu-devel@nongnu.org>,
	"freddy77@gmail.com" <freddy77@gmail.com>
Subject: Re: Corrupt VNC display for 1366x768
Date: Thu, 3 Oct 2024 14:05:28 +0100	[thread overview]
Message-ID: <Zv6WmOeg7lcHLxs0@redhat.com> (raw)
In-Reply-To: <DM8PR02MB81211F01833922F781C21E5893712@DM8PR02MB8121.namprd02.prod.outlook.com>

On Thu, Oct 03, 2024 at 01:01:04PM +0000, Simon Rowe wrote:
> Looking at the trace output it seems that the displaysurface has been rounded from the start
> vnc_client_connect VNC client connect state=0x556dce1c1b20 ioc=0x556dce9e1e70
> displaysurface_create_from surface=0x556dce104b30, 1360x768, format 0x20020888
> vnc_server_dpy_recreate VNC server dpy recreate dpy=0x7faa59026010 size=1360x768 fmt=537004168
> vnc_client_throttle_threshold VNC client throttle threshold state=0x556dce1c1b20 ioc=0x556dce9e1e70 oldoffset=0 newoffset=1048576 width=0 height=0 bpp=0 audio=(nil)
> displaysurface_free surface=0x556dcebf10d0
> vnc_auth_start VNC client auth start state=0x556dce1c1b20 method=1
> vnc_auth_pass VNC client auth passed state=0x556dce1c1b20 method=1
> vnc_client_throttle_threshold VNC client throttle threshold state=0x556dce1c1b20 ioc=0x556dce9e1e70 oldoffset=1048576 newoffset=4177920 width=1360 height=768 bpp=4 audio=(nil)
> displaysurface_create_from surface=0x556dce140de0, 1360x768, format 0x20020888
> vnc_server_dpy_pageflip VNC server dpy pageflip dpy=0x7faa59026010 size=1360x768 fmt=537004168
> displaysurface_free surface=0x556dce104b30
> vnc_client_throttle_threshold VNC client throttle threshold state=0x556dce1c1b20 ioc=0x556dce9e1e70 oldoffset=4177920 newoffset=1048576 width=1360 height=768 bpp=1 audio=(nil)
> vnc_job_add_rect VNC add rect state=0x556dce1c1b20 job=0x556dce0ea1e0 offset=0,0 size=1360x768
> vnc_job_clamp_rect VNC job clamp rect state=0x7faa42de53a0 job=0x556dce0ea1e0 offset=0,0 size=1360x768
> vnc_job_clamped_rect VNC job clamp rect state=0x7faa42de53a0 job=0x556dce0ea1e0 offset=0,0 size=1360x768
> vnc_job_nrects VNC job state=0x7faa42de53a0 job=0x556dce0ea1e0 nrects=1
> vnc_client_unthrottle_forced VNC client unthrottle forced offset state=0x556dce1c1b20 ioc=0x556dce9e1e70
> vnc_job_add_rect VNC add rect state=0x556dce1c1b20 job=0x556dce217810 offset=0,0 size=1360x13
> vnc_job_clamp_rect VNC job clamp rect state=0x7faa42de53a0 job=0x556dce217810 offset=0,0 size=1360x13
> vnc_job_clamped_rect VNC job clamp rect state=0x7faa42de53a0 job=0x556dce217810 offset=0,0 size=1360x13
> vnc_job_nrects VNC job state=0x7faa42de53a0 job=0x556dce217810 nrects=1
> vnc_client_unthrottle_forced VNC client unthrottle forced offset state=0x556dce1c1b20 ioc=0x556dce9e1e70
> 
> I'm currently struggling to follow where the width parameter is taken from.

The QEMU VNC code has logic which rounds up display sizes to a multiple
of 16:

  static int vnc_width(VncDisplay *vd)
  {
      return MIN(VNC_MAX_WIDTH, ROUND_UP(surface_width(vd->ds),
                                         VNC_DIRTY_PIXELS_PER_BIT));
  }

Separately, it also tracks the "true" width, but untangling which it
uses where & the implications is hard to do. ie i'm not going to try
to explain it further, as I don't know what's going on without spending
some hours to trace through it all :-)

With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|



  reply	other threads:[~2024-10-03 13:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-02 11:09 Corrupt VNC display for 1366x768 Simon Rowe
2024-10-02 12:01 ` Daniel P. Berrangé
2024-10-02 12:59   ` Simon Rowe
2024-10-03 13:01     ` Simon Rowe
2024-10-03 13:05       ` Daniel P. Berrangé [this message]
2024-10-03 13:34         ` Simon Rowe

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=Zv6WmOeg7lcHLxs0@redhat.com \
    --to=berrange@redhat.com \
    --cc=freddy77@gmail.com \
    --cc=qemu-devel@nongnu.org \
    --cc=simon.rowe@nutanix.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).