* [Qemu-devel] [PATCH] hw/qxl: allow vram to be sized to 4096 bytes
@ 2011-11-09 13:37 Alon Levy
0 siblings, 0 replies; 4+ messages in thread
From: Alon Levy @ 2011-11-09 13:37 UTC (permalink / raw)
To: kraxel; +Cc: qemu-devel
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>
---
Causes endless ooms for the linux driver, but it's mainly meant for the
windows driver, where it was tested (with a previous patch I can't find,
but this one is simple enough and equivalent).
hw/qxl.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/hw/qxl.c b/hw/qxl.c
index 41500e9..592842b 100644
--- a/hw/qxl.c
+++ b/hw/qxl.c
@@ -1559,10 +1559,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.7.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Qemu-devel] [PATCH] hw/qxl: allow vram to be sized to 4096 bytes
@ 2012-02-16 17:45 Alon Levy
2012-02-17 15:11 ` Gerd Hoffmann
0 siblings, 1 reply; 4+ messages in thread
From: Alon Levy @ 2012-02-16 17:45 UTC (permalink / raw)
To: qemu-devel, kraxel
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] hw/qxl: allow vram to be sized to 4096 bytes
2012-02-16 17:45 [Qemu-devel] [PATCH] hw/qxl: allow vram to be sized to 4096 bytes Alon Levy
@ 2012-02-17 15:11 ` Gerd Hoffmann
2012-02-17 19:15 ` Alon Levy
0 siblings, 1 reply; 4+ messages in thread
From: Gerd Hoffmann @ 2012-02-17 15:11 UTC (permalink / raw)
To: Alon Levy; +Cc: qemu-devel
Hi,
> - 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) {
Is there any reason to keep the 16MB minimum size? I think we can just
drop it and simplify the logic here. See the patch series just sent.
cheers,
Gerd
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] hw/qxl: allow vram to be sized to 4096 bytes
2012-02-17 15:11 ` Gerd Hoffmann
@ 2012-02-17 19:15 ` Alon Levy
0 siblings, 0 replies; 4+ messages in thread
From: Alon Levy @ 2012-02-17 19:15 UTC (permalink / raw)
To: Gerd Hoffmann; +Cc: qemu-devel
On Fri, Feb 17, 2012 at 04:11:59PM +0100, Gerd Hoffmann wrote:
> Hi,
>
> > - 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) {
>
> Is there any reason to keep the 16MB minimum size? I think we can just
> drop it and simplify the logic here. See the patch series just sent.
I agree. Will review your patchset.
>
> cheers,
> Gerd
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-02-17 19:16 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-16 17:45 [Qemu-devel] [PATCH] hw/qxl: allow vram to be sized to 4096 bytes Alon Levy
2012-02-17 15:11 ` 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
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).