]> xenbits.xensource.com Git - xenclient/ioemu-pq.git/commitdiff
XC-258: VM without GPU PT comes up in 640x480x4bit color, can't switch to other modes.
authorJean Guyader <jean.guyader@eu.citrix.com>
Tue, 22 Sep 2009 17:07:29 +0000 (18:07 +0100)
committerJean Guyader <jean.guyader@eu.citrix.com>
Tue, 22 Sep 2009 17:07:29 +0000 (18:07 +0100)
Fixed.

master/intel

index b7d469fd5446171164e882a264085dce120c8c75..24b34def8183fbf1d8a6e3df056b630bcbf7d030 100644 (file)
@@ -33,7 +33,7 @@ index 97214c0..8c9b09b 100644
 +void intel_display_init(DisplayState *ds);
  #endif
 diff --git a/dom0_driver.c b/dom0_driver.c
-index 0988c6f..1aa5952 100644
+index 92f6b17..7f735a9 100644
 --- a/dom0_driver.c
 +++ b/dom0_driver.c
 @@ -43,6 +43,7 @@
@@ -44,7 +44,7 @@ index 0988c6f..1aa5952 100644
  
  static void dom0_driver_state_change(const char *path, void *opaque);
  static void dom0_driver_command(const char *path, void *opaque);
-@@ -692,6 +693,11 @@ void dom0_driver_init(const char *position)
+@@ -694,6 +695,11 @@ void dom0_driver_init(const char *position)
          driver.enter = intel_enter;
          driver.leave = intel_leave;
      }
@@ -215,10 +215,10 @@ index 90bd544..a2b8744 100644
      vga_update_display(s);
 diff --git a/intel.c b/intel.c
 new file mode 100644
-index 0000000..df9ebf7
+index 0000000..dbf08d2
 --- /dev/null
 +++ b/intel.c
-@@ -0,0 +1,517 @@
+@@ -0,0 +1,518 @@
 +#include <stdio.h>
 +#include <stdlib.h>
 +#include <stdint.h>
@@ -259,7 +259,7 @@ index 0000000..df9ebf7
 +
 +extern int                      vga_passthrough;
 +uint32_t                        guest_framebuffer;
-+int                             intel_output;
++int                             intel_output = 2;
 +static int                      display = 0;
 +
 +static int                      mmio_fd = -1;
@@ -498,7 +498,7 @@ index 0000000..df9ebf7
 +    if (intel_have_focus)
 +    {
 +        if (ds_get_width(ds) == IntelX && ds_get_height(ds) == IntelY &&
-+                is_buffer_shared(ds->surface))
++                is_buffer_shared(ds->surface) && lds->surface)
 +        {
 +            if (!map_size)
 +            {
@@ -518,7 +518,7 @@ index 0000000..df9ebf7
 +    } else {
 +        if (map_size)
 +            unset_fb_mapping();
-+        intel_output = 1;
++        intel_output = 2;
 +    }
 +}
 +
@@ -634,12 +634,15 @@ index 0000000..df9ebf7
 +        memset((uint8_t *)(intel_mem + intel_get_surface()), 0,
 +                IntelX * IntelY * 4);
 +    }
-+    vga_hw_invalidate();
 +    vga_hw_update();
 +    intel_check_linear();
++    vga_hw_invalidate();
 +
-+    INTEL_DEBUG("intel_focus %d, x=%d, y=%d, stride=%d\n",
-+            focus, IntelX, IntelY, IntelPitch);
++    if (focus == 0)
++        intel_output = 2;
++
++    INTEL_DEBUG("intel_focus %d, x=%d, y=%d, stride=%d, intel_output=%d\n",
++            focus, IntelX, IntelY, IntelPitch, intel_output);
 +}
 +
 +int intel_enter(void)
@@ -732,8 +735,6 @@ index 0000000..df9ebf7
 +        ds->surface = surf;
 +        dpy_resize(ds);
 +    }
-+
-+    intel_output = 1;
 +    lds = ds;
 +}
 diff --git a/vl.c b/vl.c