All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrey Volkov <avolkov@varma-el.com>
To: Rolf Offermanns <rolf.offermanns@gmx.net>
Cc: linux-fbdev-devel@lists.sourceforge.net
Subject: Re: Linux Framebuffer endian issues
Date: Mon, 24 Oct 2005 16:51:42 +0400	[thread overview]
Message-ID: <435CD8DE.8020906@varma-el.com> (raw)
In-Reply-To: <200510241357.46987.rolf.offermanns@gmx.net>

Hi Rolf,

Rolf Offermanns wrote:
> Hi Andrey,
> I have seen your thread about endian issues with the linux framebuffer system 
> and your SMI501 driver.
> 
> I am currently writing a driver for a SMI712 on a PCI card in a big endian 
> system (PPC440EP).
> 
> While 8bpp modes works quite well, I have wrong color in 16bpp truecolor 
> visual.
> 
> I guess this could be the same thing, you saw.
> 
> Did you solve the problem? 
No I defer solution of this problem :(, since 16 bpp doesn't critical
for me in nearest 2 months.

> If yes, would you be so kind to share your findings 
> with me? I tried lots of things like changing the offsets of the length 
> fields, but I was not successfull.

For me, was helpful offsets changing (I get right colors), but in this
case pixels are shifted :(.

Try something like this dirty hack:

--- fb.h.old	2005-10-24 16:46:34.000000000 +0400
+++ fb.h	2005-10-24 16:47:42.000000000 +0400
@@ -778,7 +778,7 @@
 #define fb_writeq sbus_writeq
 #define fb_memset sbus_memset_io

-#elif defined(__i386__) || defined(__alpha__) || defined(__x86_64__) ||
defined(__hppa__) || (defined(__sh__) && !defined(__SH5__)) ||
defined(__powerpc__)
+#elif defined(__i386__) || defined(__alpha__) || defined(__x86_64__) ||
defined(__hppa__) || (defined(__sh__) && !defined(__SH5__))

 #define fb_readb __raw_readb
 #define fb_readw __raw_readw
@@ -790,6 +790,16 @@
 #define fb_writeq __raw_writeq
 #define fb_memset memset_io

+#else if defined(__powerpc__)
+#define fb_readb readb
+#define fb_readw readw
+#define fb_readl readl
+#define fb_readq readq
+#define fb_writeb writeb
+#define fb_writew writew
+#define fb_writel writel
+#define fb_writeq writeq
+#define fb_memset memset_io
 #else

 #define fb_readb(addr) (*(volatile u8 *) (addr))

> 
> Thanks,
> Rolf
> 
> 

-- 
Regards
Andrey Volkov


-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information

           reply	other threads:[~2005-10-24 12:51 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <200510241357.46987.rolf.offermanns@gmx.net>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=435CD8DE.8020906@varma-el.com \
    --to=avolkov@varma-el.com \
    --cc=linux-fbdev-devel@lists.sourceforge.net \
    --cc=rolf.offermanns@gmx.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.