xf86MapPciMem and freeing memory
Donald Kayser
xorg at kayser.net
Wed May 6 06:48:57 PDT 2009
I am new to X and have been going through a steep learning curve. I
have checked out via git and built the X system according to
documentation found on the various wikis. What I have learned is that
when I build the xf86-video-chips driver manually, I can replace the
existing xf86-video-chips driver on my target system only and it loads
and I can debug it. My xserver-xorg version is 7.3+18. When the driver
is built this way, the macro XSERVER_LIBPCIACCESS is not defined, and
the Probe function used is CHIPSProbe(). Under this scenario with the
C&T 69030 in dual screen setup, memory is created with xf86MapPciMem()
and released unsuccessfully with xf86UnMapVidMem(). I added code that
is similar in respect to the i128 driver and is in the chips driver as
well. However, when the code calls pci_device_unmap_range() there is a
complaint from the shared library about not recognizing the symbol.
So, I had been unable to debug the initialization of the driver, but I
managed to get the current downloaded xserver to build with debug
information. I rebuilt the chips driver against the new 7.5 xserver,
and the macro XSERVER_LIBPCIACCESS is now defined. I can debug the
entry points, but the entry points to the driver have changed.
Furthermore, the new CHIPSPciProbe() function is not called, even
though it appears it should be.
At this point I have many more questions than anything else and I am
hoping someone out there has the time to lend a hand.
First, should I be using the 7.3 version that came with debian, should
I upgrade to 7.4? Now is the time for me to make the version decision
and my instinct tells me I should use 7.4.
I am certain I can work through the problems with the driver on my PPC
target, because I assume that it works in an intel x86 environment
that has BIOS and all that PC stuff. Does anyone know otherwise?
When I obtain source from git, is that considered 7.4, or is it the
current development of an newer version?
Anybody, please pitch in with your opinions and suggestions.
Thanks
Donald Kayser
xorg at kayser dot net
On May 5, 2009, at 1:35 AM, Matthieu Herrb wrote:
> Donald Kayser wrote:
>> I have been working on the xf86-video-chips driver to support 2
>> monitors on a PPC. I have noticed that memory allocated with
>> xf86MapPciMem() function call is returned with xf86UnMapVidMem. Every
>> time memory is freed there is an error message indicating that the
>> memory is not in the expected list that xf86UnMapVidMem() uses. This
>> is bothersome since in FullMMIO mode for the driver, memory is
>> allocated then freed during CHIPSProbe(). I have looked for the entry
>> point for xf86MapPciMem() and have not been able to locate it; this
>> would at least allow me to see how the memory is allocated. I have
>> looked at all vf86-video drivers and they all call the
>> xf86UnMapVidMem() function to return memory, and I assume they all
>> fail. So, is there a better function to call to free memory allocated
>> by xf86MapPciMem()?
>>
>
> See bug <https://bugs.freedesktop.org/show_bug.cgi?id=20541> and
> commit
> cee4cdf061ca8e6376846c0eac2fc6d57711129e to xf86-video-i128, which
> address the issue in the i128 driver.
>
> --
> Matthieu Herrb
>
More information about the xorg-devel
mailing list