Sven Luther wrote:
> On Wed, May 28, 2008 at 08:07:10PM +0200, Denis Oliver Kropp wrote:
>> Brian G. Rhodes wrote:
>> I don't think a new kernel graphics interface should be added, instead using
>> UIO to access MMIO, DMA and IRQs would be enough and implement most of the
>> graphics driver in user space. Downside is to loose the kernel console which
>> you usually don't need on an embedded device...
>>
>> For acceleration and DMA/IRQ based programming, I still need to check if a
>> user space approach would be enough. So far I always handled IRQs in kernel
>> space for timing/performance reasons...
> 
> Euh, well, i think the X / OpenGL approach showed us that to do DMA/IRQ,
> you need a kernel module, and what X/OpenGL is the DRI thingy.

In some cases performance might be sufficient if IRQs are just routed to user
space and handled in a real time thread. You can program the DMA engine from
user space, it's just the IRQ that's only arriving in kernel space.

> Would it make sense for directfb to re-use this selfsame infrasturcture,
> which already exists in the kernel, and is used by X, so kind of
> guaranteed to be available for many graphic cards ? 

If there are drivers within this framework that we could use it makes sense,
but for writing support for a new chip one has to consider the overhead of
using a framework vs benefits. Overhead could be in time to develop and/or at
runtime. Benefits could be safety by relying on proven core code, but also 
saving
time to develop by having to write less code.

> But maybe it is too complex or something ? 

It depends on what you need in kernel space. Have a look at the SH7722 kernel
module. I'm not sure if the benefits of DRI would be that big to compensate for
the overhead or limitations. E.g. this driver manages a self running DMA queue,
where in the ideal case you never have to do any system call, but just append 
data
to the DMA buffer from user space.

http://git.directfb.org/?p=core/DirectFB.git;a=blob;f=gfxdrivers/sh7722/kernel-module/sh7722gfx.c

This driver handles different interrupt sources, provides DMA for the 
accelerator
as mentioned above and implements a minor portion of JPEG encoding and decoding 
with
the rest done in user space.

-- 
Best regards,
   Denis Oliver Kropp

.------------------------------------------.
| DirectFB - Hardware accelerated graphics |
| http://www.directfb.org/                 |
"------------------------------------------"

_______________________________________________
directfb-users mailing list
directfb-users@directfb.org
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-users

Reply via email to