Discussion:
[directfb-users] layers capabilities
Alla N
2012-07-31 13:09:12 UTC
Permalink
Hello,

When I check the DLCAPS_OPACITY flag value, I see that it isn't set.
Is it a configurable property? How can I change the flag's value? (my
hardware should support this)

Thanks,

Alla.
egor.zhuk
2012-07-31 13:27:20 UTC
Permalink
Hi, Alla
Post by Alla N
Hello,
When I check the DLCAPS_OPACITY flag value, I see that it isn't set.
Is it a configurable property? How can I change the flag's value? (my
hardware should support this)
Thanks,
Alla.
_______________________________________________
directfb-users mailing list
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-users
As I know, DFBDisplayLayerCapabilities is not configurable property, it
can only be get using IDirectFBDisplayLayer::GetDescription function.
You can use IDirectFBDisplayLayer::SetConfiguration function for set new
configuration with DLOP_OPACITY flag (part of DFBDisplayLayerOptions enum)
enabled in DFBDisplayLayerConfig::options field.
--
BR,
Egor Zhuk
Alla N
2012-08-01 08:24:07 UTC
Permalink
Hi Egor,

Thank you for your answer. I did what you suggested

DFBDisplayLayerDescription ret_desc;
DFBDisplayLayerConfig dlc;

dfb->GetDisplayLayer( dfb, 0, &videolayer );

dlc.flags = DLCONF_OPTIONS;
dlc.options = DLOP_OPACITY;
videolayer->SetConfiguration( videolayer, &dlc );

videolayer->GetDescription(videolayer, &ret_desc);

if (ret_desc.caps & DLCAPS_OPACITY)
printf( " - Supports blending based on global alpha factor.\n" );

but the flag value wasn't changed. Am I doing something wrong?

Thanks.
Alla N
2012-08-01 11:02:24 UTC
Permalink
I work with TI 8168 card of the DaVinci family. I use the TI's ti81xxfb driver.
I found the videoInitLayer() (.InitLayer function) in davinci_video.c file.
If I understood you right I should add there DLCAPS_OPACITY option.

Why it didn't work with SetConfig function? Maybe something else
wasn't configured properly?

Thanks.



On Wed, Aug 1, 2012 at 1:15 PM, haithem rahmani
Hi,
have you written your own system driver?
if yes then you should specify that flag in your .InitLayer function.
have a look for example, at besInitLayer() in
"gfxdrivers/matrox/matrox_bes.c"
if you are using the common fbdev driver, then you have to adjust a bit to
suit your hadrware spec.
HTH
regards
Haithem.
Post by Alla N
Hi Egor,
Thank you for your answer. I did what you suggested
DFBDisplayLayerDescription ret_desc;
DFBDisplayLayerConfig dlc;
dfb->GetDisplayLayer( dfb, 0, &videolayer );
dlc.flags = DLCONF_OPTIONS;
dlc.options = DLOP_OPACITY;
videolayer->SetConfiguration( videolayer, &dlc );
videolayer->GetDescription(videolayer, &ret_desc);
if (ret_desc.caps & DLCAPS_OPACITY)
printf( " - Supports blending based on global alpha factor.\n" );
but the flag value wasn't changed. Am I doing something wrong?
Thanks.
_______________________________________________
directfb-users mailing list
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-users
--
Never say that's "impossible", the word itself says "I'm Possible"
egor.zhuk
2012-08-01 11:18:38 UTC
Permalink
Hi, Alla
Post by Alla N
I work with TI 8168 card of the DaVinci family. I use the TI's ti81xxfb driver.
I found the videoInitLayer() (.InitLayer function) in davinci_video.c file.
If I understood you right I should add there DLCAPS_OPACITY option.
Why it didn't work with SetConfig function? Maybe something else
wasn't configured properly?
Thanks.
On Wed, Aug 1, 2012 at 1:15 PM, haithem rahmani
Hi,
have you written your own system driver?
if yes then you should specify that flag in your .InitLayer function.
have a look for example, at besInitLayer() in
"gfxdrivers/matrox/matrox_bes.c"
if you are using the common fbdev driver, then you have to adjust a bit to
suit your hadrware spec.
HTH
regards
Haithem.
Post by Alla N
Hi Egor,
Thank you for your answer. I did what you suggested
DFBDisplayLayerDescription ret_desc;
DFBDisplayLayerConfig dlc;
dfb->GetDisplayLayer( dfb, 0, &videolayer );
dlc.flags = DLCONF_OPTIONS;
dlc.options = DLOP_OPACITY;
videolayer->SetConfiguration( videolayer, &dlc );
videolayer->GetDescription(videolayer, &ret_desc);
if (ret_desc.caps & DLCAPS_OPACITY)
printf( " - Supports blending based on global alpha factor.\n" );
but the flag value wasn't changed. Am I doing something wrong?
Thanks.
_______________________________________________
directfb-users mailing list
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-users
--
Never say that's "impossible", the word itself says "I'm Possible"
_______________________________________________
directfb-users mailing list
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-users
First, try to get existing layer configuration using
IDirectFBDisplayLayer::GetConfiguration and modify it:
DFBDisplayLayerConfig dlc;
videolayer->GetConfiguration(videolayer, &dlc);
dlc.flags |= DLCONF_OPTIONS;
dlc.options |= DLOP_OPACITY;

and before SetConfiguration call, do
DFBDisplayLayerConfigFlags errorFlags;
videolayer->TestConfiguration(videolayer, &dlc, &errorFlags);

Using errorFlags variable you will be able to see, if some setup fails.
--
BR,
Egor Zhuk
Alla N
2012-08-01 12:20:03 UTC
Permalink
Egor,

I get the DFB_BUSY error, what does it mean?
egor.zhuk
2012-08-01 12:53:32 UTC
Permalink
Post by Alla N
Egor,
I get the DFB_BUSY error, what does it mean?
According the documentation, SetConfiguration function may be used only in
exclusive or administrative mode. Check your display layer cooperative
level, maybe it must be changed to DLSCL_EXCLUSIVE or
DLSCL_ADMINISTRATIVE, depending on your purposes.
--
BR,
Egor Zhuk
Alla N
2012-08-01 13:30:39 UTC
Permalink
Even if I call TestConfiguration function before I call
SetConfiguration I get the error from TestConfiguration.

dfb->GetDisplayLayer( dfb, 0, &videolayer );

ret = videolayer->SetCooperativeLevel( videolayer, DLSCL_EXCLUSIVE );

videolayer->TestConfiguration(videolayer, &dlc, &errorFlags);
Post by egor.zhuk
Post by Alla N
Egor,
I get the DFB_BUSY error, what does it mean?
According the documentation, SetConfiguration function may be used only in
exclusive or administrative mode. Check your display layer cooperative
level, maybe it must be changed to DLSCL_EXCLUSIVE or DLSCL_ADMINISTRATIVE,
depending on your purposes.
--
BR,
Egor Zhuk
Alla N
2012-08-02 07:23:05 UTC
Permalink
Where should I add it?

I ran ./dfbinfo and I got

~~~~~~~~~~~~~~~~~~~~~~~~~~| DirectFB 1.4.5 |~~~~~~~~~~~~~~~~~~~~~~~~~~
(c) 2001-2009 The world wide DirectFB Open Source Community
(c) 2000-2004 Convergence (integrated media) GmbH
----------------------------------------------------------------

(*) DirectFB/Core: Single Application Core. (2012-07-03 12:11)
(*) Direct/Memcpy: Using armasm_memcpy()
(*) Direct/Thread: Started 'VT Switcher' (-1) [CRITICAL OTHER/OTHER
0/0] <8388608>...
(*) Direct/Thread: Started 'VT Flusher' (-1) [DEFAULT OTHER/OTHER 0/0]
<8388608>...
(*) DirectFB/FBDev: Found 'ti81xxfb' (ID 0) with frame buffer at
0xb0b00000, 24576k (MMIO 0x00000000, 0k)
(*) Direct/Thread: Started 'Linux Input' (-1) [INPUT OTHER/OTHER 0/0]
<8388608>...
(*) DirectFB/Input: USB Optical Mouse 0.1 (directfb.org)
(*) Direct/Thread: Started 'Hotplug with Linux Input' (-1) [INPUT
OTHER/OTHER 0/0] <8388608>...
(*) DirectFB/Input: Hot-plug detection enabled with Linux Input Driver
(*) Direct/Thread: Started 'PS/2 Input' (-1) [INPUT OTHER/OTHER 0/0]
<8388608>...
(*) DirectFB/Input: IMPS/2 Mouse 1.0 (directfb.org)
(*) Direct/Thread: Started 'Keyboard Input' (-1) [INPUT OTHER/OTHER
0/0] <8388608>...
(*) DirectFB/Input: Keyboard 0.9 (directfb.org)
(*) DirectFB/Graphics: Generic Software Rasterizer 0.6 (directfb.org)
(*) DirectFB/Core/WM: Default 0.3 (directfb.org)


Is this line is correct ? (*) DirectFB/Graphics: Generic Software
Rasterizer 0.6 (directfb.org)
Shouldn't it be something like (*) DirectFB/Graphics: DaVinci ...?

One more thing is about directfbrc file, I put it in /etc folder, but
it seems like it isn't being read.
Can this be the problem? Where should I put it?

On Wed, Aug 1, 2012 at 5:13 PM, haithem rahmani
check the 'videoSetRegion()' it doesn't check on the "CLRCF_OPTIONS"
so the DLCAPS_OPTIONS is not supported unless you'll add it.
regards
Haithem.
Post by Alla N
Even if I call TestConfiguration function before I call
SetConfiguration I get the error from TestConfiguration.
dfb->GetDisplayLayer( dfb, 0, &videolayer );
ret = videolayer->SetCooperativeLevel( videolayer, DLSCL_EXCLUSIVE );
videolayer->TestConfiguration(videolayer, &dlc, &errorFlags);
Post by egor.zhuk
Post by Alla N
Egor,
I get the DFB_BUSY error, what does it mean?
According the documentation, SetConfiguration function may be used only in
exclusive or administrative mode. Check your display layer cooperative
level, maybe it must be changed to DLSCL_EXCLUSIVE or
DLSCL_ADMINISTRATIVE,
depending on your purposes.
--
BR,
Egor Zhuk
_______________________________________________
directfb-users mailing list
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-users
--
Never say that's "impossible", the word itself says "I'm Possible"
Alla N
2012-08-02 15:54:27 UTC
Permalink
Hi,

Davinci driver must to work with devmem system or it can work with fbdev also?

Thanks,
Alla.

Loading...