R: R: xfbdev alpha channel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> On Mon, 27 Aug 2007, Tabaro Toni wrote:
> > On Mon, 27 Aug 2007, Marc Aurele La France wrote:
> >> On Mon, 27 Aug 2007, Tabaro Toni wrote:
> >>> Hi, i have succesfully cross-compiled the xfree 4.7.0 on 
> a embedded 
> >>> board with mipsel processor and framebuffer on a 2.6.12 linux 
> >>> environment, with the framebuffer running at 960x1080x32 
> ARGB8888 or
> >>> 1280x720x16 ARGB1555.
> >>> The Xfbdev program start and work (if i export a display 
> on a i386 
> >>> machine and start xclock the xclock program work).
> >>> The problem is: to see the image on the board i must run 
> a program 
> >>> in background which set the alpha bit to 1 (on the 
> 1280x720x16 ARGB 
> >>> 1555 frame buffer) or byte to 0xff (in the case of 960x1080x32 
> >>> ARGB8888), otherwise the screen remains black.
> 
> >> That is an oddball alpha implementation.  What adapter is 
> this?  Does 
> >> the
> >> (text) screen appear correctly before starting Xfbdev?
> 
> > A im not using the text mode, on that embedded system there is only 
> > console /dev/ttyS0 and framebuffer is on graphics hardware. 
>  This is 
> > an implementation on one stb, the graphic plane is over a 
> video plane 
> > and the alpha is needed for seeing the video under graphics
> 
> That's not the point.  Xfbdev will not function at all 
> without a kernel driver for your adapter.  Therefore, the 
> kernel must be displaying something before the X server 
> starts, unless that too is being blacked out.  So, again, 
> what does the screen show before starting Xfbdev?

The screen is not showing anything before Xfbdev becouse there is no
console on framebuffer, the boot is on console /dev/ttyS0 and the 1st
program using framebuffer is Xfbdev.

The kernel driver for framebuffer is working and fbset show:
mode "960x1080-80"
        # D: 103.691 MHz, H: 86.410 kHz, V: 80.009 Hz
        geometry 960 1080 960 1080 32
        timings 9644 120 0 0 0 120 0
        accel false
        rgba 8/16,8/8,8/0,8/24
endmode

I have made a program which write some rgb rectangles on the
framebuffer, the screen show these rectangles, but when i start Xfbdev
the screen become full transparent, in other part of this email every
time i have written "black screen" i made a mistake, the screen is "full
transparent", i see black becouse  before the underling plane was black,
now i have a mpeg video looping on that plane and i see the video when
graphic is transparent.

> >>> I think the Xfbdev can't handle the alpha channel 
> correctly, leaving 
> >>> it to 0.
> >>> I dont need the translucency or other features, only see 
> the image 
> >>> on screen, maybe i can patch the framebuffer code to 
> leave the alpha 
> >>> at fixed value, is someone able to help me by suggest the part of 
> >>> code to patch?
> >>> I searched on the programs/Xserver/hw/tinyx/fbdev/ or 
> >>> programs/Xserver/fb/ path, but i am not able to 
> understand how the 
> >>> alpha is handled :-(
> 
> >> The X server does not touch the alpha channel, but uses whatever 
> >> applications provide in that field.
> 
> > Maybe i have not explained well the problem, i try on another way:
> > When normally i start "Xfbdef -ac" on another board with different 
> > processor (powerpc) the screen show the X tiled background with the 
> > xcursor, on board with mips the "Xfbdev -ac" show black 
> screen but is 
> > running fine.
> > If i change the alpha channel bit directly to the 
> frambuffer with a c 
> > program and with the Xfbdev program running i see the X 
> bacground and 
> > the mouse, if this c program repeat that function every 
> second the x 
> > is running refreshing itself every second (every time my 
> prog touch the alpha bit).
> > This without an X application running, if the X application 
> is running 
> > i see the app on screen only when my c program do the alpha bit set.
> 
> > I think the Xfbdev on framebuffer is tested on a 
> framebuffer without 
> > real alpha channel, on PC, my boards are embedded board with real 
> > alpha used to create holes on graphics needed for seeing 
> underlining video plane over it.
> 
> .... which means this is a problem with your adapter, not 
> with Xfbdev.  Xfbdev is designed to use a dumb framebuffer 
> through a kernel interface.  No alpha channel support 
> whatsoever.  Xfbdev is intentionally too generic to have 
> knowledge of the chipset specifics necessary to control an 
> alpha channel.

I have a doubt: the small program i have made for testing the
framebuffer for writing something on the screen must set the alpha byte
to 0xff, maybe this is not the right convention?
I mean: is 0x00 for alpha full trasparency and 0xff opaque or the
opposite? If is opposite i simply change the framefuffer driver and X
start working rigth.

> 
> As far as I can tell, your options are:
> 
> 1) There might be a jumper or firmware/BIOS setting that 
> reverses the meaning of the alpha channel, or disables it.
> 
> 2) There might be an ioctl you can use (in a modified Xfbdev) 
> to do so.
> 
> 3) There might be another X server more specific to your 
> adapter, with an option to control the alpha channel.  What 
> does `lspci` say?
> 
> 4) You say the adapter supports depths 15/16 and 24/32, and 
> imply you have some means of switching between them.  Does 
> the adapter support depth 24/24 (i.e. eliminate the alpha 
> channel alltogether)?

I need the alpha channel, my application (not X based, i need X only for
a mozilla browser) when run has to make "holes" on its gui for showing
underlining scaled video.

> 
> 5) You might be stuck with your program to invert the alpha channel.
> 
> Marc.
> 
Pierantonio.

_______________________________________________
XFree86 mailing list
XFree86@xxxxxxxxxxx
http://XFree86.Org/mailman/listinfo/xfree86

[Index of Archives]     [X Forum]     [Xorg]     [XFree86 Newbie]     [IETF Announce]     [Security]     [Font Config]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux Kernel]

  Powered by Linux