Hi,

 When testing a tv card on a computer with
01:00.0 VGA compatible controller: VIA Technologies, Inc. Chrome9 HC IGP (rev 01) it will always lock. The attached patch/hack corrects the lock problem (still
need to find out what saa7134 card/tuner will "hopefully" work :-)
 If testing some other branch/release it is also required to patch
src/via_swov.c, but the change in svn trunk is better then just adding a
counter to the busy loop...

 BTW, Probably asking Xavier :-), what is the state of the VX800 support?
I tested it again, and now randr_branch is not working in a new model,
now a 1024x600 panel.
 It did work, to some extent with the 800x640 panel (I was expecting
openchrome developers would receive a test computer or something :-)...

Paulo

Index: src/via_video.c
===================================================================
--- src/via_video.c     (revision 596)
+++ src/via_video.c     (working copy)
@@ -1059,6 +1059,7 @@
 Flip(VIAPtr pVia, viaPortPrivPtr pPriv, int fourcc,
         unsigned long DisplayBufferIndex)
 {
+    int cnt = 1000;
     unsigned long proReg = 0;
 
     if (pVia->ChipId == PCI_CHIP_VT3259
@@ -1071,7 +1072,8 @@
         case FOURCC_RV15:
         case FOURCC_RV16:
         case FOURCC_RV32:
-            while ((VIDInD(HQV_CONTROL + proReg) & HQV_SW_FLIP));
+            while (cnt && (VIDInD(HQV_CONTROL + proReg) & HQV_SW_FLIP))
+               cnt--;
             VIDOutD(HQV_SRC_STARTADDR_Y + proReg,
                 pVia->swov.SWDevice.dwSWPhysicalAddr[DisplayBufferIndex]);
             VIDOutD(HQV_CONTROL + proReg,
Index: src/via_swov.c
===================================================================
--- src/via_swov.c      (revision 596)
+++ src/via_swov.c      (working copy)
@@ -2014,15 +2014,17 @@
                 }
                 DBG_DD(ErrorF(" done.\n"));
             } else {               /* CLE_C0 */
+               int cnt = 1000;
                 CARD32 volatile *HQVCtrl =
                         (CARD32 volatile *)(pVia->VidMapBase + HQV_CONTROL +
                                             proReg);
     
                 /* Check that HQV is idle */
                 DBG_DD(ErrorF("HQV control wf - %08lx\n", *HQVCtrl));
-                while (!(*HQVCtrl & HQV_IDLE)) {
+                while (cnt && !(*HQVCtrl & HQV_IDLE)) {
                     DBG_DD(ErrorF("HQV control busy - %08lx\n", *HQVCtrl));
                     usleep(1);
+                   cnt--;
                 }
 
                 if (pVia->VideoEngine == VIDEO_ENGINE_CME)
_______________________________________________
openchrome-users mailing list
openchrome-users@openchrome.org
http://wiki.openchrome.org/mailman/listinfo/openchrome-users
Main page:
http://www.openchrome.org
Wiki:
http://wiki.openchrome.org
User Forum:
http://wiki.openchrome.org/tikiwiki/tiki-view_forum.php?forumId=1

Reply via email to