答复: Does libpciaccess support two screen share one pci clone mode ?

FloraGui at viatech.com.cn FloraGui at viatech.com.cn
Mon Nov 17 18:04:37 PST 2008


Dear Ian:
Thanks a lot for your reply!

>If you're doing clone mode within one driver, you shouldn't need to map
>the device twice.  Map the device memory once and use the same mapping from
>both screens.  I'm pretty sure that's how other drviers do it.

Now I use this method to realize it which is just as you said I judge it if I mapped once, I will not map it.But I saw the open source of Intel and NV and see they place pci_device_map_range(mmio map) in ScreenInit stage. In old xorg structure, if in clone mode xorg call ScreenInit twice, we use old structure, so if we do nothing here, it will call pci_device_map_range(mmio map)twice and the second time will failed . I thought because Intel use xrandr12 structure the xorg don't all ScreenInit twice in the clone mode.The xrandr12 always build-in
one screen. Ps: I work on S3 Graphic.

-----邮件原件-----
发件人: Ian Romanick [mailto:idr at freedesktop.org] 
发送时间: 2008年11月18日 2:38
收件人: Flora Gui
抄送: xorg at lists.freedesktop.org
主题: Re: Does libpciaccess support two screen share one pci clone mode ?

On Thu, Nov 13, 2008 at 02:52:19PM +0800, FloraGui at viatech.com.cn wrote:
>          Recently I study libpciaccess, found pci_device_map_range
> function, when map the same physical address and the same size will
> failed. 
> 
>     If we use libpciaccess and want support two screen which share one
> pci, they are mmio base is the same physical address and the size is the
> same, when the second screeninit goto pci_device_map_range, screeninit
> will failed.

If you're doing clone mode within one driver, you shouldn't need to map
the device twice.  Map the device memory once and use the same mapping from
both screens.  I'm pretty sure that's how other drviers do it.

Just out of curiosity, what device are you working on?

>      And we can not light device.
> 
>      I want to ask two question:
> 
>          1. Does the libpciaccess support two screen share one pci ?
> 
>          2. If not support, we can do same issue in 2D driver , but I
> can see the nv and intel do nothing , it confused me a lot.




More information about the xorg mailing list