diff mbox

[1/4] qxl: drop vram bar minimum size

Message ID 1329491433-31446-2-git-send-email-kraxel@redhat.com
State New
Headers show

Commit Message

Gerd Hoffmann Feb. 17, 2012, 3:10 p.m. UTC
There is no reason to require a minimum size of 16 MB for the vram.
Lower the limit to 4096 (one page).  Make it disapper completely would
break guests.
---
 hw/qxl.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

Comments

Alon Levy Feb. 17, 2012, 7:27 p.m. UTC | #1
On Fri, Feb 17, 2012 at 04:10:30PM +0100, Gerd Hoffmann wrote:
> There is no reason to require a minimum size of 16 MB for the vram.
> Lower the limit to 4096 (one page).  Make it disapper completely would
> break guests.
> ---
>  hw/qxl.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/hw/qxl.c b/hw/qxl.c
> index 5c6b556..4de4b8d 100644
> --- a/hw/qxl.c
> +++ b/hw/qxl.c
> @@ -1592,8 +1592,8 @@ static int qxl_init_common(PCIQXLDevice *qxl)
>      init_qxl_rom(qxl);
>      init_qxl_ram(qxl);
>  
> -    if (qxl->vram_size < 16 * 1024 * 1024) {
> -        qxl->vram_size = 16 * 1024 * 1024;
> +    if (qxl->vram_size < 4096) {
> +        qxl->vram_size = 4096;
>      }
>      if (qxl->revision == 1) {
>          qxl->vram_size = 4096;

Just nitpick, you could make this
if (qxl->vram_size < 4096 || qxl->revision == 1) {
    qxl->vram_size = 4096;
}

> -- 
> 1.7.1
> 
>
Alon Levy Feb. 17, 2012, 7:28 p.m. UTC | #2
On Fri, Feb 17, 2012 at 04:10:30PM +0100, Gerd Hoffmann wrote:
> There is no reason to require a minimum size of 16 MB for the vram.
> Lower the limit to 4096 (one page).  Make it disapper completely would
> break guests.

NM my nitpick, more readable this way, ACK.

> ---
>  hw/qxl.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/hw/qxl.c b/hw/qxl.c
> index 5c6b556..4de4b8d 100644
> --- a/hw/qxl.c
> +++ b/hw/qxl.c
> @@ -1592,8 +1592,8 @@ static int qxl_init_common(PCIQXLDevice *qxl)
>      init_qxl_rom(qxl);
>      init_qxl_ram(qxl);
>  
> -    if (qxl->vram_size < 16 * 1024 * 1024) {
> -        qxl->vram_size = 16 * 1024 * 1024;
> +    if (qxl->vram_size < 4096) {
> +        qxl->vram_size = 4096;
>      }
>      if (qxl->revision == 1) {
>          qxl->vram_size = 4096;
> -- 
> 1.7.1
> 
>
diff mbox

Patch

diff --git a/hw/qxl.c b/hw/qxl.c
index 5c6b556..4de4b8d 100644
--- a/hw/qxl.c
+++ b/hw/qxl.c
@@ -1592,8 +1592,8 @@  static int qxl_init_common(PCIQXLDevice *qxl)
     init_qxl_rom(qxl);
     init_qxl_ram(qxl);
 
-    if (qxl->vram_size < 16 * 1024 * 1024) {
-        qxl->vram_size = 16 * 1024 * 1024;
+    if (qxl->vram_size < 4096) {
+        qxl->vram_size = 4096;
     }
     if (qxl->revision == 1) {
         qxl->vram_size = 4096;