linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* framebuffer swap endianess
@ 2008-01-22 15:46 Angelo
  2008-01-22 16:45 ` Josh Boyer
  2008-01-23  7:39 ` Roman Fietze
  0 siblings, 2 replies; 7+ messages in thread
From: Angelo @ 2008-01-22 15:46 UTC (permalink / raw)
  To: linuxppc-embedded

[-- Attachment #1: Type: text/plain, Size: 739 bytes --]

Hi, i'm angelo.

I have just create a framebuffer for an embedded system:
- powerpc (little endian)  with  a GPU (big endian).

I'm working on linux 2.6.22

When i try to execute Xfbdev, it starts but with wrong colors.
I need to swap the RGB format (RRRRRGGGGGGBBBBB) to BGR, respecting the endianess (GGGRRRRRBBBBBGGG).

I know that X loads with some ioctl, the principal settings through framebuffer.
But i'm not sure if framebuffer can inform it on the RGB format.

I also tried to change something on cmap, but nothing changes on display;

So, i hope you can help me. 

Many thanks.


       
---------------------------------

---------------------------------
L'email della prossima generazione? Puoi averla con la nuova Yahoo! Mail

[-- Attachment #2: Type: text/html, Size: 952 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: framebuffer swap endianess
  2008-01-22 15:46 framebuffer swap endianess Angelo
@ 2008-01-22 16:45 ` Josh Boyer
  2008-01-23  7:39 ` Roman Fietze
  1 sibling, 0 replies; 7+ messages in thread
From: Josh Boyer @ 2008-01-22 16:45 UTC (permalink / raw)
  To: Angelo; +Cc: linuxppc-embedded

On Tue, 22 Jan 2008 16:46:47 +0100 (CET)
Angelo <s104259@yahoo.it> wrote:

> Hi, i'm angelo.
> 
> I have just create a framebuffer for an embedded system:
> - powerpc (little endian)  with  a GPU (big endian).

I think you have those backwards?  PowerPC is big-endian...

josh

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: framebuffer swap endianess
  2008-01-22 15:46 framebuffer swap endianess Angelo
  2008-01-22 16:45 ` Josh Boyer
@ 2008-01-23  7:39 ` Roman Fietze
  2008-01-23 16:39   ` Kumar Gala
  1 sibling, 1 reply; 7+ messages in thread
From: Roman Fietze @ 2008-01-23  7:39 UTC (permalink / raw)
  To: linuxppc-embedded

Hello ANgelo,

On Tuesday 22 January 2008 16:46:47 Angelo wrote:

> I have just create a framebuffer for an embedded system:
> - powerpc (little endian)  with  a GPU (big endian).

Are you sure? Isn't it the other way around?

> When i try to execute Xfbdev, it starts but with wrong colors.  I
> need to swap the RGB format (RRRRRGGGGGGBBBBB) to BGR, respecting
> the endianess (GGGRRRRRBBBBBGGG).

We modified the X Server and swapped when transferring from the shadow
buffer to the video buffer. That cured all our problems. This was on
the 2.4.25 from DENX and with Xfree86.

Other modifications like changing the RGB masks for the display/screen
only helped partwise, because some applications just ignored that when
using some image formats.


Roman

=2D-=20
Roman Fietze Telemotive AG B=FCro M=FChlhausen

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: framebuffer swap endianess
  2008-01-23  7:39 ` Roman Fietze
@ 2008-01-23 16:39   ` Kumar Gala
  0 siblings, 0 replies; 7+ messages in thread
From: Kumar Gala @ 2008-01-23 16:39 UTC (permalink / raw)
  To: Roman Fietze; +Cc: linuxppc-embedded


On Jan 23, 2008, at 1:39 AM, Roman Fietze wrote:

> Hello ANgelo,
>
> On Tuesday 22 January 2008 16:46:47 Angelo wrote:
>
>> I have just create a framebuffer for an embedded system:
>> - powerpc (little endian)  with  a GPU (big endian).
>
> Are you sure? Isn't it the other way around?

we are sure.  Linux only supports PPC in big endian mode.

  - k

^ permalink raw reply	[flat|nested] 7+ messages in thread

* framebuffer swap endianess
@ 2008-01-24 14:27 Angelo
  2008-01-25  6:47 ` Roman Fietze
  0 siblings, 1 reply; 7+ messages in thread
From: Angelo @ 2008-01-24 14:27 UTC (permalink / raw)
  To: linuxppc-embedded

[-- Attachment #1: Type: text/plain, Size: 698 bytes --]

Hello all, 

many thanks for your answer.

Modify the X server is a good idea.
I'd just tried to understand the exact place to make changes. Adding many "printf" to understand it.
But it's very complex.

>We modified the X Server and swapped when transferring from the shadow
>buffer to the video buffer. That cured all our problems. 

Could you tell me where is the exact place to do this? in some files like fbdev.c or other?

>This was on the 2.4.25 from DENX and with Xfree86.

Sorry but i don't understand this sentence.

Anyway many thanks.


       
---------------------------------

---------------------------------
L'email della prossima generazione? Puoi averla con la nuova Yahoo! Mail

[-- Attachment #2: Type: text/html, Size: 910 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: framebuffer swap endianess
  2008-01-24 14:27 Angelo
@ 2008-01-25  6:47 ` Roman Fietze
  2008-01-25 10:55   ` Clemens Koller
  0 siblings, 1 reply; 7+ messages in thread
From: Roman Fietze @ 2008-01-25  6:47 UTC (permalink / raw)
  To: linuxppc-embedded

Hello Angelo,

Question to the mailing list readers: is it ok to post an xfree86 or
xorg patch in this mailing list (about 9KiB), or would it be better to
mail that patch to Angelo directly? Thanks.


On Thursday 24 January 2008 15:27:12 Angelo wrote:

> Modify the X server is a good idea.

Sure, if you know where. It took us some time to find "the" correct
place. But see below. :)

> Could you tell me where is the exact place to do this? in some files like
> fbdev.c or other?

The major changes are inside programs/Xserver/miext/shadow/shpacked.c
of either the xorg or xfree86 version of the X server. The swap is
done when copying the data from the shadow buffer to the video memory.

Another place is programs/Xserver/hw/xfree86/drivers/fbdev/fbdev.c,
but here we just setup the Screen correctly, so our new swapping
shadow buffer update route will be used.

> >This was on the 2.4.25 from DENX and with Xfree86.
>
> Sorry but i don't understand this sentence.

We were using Linux 2.4.25 for the PowerPC from DENX and the XFree86 X
Server. The kernel version shouldn't be a problem at all, and I think
the patches should work on either X Server version, Xorg or Xfree86.


Roman

=2D-=20
Roman Fietze Telemotive AG B=FCro M=FChlhausen

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: framebuffer swap endianess
  2008-01-25  6:47 ` Roman Fietze
@ 2008-01-25 10:55   ` Clemens Koller
  0 siblings, 0 replies; 7+ messages in thread
From: Clemens Koller @ 2008-01-25 10:55 UTC (permalink / raw)
  To: Roman Fietze; +Cc: linuxppc-embedded

Roman Fietze schrieb:
> Hello Angelo,
> 
> Question to the mailing list readers: is it ok to post an xfree86 or
> xorg patch in this mailing list (about 9KiB), or would it be better to
> mail that patch to Angelo directly? Thanks.

I'm interested in it. Please, at least, CC me. :-)
I was having similar issues with my SM501/SM502 on MPC8540/MPC8548.
But due to other projects I had to slow down a bit that area.

Thank you,

Clemens

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2008-01-25 10:55 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-22 15:46 framebuffer swap endianess Angelo
2008-01-22 16:45 ` Josh Boyer
2008-01-23  7:39 ` Roman Fietze
2008-01-23 16:39   ` Kumar Gala
  -- strict thread matches above, loose matches on Subject: below --
2008-01-24 14:27 Angelo
2008-01-25  6:47 ` Roman Fietze
2008-01-25 10:55   ` Clemens Koller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).