xf86MapPciMem and freeing memory

Donald Kayser xorg at kayser.net
Tue May 12 15:58:37 PDT 2009


I'll answer some of my own questions, the most important is if this  
xf86-video-chips driver support multiple monitors? It does, but only  
if they are displaying the same images. This driver is written such  
that on the 69030 all writes to Pipeline A are also written to  
Pipeline B. This is suitable for laptops that have an external  
monitor, it does not support a single desktop across both monitors.

I have been able to determine that the driver alway writes to the MSS  
and IOSS registers to map in the correct Pipeline; this chip supports  
different base addresses for each Pipeline or switching via MSS and  
IOSS and using only one base address. When a second monitor is not  
enabled, all actions taken on Pipeline A are also applied to Pipeline  
B by switching the MSS and IOSS registers. Most times these registers  
are restored, in one case it is not.

Also, this driver only works on the 1.4 xserver, in the newest version  
of xserver, this PCIProbe function is not called. I am not going to  
attempt to make this driver work on the newest server since the target  
system for my effort will ship with a 1.4 server most likely.

So this is turning into a development effort on my part as far as I  
can tell. I need this driver to support an extended desktop on an  
existing embedded device.

Comments anyone?

Donald Kayser

On May 6, 2009, at 9:22 AM, Donald Kayser wrote:

> 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
>>
>
> _______________________________________________
> xorg-devel mailing list
> xorg-devel at lists.x.org
> http://lists.x.org/mailman/listinfo/xorg-devel
>



More information about the xorg-devel mailing list