qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Andreas Färber" <afaerber@suse.de>
To: Frediano Ziglio <freddy77@gmail.com>
Cc: Peter Maydell <peter.maydell@linaro.org>,
	Anthony Liguori <aliguori@us.ibm.com>,
	xen-devel@lists.xensource.com,
	Fabio Fantoni <fantonifabio@tiscali.it>,
	Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
	qemu-devel <qemu-devel@nongnu.org>, Alon Levy <alevy@redhat.com>,
	Gerd Hoffmann <kraxel@redhat.com>
Subject: Re: [Qemu-devel] [RFC PATCH] vga: Start supporting resolution not multiple of 16 correctly.
Date: Fri, 10 May 2013 07:52:22 +0200	[thread overview]
Message-ID: <518C8B16.4060108@suse.de> (raw)
In-Reply-To: <CAHt6W4fxEv9bMQHjSA=O3vuHxaH+sL9raaj9OsD2b-j4=3aYRw@mail.gmail.com>

Am 15.03.2013 19:14, schrieb Frediano Ziglio:
> Modern notebook support 136x768 resolution. The resolution width is

1366?

> not multiple of 16 causing some problems.

"a multiple"? (me not a native English speaker)

> 
> Qemu VGA emulation require width resolution to be multiple of 8.

"QEMU"

> 
> VNC implementation require width resolution to be multiple of 16.

"requires" or "implementations"

> 
> This patch remove these limits. Was tested with a Windows machine with
> standard vga and 1366x768 as resolution. I had to update vgabios as
> version in qemu (pc-bios/vgabios-stdvga.bin) is quite old. I also had
> to add some patches on top of VGABIOS 0.7a to add some new
> resolutions.
> 
> I have some doubt about this patch
> - are other UI (sdl, cocoa, qxl) happy if resolution is not multiple of 16 ?

SDL and Gtk+ should be easily testable; if you CC Peter Maydell or me we
can try to test Cocoa. CC'ing QXL guys.

> - scanline is computed exactly without any alignment (so 1366 8 bit is
> 1366 bytes) while getting vesa information from a laptop it seems to
> use some kind of alignment (if became 0x580 which is 1408 bytes).
> Perhaps should I change either VGABIOS and Qemu to make this
> alignment?

Concerns and personal comments are better placed below ---. :)

> 
> Signed-off-by: Frediano Ziglio <frediano.ziglio@citrix.com>
> 
> ---
>  hw/vga.c |    2 +-

File has moved to hw/display/.

>  ui/vnc.c |   27 +++++++++++++--------------
>  2 files changed, 14 insertions(+), 15 deletions(-)

I don't see VGABIOS being updated here despite being mentioned above? Is
that done in a different patch? Still needed?

> diff --git a/hw/vga.c b/hw/vga.c
> index 1caf23d..d229f06 100644
> --- a/hw/vga.c
> +++ b/hw/vga.c
> @@ -651,7 +651,7 @@ void vbe_ioport_write_data(void *opaque, uint32_t
> addr, uint32_t val)
>              }
>              break;
>          case VBE_DISPI_INDEX_XRES:
> -            if ((val <= VBE_DISPI_MAX_XRES) && ((val & 7) == 0)) {
> +            if ((val <= VBE_DISPI_MAX_XRES) && ((val & 1) == 0)) {
>                  s->vbe_regs[s->vbe_index] = val;
>              }
>              break;
> diff --git a/ui/vnc.c b/ui/vnc.c
> index ff4e2ae..328d14d 100644
> --- a/ui/vnc.c
> +++ b/ui/vnc.c
> @@ -907,26 +907,27 @@ static int vnc_update_client(VncState *vs, int has_dirty)
>          for (y = 0; y < height; y++) {
>              int x;
>              int last_x = -1;
> -            for (x = 0; x < width / 16; x++) {
> -                if (test_and_clear_bit(x, vs->dirty[y])) {
> +            for (x = 0; x < width; x += 16) {
> +                if (test_and_clear_bit(x/16, vs->dirty[y])) {
[snip]

Please check if scripts/checkpatch.pl complains about missing spaces
around operators.

Regards,
Andreas

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

  parent reply	other threads:[~2013-05-10  5:52 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-15 18:14 [Qemu-devel] [RFC PATCH] vga: Start supporting resolution not multiple of 16 correctly Frediano Ziglio
2013-03-19 13:56 ` Stefano Stabellini
2013-05-09 14:20 ` [Qemu-devel] [Xen-devel] " Pasi Kärkkäinen
2013-05-10  5:52 ` Andreas Färber [this message]
2013-06-18 10:17   ` [Qemu-devel] " Frediano Ziglio
2013-07-23  9:29     ` Fabio Fantoni
2013-07-23 11:28       ` Gerd Hoffmann
2013-07-28 16:56         ` Frediano Ziglio
2013-09-25 16:12           ` [Qemu-devel] [Xen-devel] " Pasi Kärkkäinen
2013-10-03 12:09             ` Fabio Fantoni

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=518C8B16.4060108@suse.de \
    --to=afaerber@suse.de \
    --cc=alevy@redhat.com \
    --cc=aliguori@us.ibm.com \
    --cc=fantonifabio@tiscali.it \
    --cc=freddy77@gmail.com \
    --cc=kraxel@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=xen-devel@lists.xensource.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).