Where does Xorg fallback to ?

Siarhei Siamashka siarhei.siamashka at gmail.com
Mon Sep 23 08:59:02 PDT 2013


On Mon, 23 Sep 2013 10:45:41 +0800
"小飞珑" <404962885 at qq.com> wrote:

> Hi, 
>    I am looking into Xorg for performance optimization, and want to do
> some software acceleration for the Xorg fallback functions when the
> hardware acceleration is not available.

The software fallbacks are partially implemented in the Xorg server
("fb" subdirectory) and also partially in http://pixman.org/

> I am now using a notebook with intel display card. In the  UXA driver, I
> force the driver to use fallback funcs instead of the Accelerated funcs.
> As in uxa/uxa-accel.c -> uxa_copy_area(), I made uxa_screen->force_fallback = 1,
> force uxa driver to call uxa_check_copy_area()->fbCopyArea(), but the
> fbCopyArea seemed NOT to be the fbCopyArea in Xorg fb/fbcopy.c ! For I added
> return NULL immediately  in the beginning of fb/fbcopy.c ->
> fbCopyArea(), but made no difference, but if I comment the fbCopyArea()
> in uxa/uxa-unaccel.c the display is ruined. It seemed that the above
> two fbCopyArea() functions are not the same. Where did the Xorg
> fallback to? NOT to the fb/fbcopy.c ? I am eager to know that, could
> some body tell ? Thanks a lot!

The Intel hardware and the UXA driver seem to be a strange choice.

If this notebook is really your target hardware, then you probably
should have a look at SNA.

But if you want to improve Xorg software fallbacks just for the sake
of making them better, then running tests with xf86-video-fbdev or
xf86-video-modesetting driver would be more reasonable. The current
"fb" code in Xorg is implemented as just naive loops, and whenever
they are heavily used (instead of the optimized assembly in glibc or
pixman), the performance suffers a lot. A good start would be to fix
the XShmPutImage performance, because it is causing real troubles for
the users. This can be workarounded in the DDX drivers, but fixing it
in Xorg would be also nice:

    https://github.com/ssvb/xf86-video-fbturbo/issues/9

Unfortunately the person, who reported this problem, has not tried
to also submit a fix to the Xorg yet. But you or anybody else is free
to pick up this job :-)

-- 
Best regards,
Siarhei Siamashka


More information about the xorg-devel mailing list