Andreas Beck wrote:
>
> Hi !
>
> > is there a way to gain the phys. address of a framebuffer in ggi ??
>
> No, as this was never needed up to now. However I see your point, and it
> might be a good idea to add it.
I think a function for this will fit togehther with the API for
allocating video memory, right?
> > i need this address to feed my tv-card to provide an overlay into to
> > framebuffer. this is needed to make ggitv a full-fbtv replacement.
>
> Yes. We can probably only do that for kgicon drivers, as other drivers have
> no mechanism to provide that information as well, but at least for them, it
> might be interesting.
>
> So we should probably add an ioctl() that more or less exports the
> MMIO-descriptors to userspace.
>
> I am not sure, if this should be root-only (probably not, as you don't gain
> security-critical information).
>
> Hmm - wait ... There is a Linux-specific way to get at that using
> /proc/self/maps:
>
> hades:~$ cat /proc/553/maps | grep fb0
> 400fe000-408fe000 rw-s e2800000 08:06 10298 /dev/fb0
> 4090d000-4090e000 rw-s 02000000 08:06 10298 /dev/fb0
>
> This is basically the mapping of my currently running X server. e2800000 is
> the PCI-busaddress of the video card memory. The second entry is the GC.
No need for such complicated stuff.
KGIcon drivers as well as native fbdev drivers gives the physical
address as well as the length of the framebuffer in fix->smem_start
and fix->smem_len.
The DGA target also has the needed information available.
//Marcus
--
-------------------------------+------------------------------------
Marcus Sundberg | http://www.stacken.kth.se/~mackan
Royal Institute of Technology | Phone: +46 707 295404
Stockholm, Sweden | E-Mail: [EMAIL PROTECTED]