From: Jean Guyader Date: Tue, 22 Sep 2009 17:07:29 +0000 (+0100) Subject: XC-258: VM without GPU PT comes up in 640x480x4bit color, can't switch to other modes. X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=ce6bca3dc992e0dac04ea9dea441b4afa64439be;p=xenclient%2Fioemu-pq.git XC-258: VM without GPU PT comes up in 640x480x4bit color, can't switch to other modes. Fixed. --- diff --git a/master/intel b/master/intel index b7d469f..24b34de 100644 --- a/master/intel +++ b/master/intel @@ -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 +#include +#include @@ -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