Jason BARSTOW wrote:
> 
> 
> 
> Hi,
> 
> I have a custom system/gfx driver that is working fine for single-app use.
> To date I've not supported multi-app - but that may now be a requirement.
> 
> I was looking for pointers on how/what is required for this.

For the traditional drivers working with the framebuffer device system,
there are only some guidelines to follow, e.g. DeviceData is shared
between processes and DriverData is local to each.

> First I will outline my understanding of how multi-app works.
> 
> Each user (process) instance of dfb has its own system/gfxdriver backend.
> In a multi-app build, the first instance becomes the master instance and
> all subsequent become slaves.
> If we consider a normal system/gfxdriver set up -
>       - each instance maps the whole framebuffer into its own process
> space.
>       - each instance has its own set of MMIO registers of accelerated
> graphic ops.

Correct.

>       - allocations of surfaces are marshalled via the master instance.

The surface manager code runs in any process. Only the destructor
of surface objects in executed in the master.

>       - any instance can directly issue *software* operations.
>       - any instance can directly issue *hardware* operations, but
> synchronisation/exclusive access to the hardware is marshalled.

Locking is done. All processes call the graphics driver directly, yes.

>       - the layer providing the shared memory, locking, calls back to
> master etc is the Fusion library.
> 
> Is that a reasonable summary?

Yes.

> For my implementation, I'd like to have each instance issue accelerated
> graphic ops via the master instance - i.e. via a call through Fusion.  (my
> implementation doesn't use MMIO).
> Is that viable - can I just have my gfxdriver punt calls through the Fusion
> layer - are there any existing gfxdrivers that do this?

You can use FusionCall to delegate the requests to the master process.

Every system module gives an examples of this. Calls are handled in the
Fusion Dispatch thread of the master. They can be synchronous with a
return value or asynchronous without blocking.

You can pass an integer and a pointer which are best used as a command
and shared memory argument.

-- 
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

Reply via email to