Question about the video device driver
I'm a newbie in the X domain,
where can I get the information about showfb?
As I know, there is no hardware for MPC823 FADS that can do the conversion from RGB data stored in system memory,
we must do it using software.
So, where I should start?
Any suggestion?
Quoted 33 lines · Geert Uytterhoeven
Quoted 9 lines · Shuangjun Zhu
Quoted 6 lines
The video of MPC823 FADS board only support YCbYCr mode,
so how can I write a device driver for the video of MPC823 FADS board, to enable the X?Any suggestion?
Thanks in advanced.Quoted 6 lines
This sounds like an interesting project.
How many bits per pixel are available? If it's not too much you can create a staticcolor visual and consider it to be a simple paletted video mode (with a static palette). However, IIRC, XFree86 doesn't support staticcolor hardware, but support for that is probably closer than support for YCbCr.
We support static color visuals just fine. But there will be
a problem if the hardware doesn't have a macroblock size of 1x1. It's required that you can get read the data back without losing information. If you are sharing chroma between pixels that's not going to work.Quoted 8 lines
I see you write YCbYCr? So the color components are subsampled like digital broadcast video? In that case things become more complex because of the different resolutions for the luminance and chrominance channels.
All this combined, I think the best solution is to use the virtual frame buffer feature of XFree86 3.9.x (draw in a piece of memory as large as the screen) and update the screen image by converting the changed parts from RGB to YCbYCr.
Quoted 10 lines
Yes, shadowfb should work fine for this if the hardware can do the
conversion from RGB data stored in system memory.Mark.
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
Quoted 8 lines · Shuangjun Zhu
I'm a newbie in the X domain,
where can I get the information about showfb?
As I know, there is no hardware for MPC823 FADS that can do the conversion from RGB data stored in system memory,
we must do it using software.So, where I should start?
Any suggestion?
Shadowfb is a "layer" (using the X terminology) which
is initialized after framebuffer rendering is setup. It is given a callback function when initialized.
typedef void (*RefreshAreaFuncPtr)(ScrnInfoPtr, int, BoxPtr);
Bool
ShadowFBInit (
ScreenPtr pScreen,
RefreshAreaFuncPtr refreshArea
);
The shadowfb encapsulates all rendering into that buffer
and gives the driver a callback telling it which rectangles of the buffer have been updated.
What can be done is that one can setup a framebuffer in
system memory and get callbacks telling which parts need to be copied into the real hardware framebuffer, hence the
name - you have a buffer and its shadow. It is safe to
copy areas larger than the rectangles you are told to update. That way you can reduce your refreshArea function to copying and translating only macroblocks.
There are examples in some other drivers such as the
glide driver which uses it on a write-only framebuffer or the MGA driver which uses it for effects like rotating the screen.
What format is the hardware buffer in? What macroblock
size?
Mark.
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/