removing PCI dependency from xserver

Mark Kettenis mark.kettenis at xs4all.nl
Mon Sep 6 11:11:04 PDT 2010


> Date: Mon, 6 Sep 2010 19:28:42 +0300
> From: "Vignatti Tiago (Nokia-MS/Helsinki)" <tiago.vignatti at nokia.com>
> 
> On Thu, Sep 02, 2010 at 05:05:06PM +0200, Vignatti Tiago (Nokia-MS/Helsinki) wrote:
> > Hi Mark,
> > 
> > On Thu, Sep 02, 2010 at 12:19:34AM +0200, ext Mark Kettenis wrote:
> > > > 
> > > > My last attempt to get rid of PCI in fbdevhw [0] was only commented
> > > > by Mark Kettenis. He mainly pointed the existence of fbdevhw. For
> > > > instance, if it should go to Linux specific directory (which for me
> > > > is off topic, but totally valid argument) or if the relation PCI <->
> > > > fbdevhw should be kept (which is not true; I had already an OMAP
> > > > based device without PCI using fbdevhw interface). What you thing?
> > > 
> > > Look, you'll have to introduce some sort of #ifdef-able #define to
> > > compile the core xserver code without support for PCI.  Why don't you
> > > just leave all the code in fbdevhw.c and use the same #define to
> > > conditionally compile fbdev_open_pci().  You can add a dummy version
> > > that causes a fatal error if you compile without PCI support, and
> > > everything else can stay as it is now.
> > 
> > Nope, I won't need any #ifdef juggling: 

Sure uyou do:

http://cgit.freedesktop.org/~vignatti/xserver/tree/hw/xfree86/common/xf86Bus.c?h=bus-cleanup-take3

> > Note that I'm not refusing your opinion, I'm just trying to make
> > the code more clear for everyone.

Sorry, but I do think that scattering Linux fdevhw-specific code all
over the tree instead of keeping it in the fbdevhw module make the
code considerably less clear.

You can easily achieve what you want with a single diff that just adds
a few XSERVER_LIBPCIACCESS ifdefs, instead of a string of 6 diffs.  It
makes it very clear that support for PCI framebuffers is optional,
whereas your diffs still leave traces of PCI support in fbdevhw
without leaving any indication that PCI support is optional.  And you
need the XSERVER_LIBPCIACCESS ifdefs around the code that you moved
anyway.


More information about the xorg-devel mailing list