qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Alon Levy <alevy@redhat.com>
To: qemu-devel@nongnu.org, kraxel@redhat.com
Subject: [Qemu-devel] [PATCH] hw/qxl: allow vram to be sized to 4096 bytes
Date: Thu, 16 Feb 2012 19:45:55 +0200	[thread overview]
Message-ID: <1329414355-26909-1-git-send-email-alevy@redhat.com> (raw)

This allows us to reduce the size of the surfaces bar minimally while
not breaking current drivers. To completely disable the bar, or make it
zero sized, would break them.

Signed-off-by: Alon Levy <alevy@redhat.com>
---
 hw/qxl.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/hw/qxl.c b/hw/qxl.c
index ac69125..b1a2daa 100644
--- a/hw/qxl.c
+++ b/hw/qxl.c
@@ -1556,10 +1556,12 @@ static int qxl_init_common(PCIQXLDevice *qxl)
     init_qxl_rom(qxl);
     init_qxl_ram(qxl);
 
-    if (qxl->vram_size < 16 * 1024 * 1024) {
+    /* a request of 0 vram_size is translated to the smallest vram that doesn't
+     * break current off screen surfaces using drivers */
+    if (qxl->vram_size > 0 && qxl->vram_size < 16 * 1024 * 1024) {
         qxl->vram_size = 16 * 1024 * 1024;
     }
-    if (qxl->revision == 1) {
+    if (qxl->revision == 1 || qxl->vram_size == 0) {
         qxl->vram_size = 4096;
     }
     qxl->vram_size = msb_mask(qxl->vram_size * 2 - 1);
-- 
1.7.9

             reply	other threads:[~2012-02-16 17:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-16 17:45 Alon Levy [this message]
2012-02-17 15:11 ` [Qemu-devel] [PATCH] hw/qxl: allow vram to be sized to 4096 bytes Gerd Hoffmann
2012-02-17 19:15   ` Alon Levy
  -- strict thread matches above, loose matches on Subject: below --
2011-11-09 13:37 Alon Levy

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=1329414355-26909-1-git-send-email-alevy@redhat.com \
    --to=alevy@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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).