pciaccess conversion the revenge..

Daniel Stone daniel at fooishbar.org
Tue Mar 11 00:10:49 PDT 2008

On Mon, Mar 10, 2008 at 10:46:50PM -0300, pcpa at mandriva.com.br wrote:
> Quoting Dave Airlie <airlied at gmail.com>:
> > okay I've just finished another big run of pciaccess conversion.
>   The apm driver, you just changed, needs at least some kind of
> check to build conditionally based on the dev privates changes:
> -%<-
>     if (ApmGeneration != serverGeneration) {
> 	if ((ApmPixmapIndex = AllocatePixmapPrivateIndex()) < 0)
> 	    return FALSE;
> 	ApmGeneration = serverGeneration;
>     }
>     if (!AllocatePixmapPrivate(pScreen, ApmPixmapIndex, sizeof(ApmPixmapRec)))
> 	return FALSE;
> -%<-
> in src/apm_driver.c:ApmScreenInit() or it will not even start due to
> the missing symbols AllocatePixmapPrivateIndex and AllocatePixmapPrivate.

That driver doesn't see any changes at all, so might as well just tell
people with older servers to use an older version, since the code is
otherwise identical.

>   I feel it will work if you just #if 0 that code as it would only
> be used if XF86RUSH is defined (and apm_rush.c would be compiled), but
> I think it is never defined, and the other code that uses this in
> apm_accel.c is already #if 0'ed, see:
> -%<-
> extern int	ApmPixmapIndex;
> #define APM_GET_PIXMAP_PRIVATE(pix)\
> 	((ApmPixmapPtr)(((PixmapPtr)(pix))->devPrivates[ApmPixmapIndex].ptr))
> -%<-
> in src/apm.h.

Rush isn't used anywhere at all.

> > so you can consider a lot of these conversions to be just making noise
> > to wake up the people who own this hardware and can thus test and
> > perhaps fix it.
>   I did some minor work on it, but gave up because of this same reason,
> i.e. not being able to test the changes.
>   I was also looking at the possibility, and wrote some initial code, not
> yet functional, to create a scanpci.so and xf86ansic.so modules, that could
> be installed somewhere like /usr/lib/xorg/modules/compat, just as a way to
> allow binary compatibility with old modules, and possibly compile new modules
> using an interface that exports the old api, using libpciaccess, and
> those modules could just be loaded, adding a Load in the Module section in
> xorg.conf. But the "scanpci" module would not be trivial to write...

It's so, so much easier to just fix up all the old drivers.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.x.org/archives/xorg/attachments/20080311/4df7c967/attachment.pgp>

More information about the xorg mailing list