[Libdlo] Display Link Driver On PowerPC

Henry Bausley hbausley at deltatau.com
Tue Aug 11 20:57:17 PDT 2009


A patch to get a correct display on a big endian powerpc system that
worked for me is below.

diff -rauw displaylink.orig/udlfb.c displaylink/udlfb.c
--- displaylink.orig/udlfb.c	2009-06-10 07:38:09.000000000 -0700
+++ displaylink/udlfb.c	2009-08-11 11:50:02.000000000 -0700
@@ -139,8 +139,13 @@
    while (rem && *src == pix0)
       rem--, rl++, src++;
      *dst++ = rl;
+#ifdef _BIG_ENDIAN
+    *dst++ = start[0];
+    *dst++ = start[1];
+#else
     *dst++ = start[1];
     *dst++ = start[0];
+#endif
     }
 
     return dst;
@@ -247,8 +252,13 @@
    *bufptr++ = thistime-firstdiff;
    // PUT COMPRESSION HERE
    for (j = firstdiff * 2; j < thistime * 2; j += 2) {
+#ifdef _BIG_ENDIAN
+            *bufptr++ = data[j];
+            *bufptr++ = data[j+1];
+#else
	    *bufptr++ = data[j + 1];
	    *bufptr++ = data[j];
+#endif
    }
  }
}


On Tue, 2009-08-04 at 14:42 +0200, Roberto De Ioris wrote:
> On Mon, 2009-08-03 at 16:21 -0700, Henry Bausley wrote:
> > Is it possible to have the display link driver work in gnome on a
> > PowerPC.  My colors seemed to be transposed.
> > 
> > What should be Green displays as red.
> > What should be Red displays as blue.
> > What should be Blue displays as green.
> > 
> > The PowerPC is BIG Endian.  I am actually trying to  add video to an
> > embedded PowerPC system that uses an AMCC 460EX.  Does anyone know
> > what to modify to fix this?
> > 
> 
> 
> I am hardly working on stabilizing the displaylink-mod driver.
> Endianess problems are all fixed in the current version.
> 
> I will release it as soon as possible.
> 
> 
> > 
> > My problem seems to be similar to the one posted below.
> > http://lists.freedesktop.org/archives/libdlo/2009-June/000206.html
> > 
> > 
> > _______________________________________________
> > Libdlo mailing list
> > Libdlo at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/libdlo
> 
> 



**********************************************************
Outbound scan for Spam or Virus by Barracuda at Delta Tau
**********************************************************


More information about the Libdlo mailing list