|
From: Stuart M. <stu...@st...> - 2002-06-18 13:15:15
|
Hi Ben On Tue, 18 Jun 2002 11:05:54 +0100 ben...@su... wrote: > Hello! > > I have modified the bitkeeper Kyro framebuffer driver to provide > additional ioctl calls for the creation of overlay surfaces (to handle > YUV to RGB colour conversion). Currently two calls are required for > creation of an overlay surface and a creation of viewport (a scaling > window mapping the overlay surface on to the RGB output) which returns a > pointer to the viewport surface. Currently the pointer returned can only > be written to in Kernel space which I assume is due to the pointer into > the PCI address space is mapped only in kernel space and not in user > space. You don't say how you're doing it, but this sounds likly. > I presume that it is possible to map the pages to be written by a > particular user process but I not sure how to do this and weather it is > the best approach. Its pretty simple. Just have a look at how the existing frame buffer code does it (fb_mmap). > I suppose it would be possible to extend the framebuffer driver to > provide an additional driver interface for overlay surfaces and thus use > mmap to create a memory mapped region but this seems like over kill for > the functionally that I'm after. It depends what functionally you're after! Assuming you simply want to display data from a user application which generates YUV data, then mapping the overlay into user space is almost certainly the easiest way to do it. Whether you do this as a new device or an extension of the existing one is pretty much up to you. Mapping the fb device is probably the easiest (simply use the offset parameter to mmap to decice what to map), but is somewhat non-standard. A better way might to to implement a subset of Video for Linux (V4L), which already has an API which supports overlays, allowing you to position them, change the format, etc. Stuart -- Stuart Menefy stu...@st... STMicroelectronics Ltd ST Intranet: mo.bri.st.com Bristol, UK Rest of the World: www.linuxsh.st.com |