Daniel Laird wrote:
> I am writing a new GFX driver as indicated before.
> The System has more than one framebuffer and I want to be able to use both.
>
> I decided to look at how the davinci driver does this.
> It uses the 'devmem' system. However the driver provides functions for
> allocation / deallocation of surfaces, joining and leaving the surface pool
> etc.
>
> The problem is that it only seems to allow for allocation of surfaces on a
> layer and a layer id of 0.
davinci_osd_pool.c allocates surfaces for the primary layer in fb0.
davinci_video_pool.c allocated surfaces for the video layer in fb3(?).
> I cannot see what it does when this is not the case.
> i.e What happens when you create an offscreen surface using the davinci
> driver?
It's using the devmem pool for general purpose or window surfaces.
That is the video-phys and video-length option.
> I am new to this but i think that I need to extend the AllocateBuffer
> function in the davinci driver to cope with what to do when the surface type
> is not LAYER or layer id is not 0.
No, it should work like said.
> Am I correct. Where will an offscreen surface get allocated for the davinci
> driver i.e if you run df_andi where do the offscreen surfaces get allocated?
> I can't find where!
"dfbdump -a" shows this:
=======================| DirectFB 1.1.0 |=======================
(c) 2001-2007 The DirectFB Organization (directfb.org)
(c) 2000-2004 Convergence (integrated media) GmbH
------------------------------------------------------------
(*) DirectFB/Core: Multi Application Core. (2008-01-04 16:56)
(*) Fusion/SHM: NOT using MADV_REMOVE (2.6.10.0 < 2.6.19.2)! [0x02060a00]
(*) Direct/Thread: Running 'Fusion Dispatch' (MESSAGING, 582)...
(*) Davinci/Driver: Mapped fb0 with length 2488320 at 0x85800000 to 0x41d29000
(*) Davinci/Driver: Mapped fb1 with length 3760128 at 0x85400000 to 0x41f89000
(*) Davinci/Driver: Mapped fb2 with length 1658880 at 0x85e00000 to 0x4231f000
(*) Davinci/Driver: Mapped fb3 with length 3760128 at 0x85000000 to 0x424b4000
(*) Davinci/C64X: Low ARM 3897 / DSP 3811, High ARM 0 / DSP 0
(*) DirectFB/Graphics: Texas Instruments Davinci 0.4 (Telio AG)
(*) SaWMan/Config: Parsing config file '/etc/sawmanrc'.
DirectFB uptime: 00:00:24
-----------------------------[ Surfaces ]-------------------------------------
Reference FID . Refs Width Height Format Video System Capabilities
------------------------------------------------------------------------------
0x0000000c [ 1] : 2 992 x 32 ARGB 0k 124k premultiplied
0x0000000b [ 1] : 2 118 x 98 RGB32 0k 45k
0x0000000a [ 1] : 2 640 x 480 RGB16 600k 0k
0x00000009 [ 1] : 3 400 x 240 RGB16 187k 0k
0x00000008 [ 1] : 4 640 x 480 RGB16 2025k 0k video only
triple
0x00000005 [ 1] : 1 640 x 480 ARGB 0k 0k video only
------ ------
2812k 169k -> 2981k total
----------------------------------[ Contexts of Layer 0
]----------------------------------------
Reference FID . Refs Width Height Format Location on screen Regions
Active Info Level
-------------------------------------------------------------------------------------------------
0x00000006 [ 1] : 2 640 x 480 RGB16 0.0, 0.0 -> 1.0, 1.0 1
(*) PRIVATE N/A
0x00000003 [ 1] : 3 640 x 480 ARGB 0.0, 0.0 -> 1.0, 1.0 1
SHARED N/A
--------------------[ Surface Buffer Allocations in /dev/mem
]-------------------
Offset Length Width Height Format Role Up nA ID Usage Type /
Storage / Caps
---------------------------------------------------------------------------------
16162752 614400 640 x 480 RGB16 front * 1 0 PRIVATE
15970688 192000 400 x 240 RGB16 front * 1 0 PRIVATE
--------------------[ Surface Buffer Allocations in OSD Pool
]-------------------
Offset Length Width Height Format Role Up nA ID Usage Type /
Storage / Caps
---------------------------------------------------------------------------------
691200 691200 640 x 480 RGB16 back * 1 0 PRIVATE LAYER
EXTERNAL video only triple
0 691200 640 x 480 RGB16 front * 1 0 PRIVATE LAYER
EXTERNAL video only triple
1382400 691200 640 x 480 RGB16 idle * 1 0 PRIVATE LAYER
EXTERNAL video only triple
--------------------[ Surface Buffer Allocations in Video Pool
]-------------------
Offset Length Width Height Format Role Up nA ID Usage Type /
Storage / Caps
-----------------------------------------------------------------------------------
--------------------[ Surface Buffer Allocations in Shared Memory
]-------------------
Offset Length Width Height Format Role Up nA ID Usage Type /
Storage / Caps
--------------------------------------------------------------------------------------
--------------------[ Surface Buffer Allocations in System Memory
]-------------------
Offset Length Width Height Format Role Up nA ID Usage Type /
Storage / Caps
--------------------------------------------------------------------------------------
0 46256 118 x 98 RGB32 front * 1 0 PRIVATE
0 126976 992 x 32 ARGB front * 1 0 PRIVATE FONT
premultiplied
--------------------[ Surface Buffer Allocations in Preallocated Memory
]-------------------
Offset Length Width Height Format Role Up nA ID Usage Type /
Storage / Caps
--------------------------------------------------------------------------------------------
--
Best regards,
Denis Oliver Kropp
.------------------------------------------.
| DirectFB - Hardware accelerated graphics |
| http://www.directfb.org/ |
"------------------------------------------"
_______________________________________________
directfb-dev mailing list
[email protected]
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev