On Tue, 2005-10-18 at 13:48 +1300, Andre Renaud wrote:
> I've recently upgraded to a new VIA M10000 board, which appears to have
> a revised CLE266 chipset (it says it is revision 18). Now when I run
> mplayer, using directfb & YV12 overlays the colours are a bit off,
> vaguely pinkish tones seem to be everywhere.
> 
> Has anyone seen this before? I found mention to a similar problem with
> the rev 17 board, but the fix doesn't seem to work on the new one.
> Alternatively, does anyone know where abouts I can start looking in the
> gfxdrivers/unichrome directory to sort this out? 

After a bit of fiddling I found that the hwrev was not getting set
properly on this board, and it turns out that in driver_init_driver, in
unichrome.c, uc_probe_pci is only called if the hwregs are unable to be
memory mapped, which I believe is incorrect - it should be called
regardless. The following patch resolves this (applied from within
gfxdrivers/unichrome) - it simply moves the call to uc_probe_pci outside
of the "if (!hwregs)" statement.

Can anyone tell me if this is invalid in some way - should
dfb_gfxcard_map_mmio set the hwrev in some other way?

Index: unichrome.c
===================================================================
RCS file: /cvs/directfb/DirectFB/gfxdrivers/unichrome/unichrome.c,v
retrieving revision 1.1
diff -u -r1.1 unichrome.c
--- unichrome.c 14 Jun 2004 11:53:35 -0000      1.1
+++ unichrome.c 24 Oct 2005 22:21:01 -0000
@@ -443,9 +443,9 @@
           if ((int) ucdrv->hwregs == -1)
                return DFB_IO;
 
-          // Get hardware id and revision.
-          uc_probe_pci(ucdrv);
      }
+     // Get hardware id and revision.
+     uc_probe_pci(ucdrv);
 
      ucdrv->fifo = uc_fifo_create(UC_FIFO_SIZE);
      if (!ucdrv->fifo)

-- 
Bluewater Systems Ltd - ARM Technology Solutions Centre

       Andre Renaud                             Bluewater Systems Ltd
Phone: +64 3 3779127 (Aus 1 800 148 751)        Level 17, 119 Armagh St
Fax:   +64 3 3779135                            PO Box 13889
Email: [EMAIL PROTECTED]                 Christchurch
Web:   http://www.bluewatersys.com              New Zealand



_______________________________________________
directfb-dev mailing list
[email protected]
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev

Reply via email to