]> xenbits.xensource.com Git - xenclient/ioemu.git/commitdiff
- Intel driver works.
authorJean Guyader <jean.guyader@eu.citrix.com>
Fri, 17 Oct 2008 13:04:07 +0000 (14:04 +0100)
committerJean Guyader <jean.guyader@eu.citrix.com>
Fri, 17 Oct 2008 13:04:51 +0000 (14:04 +0100)
dom0_driver.c
hw/pass-through.h
hw/pci.c
intel.c

index 3c8d51e4e1be739153cba2a9a05d0939d9adeb6c..20d1927e212138fed5a1c6ff91a11a30c6da53d7 100644 (file)
@@ -408,7 +408,7 @@ static void dom0_driver_event_init(const char *position)
     if (driver.event_nb == 0)
         return;
     
-    /* Register position */
+    /* Register the slot inside xenstore */
     DEBUG("Register the position inside xenstore\n");
     for (pos = 0; pos < DOM0_OUT; pos++)
         if (strcmp(str2pos[pos], position) == 0)
index b08af8cb1a6fe0ba829c978c8709775844883bb5..0f3d29b3d6dc01bf3ec15d0a2b831ea4a51af7b5 100644 (file)
@@ -35,7 +35,7 @@
 #endif
 
 /* Some compilation flags */
-// #define PT_DEBUG_PCI_CONFIG_ACCESS
+#define PT_DEBUG_PCI_CONFIG_ACCESS
 
 #define PT_MACHINE_IRQ_AUTO (0xFFFFFFFF)
 #define PT_VIRT_DEVFN_AUTO  (-1)
index f062122f04f177037a0a8330f6738ea503f6005f..f635c60d49208578a3006378d8a3b5fd242d162a 100644 (file)
--- a/hw/pci.c
+++ b/hw/pci.c
@@ -476,12 +476,14 @@ uint32_t pci_data_read(void *opaque, uint32_t addr, int len)
 
     if (vga_passthrough && pci_dev->devfn == 0x00) //Host Bridge
     {
+        val = 0;
+
         if (config_addr == 0x52) // GMCH
             val = pt_pci_host_read_word(0, 0, 0, 0x52);
-/*        if (config_addr == 0xa0) // Top Memory addrress
-            val = pt_pci_host_read_word(0, 0, 0, 0xa0);*/
-        if (config_addr == 0x02) // Device ID
-            val = pt_pci_host_read_byte(0, 0, 0, 0x02);
+        if (config_addr == 0xa0) // Top Memory addrress
+            val = pt_pci_host_read_byte(0, 0, 0, 0xa0);
+/*        if (config_addr == 0x02) // Device ID
+            val = pt_pci_host_read_byte(0, 0, 0, 0x02);*/
     }
     else
         val = pci_dev->config_read(pci_dev, config_addr, len);
diff --git a/intel.c b/intel.c
index 772ad5fd4b68e8204021e06cf08db71590300b2a..1e1df3d024e885e43f3743d0f02dfa7181e6d962 100644 (file)
--- a/intel.c
+++ b/intel.c
@@ -55,7 +55,7 @@ static inline void intel_blit_tile(DisplayState *ds, int x, int y)
 
     buff = (unsigned char *)(intel_mem + intel_get_reg(REG_DR_DSPASURF));
 
-    /* Copy the lines 0-3-4-7 */
+    /* Copy the solid lines */
     toffset = intel_get_tiled_offset(x, y);
     offset = intel_get_offset(ds, x * TileW, y * TileH);
     for (i = 0; i < 4; i++)
@@ -65,7 +65,7 @@ static inline void intel_blit_tile(DisplayState *ds, int x, int y)
         memcpy(&buff[to], &ds->data[o], TileW * 4);
     }
 
-    /* Copy the lines 1-2-5-6 */
+    /* Copy the dashed lines */
     toffset = to = intel_get_tiled_offset(x, y);
     offset = o = intel_get_offset(ds, x * TileW, y * TileH);
     for (i = 0; i < 4; i++)
@@ -97,20 +97,14 @@ static void intel_update_tiled(DisplayState *ds, int x, int y, int w, int h)
 
     for (i = yt; i < ht; i++)
         for (j = xt; j < wt; j++)
-            if (j >= 0 && j < 8 && i >= 0 && i < 96)
+            if (j >= 0 && j < 8 && i >= 0 && i < 96 &&
+                (i * TileH) < ds->height && (j * TileW) < ds->width)
                 intel_blit_tile(ds, j, i);
 }
 
 static void intel_update(DisplayState *ds, int x, int y, int w, int h)
 {
- //  if (intel_get_reg(REG_DR_DSPACNTR) & 0xA)
-       intel_update_tiled(ds, x, y, w, h);
-/*   else
-   {
-       unsigned char *buff = (unsigned char*)(intel_mem + intel_get_reg(REG_DR_DSPASURF));
-       INTEL_DEBUG("change ds->data %p\n", buff);
-       ds->data = buff;
-   }*/
+    intel_update_tiled(ds, x, y, w, h);
 }
 
 static void intel_resize(DisplayState *ds, int w, int h)
@@ -118,19 +112,9 @@ static void intel_resize(DisplayState *ds, int w, int h)
     ds->linesize = w * 4;
     ds->width = w;
     ds->height = h;
-//    if (intel_get_reg(REG_DR_DSPASURF) & 0xA)
-    {
-        INTEL_DEBUG("%d,%d tiled mode\n", w, h);
-        ds->data = realloc(ds->data, 1024 * ds->linesize);
-        memset(ds->data, 0, 1024* ds->linesize);
-    }
-/*    else
-    {
-       unsigned char *buff = (unsigned char*)(intel_mem + intel_get_reg(REG_DR_DSPASURF));
-       INTEL_DEBUG("%d,%d linear mode\n", w, h);
-       INTEL_DEBUG("change ds->data %p\n", buff);
-       ds->data = buff;
-    }*/
+    
+    ds->data = realloc(ds->data, w * ds->linesize);
+    memset(ds->data, 0, w * ds->linesize);
 }
 
 static void intel_refresh(DisplayState *ds)