Bug 55296 - [KMS] Extremely low performance of XDrawImageString
Summary: [KMS] Extremely low performance of XDrawImageString
Status: RESOLVED MOVED
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/Radeon (show other bugs)
Version: unspecified
Hardware: x86 (IA32) Linux (All)
: medium normal
Assignee: xf86-video-ati maintainers
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-24 22:36 UTC by Mihail Zenkov
Modified: 2019-11-19 07:36 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
test.c (1.27 KB, text/plain)
2012-09-24 22:36 UTC, Mihail Zenkov
no flags Details
Now with a decaying average and wait-for-rendering (1.78 KB, text/plain)
2015-04-28 09:48 UTC, Chris Wilson
no flags Details
Profile for default config from sysprof (339.52 KB, text/plain)
2015-04-28 14:50 UTC, Mihail Zenkov
no flags Details

Description Mihail Zenkov 2012-09-24 22:36:50 UTC
Created attachment 67652 [details]
test.c

I have performance problem in simple terminal apps like st (st.suckless.org) that render text without xft. With "NoAccel" "1" or  "RenderAccel" "0" problem gone.

I write simple test and have result:

1. default x.org configuration: 2000 ms
2. with "RenderAccel" "0": 70-170 ms
3. with "NoAccel" "1": 18-30 ms

I also run gtkperf -ac1000 and see many test faster with "RenderAccel" "0".

Default x.org configuration:

GtkEntry - time:  0,22
GtkComboBox - time: 14,89
GtkComboBoxEntry - time: 17,33
GtkSpinButton - time:  0,39
GtkProgressBar - time:  0,42
GtkToggleButton - time:  0,36
GtkCheckButton - time:  0,34
GtkRadioButton - time:  1,90
GtkTextView - Add text - time: 12,98
GtkTextView - Scroll - time:  2,31
GtkDrawingArea - Lines - time: 15,77
GtkDrawingArea - Circles - time:  9,08
GtkDrawingArea - Text - time:  4,74
GtkDrawingArea - Pixbufs - time:  1,84
 ---
Total time: 82,59


With "RenderAccel" "0":

GtkEntry - time:  0,22
GtkComboBox - time: 10,63
GtkComboBoxEntry - time: 11,35
GtkSpinButton - time:  0,31
GtkProgressBar - time:  0,31
GtkToggleButton - time:  0,34
GtkCheckButton - time:  0,34
GtkRadioButton - time:  0,82
GtkTextView - Add text - time: 13,21
GtkTextView - Scroll - time:  2,51
GtkDrawingArea - Lines - time: 28,74
GtkDrawingArea - Circles - time:  9,25
GtkDrawingArea - Text - time:  8,58
GtkDrawingArea - Pixbufs - time:  2,16
 ---
Total time: 88,78


HD6770, kernel-3.5, xorg-server-1.12.4, libdrm-2.4.39, xf86-video-ati-6.14.6
Comment 1 Michel Dänzer 2015-04-23 01:58:58 UTC
With current versions of the X server and driver, does Option "AccelMethod" "glamor" help?

If that's still bad, with current xf86-video-ati Git master, does Option "ShadowPrimary" help? (I recommend enabling Option "TearFree" along with that)
Comment 2 Mihail Zenkov 2015-04-23 11:31:50 UTC
Much better now, but NoAccel still faster.


xf86-video-ati-7.5.0
rs740:
    default            170ms
    "RenderAccel" "0"  200ms
    "NoAccel" "1"      53ms
    glamor             160ms (test ok, but some others apps have artifacts)

hd6770:
    default           90ms
    "RenderAccel" "0" 100ms
    "NoAccel" "1"     34ms
    glamor 85ms



xf86-video-ati-git 80f3d727f93cb6efedd2
hd6770:

    default        85ms
    glamor         75ms
    "NoAccel" "1"  34ms
    "TearFree" "1" freeze (black screen) on xorg-server startup (Xorg.0.log look like for normal xorg-server startup)
    "TearFree" "1" + glamur  freeze (black screen) on xorg-server startup
        from Xorg.0.log:

[     9.356] (II) Mouse0: Setting mouse protocol to "ExplorerPS/2"
[     9.649] (II) Mouse0: ps2EnableDataReporting: succeeded
[     9.649] (EE)
[     9.649] (EE) Backtrace:
[     9.650] (EE) 0: X (xorg_backtrace+0x3e) [0x81b1baa]
[     9.650] (EE) 1: X (0x8048000+0x16d28e) [0x81b528e]
[     9.650] (EE) 2: linux-gate.so.1 (__kernel_rt_sigreturn+0x0) [0xb7753b34]
[     9.650] (EE) 3: X (GetScratchGC+0x24) [0x808e314]
[     9.650] (EE) 4: /usr/lib/xorg/modules/drivers/radeon_drv.so (0xb706a000+0x4844d) [0xb70b244d]
[     9.650] (EE) 5: /usr/lib/xorg/modules/drivers/radeon_drv.so (radeon_scanout_update_handler+0x14) [0xb70b2ce1]
[     9.650] (EE) 6: /usr/lib/xorg/modules/drivers/radeon_drv.so (0xb706a000+0x4fd51) [0xb70b9d51]
[     9.650] (EE) 7: /usr/lib/xorg/modules/drivers/radeon_drv.so (drmmode_set_desired_modes+0x185) [0xb70bb005]
[     9.650] (EE) 8: /usr/lib/xorg/modules/drivers/radeon_drv.so (0xb706a000+0x491ad) [0xb70b31ad]
[     9.650] (EE) 9: X (BlockHandler+0x42) [0x8081ecf]
[     9.650] (EE) 10: X (WaitForSomething+0x252) [0x81af792]
[     9.650] (EE) 11: X (Dispatch+0x8e) [0x807d8fd]
[     9.650] (EE) 12: X (dix_main+0x4a0) [0x8081780]
[     9.650] (EE) 13: X (main+0x2a) [0x806dad5]
[     9.651] (EE) 14: /lib/libc.so.6 (__libc_start_main+0x16e) [0xb74501e7]
[     9.651] (EE) 15: X (0x8048000+0x259c1) [0x806d9c1]
[     9.651] (EE)
[     9.651] (EE) Segmentation fault at address 0x5
[     9.651] (EE)
Fatal server error:
[     9.651] (EE) Caught signal 11 (Segmentation fault). Server aborting
[     9.651] (EE)
[     9.651] (EE)
Please consult the The X.Org Foundation support
     at http://wiki.x.org
 for help.
[     9.651] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[     9.651] (EE)
[     9.651] (II) AIGLX: Suspending AIGLX clients for VT switch

    "ShadowPimary" "1"           85ms
    "ShadowPimary" "1" + glamor  95ms



old notebook with intel 945gm:
    sna     18ms
Comment 3 Michel Dänzer 2015-04-28 08:47:40 UTC
On my Kaveri development system, the test program prints around 16ms with glamor and Option "ShadowPrimary", seems to be about the same with Option "NoAccel" (but that one has much bigger variance).

What CPU does your test system have?
Comment 4 Mihail Zenkov 2015-04-28 09:06:57 UTC
CPU: AMD Phenom II X4 B40 3.35MHz (system - 32bit)
MB: GIGABYTE GA-MA74GM-S2H
Comment 5 Chris Wilson 2015-04-28 09:48:12 UTC
Created attachment 115397 [details]
Now with a decaying average and wait-for-rendering

You have to be wary that the test case doesn't synchronise to drawing and so is primarily measuring how fast it can send strings to the XServer with it building up a long backlog of requests (even if the drivers do throttle themselves the client will keep going until it saturates the send/recv buffers).
Comment 6 Mihail Zenkov 2015-04-28 14:50:24 UTC
Created attachment 115404 [details]
Profile for default config from sysprof
Comment 7 Mihail Zenkov 2015-04-28 14:51:20 UTC
I run new test and still have same problem, but probably you right - it look like overflow.
    defaut                       650ms
    glamor                       125ms
    "ShadowPimary" "1" + glamor  125ms
    "NoAccel" "1"                108ms

    intel 945gm sna              27.8ms


I try run sysprof for default config - most consume functions "evergreen_pcie_gart_tlb_flush" and "_raw_spin_unlock_irqrestore", both in kernel (3.19.0).
Comment 8 Mihail Zenkov 2015-08-18 17:17:52 UTC
I try enable fastfb on rs740 and have much better result: 45ms in my test and 45.7ms in Chris test.
Without fastfb I have 135ms in my test and 800-650ms in Chris test.

Also I have big difference in gtkperf ("gtkperf -ac 1000" on full screen).

With fastfb:
GtkEntry - time:  0.11
GtkComboBox - time:  3.08
GtkComboBoxEntry - time:  2.42
GtkSpinButton - time:  0.22
GtkProgressBar - time:  0.17
GtkToggleButton - time:  0.24
GtkCheckButton - time:  0.22
GtkRadioButton - time:  0.82
GtkTextView - Add text - time: 16.23
GtkTextView - Scroll - time:  0.11
GtkDrawingArea - Lines - time:  8.11
GtkDrawingArea - Circles - time: 10.11
GtkDrawingArea - Text - time: 15.80
GtkDrawingArea - Pixbufs - time:  1.72
 ---
Total time: 59.36


Without fastfb;
GtkEntry - time:  0.13
GtkComboBox - time:  4.25
GtkComboBoxEntry - time:  2.63
GtkSpinButton - time:  0.26
GtkProgressBar - time:  0.43
GtkToggleButton - time:  0.52
GtkCheckButton - time:  0.24
GtkRadioButton - time:  2.69
GtkTextView - Add text - time: 12.42
GtkTextView - Scroll - time:  0.05
GtkDrawingArea - Lines - time: 85.96
GtkDrawingArea - Circles - time: 10.24
GtkDrawingArea - Text - time:  4.59
GtkDrawingArea - Pixbufs - time:  1.12
 ---
Total time: 125.55

All test on kernel-4.1 and xf86-video-ati from git.
Comment 9 Martin Peres 2019-11-19 07:36:18 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/xorg/driver/xf86-video-ati/issues/42.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.