]> xenbits.xen.org Git - xenclient/ioemu.git/commitdiff
Read the resolution from PIPEASRC.
authorJean Guyader <jean.guyader@eu.citrix.com>
Wed, 25 Mar 2009 17:10:06 +0000 (17:10 +0000)
committerJean Guyader <jean.guyader@eu.citrix.com>
Wed, 25 Mar 2009 17:10:06 +0000 (17:10 +0000)
intel.c

diff --git a/intel.c b/intel.c
index f988c46cdf1b68b7fec4708cb6f7805a07c30e7d..a790d2f5c486d8a884223381722f973bcfe94062 100644 (file)
--- a/intel.c
+++ b/intel.c
@@ -29,8 +29,7 @@
 #define REG_DR_DSPBSTRIDE      0x71188
 #define REG_DR_PIPEBCONF       0x71008
 
-#define REG_DE_HBLANK_A                0x60004
-#define REG_DE_VBLANK_A                0x60010
+#define REG_DE_PIPEASRC                0x6001c
 
 extern int                      vga_passthrough;
 uint32_t                        guest_framebuffer;
@@ -408,8 +407,8 @@ void intel_focus(int focus)
     if (focus) {
         if (!is_linear()) {
            IntelPitch = intel_get_reg(REG_DR_DSPASTRIDE);
-           IntelX = (intel_get_reg(REG_DE_HBLANK_A) & 0xfff) + 1;
-           IntelY = (intel_get_reg(REG_DE_VBLANK_A) & 0xfff) + 1;
+           IntelX = ((intel_get_reg(REG_DE_PIPEASRC) >> 16) & 0xfff) + 1;
+           IntelY = (intel_get_reg(REG_DE_PIPEASRC) & 0xfff) + 1;
            INTEL_DEBUG("Resolution is %dx%d\n", IntelX, IntelY);
         }
         refresh = 1;