Bug 79623 - [DRI3 IVB/BYT/HSW/BDW Bisected]"sna: Add support for DRI3" causes SynMark2 v5.3.0 OglBatch5/OglDrvCtx performance reduced 20%~40% and WebGL does not work
Summary: [DRI3 IVB/BYT/HSW/BDW Bisected]"sna: Add support for DRI3" causes SynMark2 v5...
Status: VERIFIED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/intel (show other bugs)
Version: git
Hardware: All Linux (All)
: high major
Assignee: Chris Wilson
QA Contact: Intel GFX Bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-04 07:48 UTC by zhoujian
Modified: 2014-11-06 08:54 UTC (History)
6 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description zhoujian 2014-06-04 07:48:17 UTC
Libdrm: (master)libdrm-2.4.54-9-g8fc62ca8ac010659023bb63c4759eb683de4f9af
Mesa: (master)328e9593173bc69352e1707f119a7aca9d540cf9
Xserver: (master)xorg-server-1.15.99.902-117-g7ca458493aa2f0aa091c989ea0768611
Xf86_video_intel: (master)2.99.911-250-g4cafd1fbb1a2441a9ba5dac7f2a0e1b3f5957c62
Cairo: (master)ead5c7909f3db1d0d81121fc2775c458871891b2
Libva: (staging)35e70cb9b9c77dfb99fb370e319ed501f0c31b17
Libva_intel_driver: (staging)fbbe401aa28a0b3859d587ef08f0df15a2f7c8f2
Kernel_version: drm-intel-nightly(git-455a8f)

Bug detailed description:
----------------------------------------------
SynMark_OglBatch5/OglDrvCtx performance reduced 20%~40% on IVB/BYT/HSW/BDW, The problem exists both on gnome-session and Raw X.
It’s Xf86 regression, bisecting show that the first bad commit is:
975b9798be77b30cbed485583d0ccb48318708f7 (bad commit)
0fbe8995d51b4643f1cf06c07da8b4b5ac5ae7c3 (skip error with “dri3.c:47:1:error: control reaches end of non-void function ”)
67b37332bd45dd4cea297107bfdc9df21984fdcd  (skip error with “dri3.c:47:1: error: control reaches end of non-void function”)
9cf6cd9726ed5ba73bb8c38c06f7b5c78706309b  (skip error with “dri3.c:47:1: error: control reaches end of non-void function”)
d8eb87f84f88ad2df42c6fed1d93df76589a14e3  (skip error with “dri3.c:47:1: error: control reaches end of non-void function”)


Reproduce steps:
---------------------------------------------
1.   xinit&
2.  ./synmark2 OglBatch5
Comment 1 meng 2014-06-05 05:29:21 UTC
The bisected commits also cause bug 79629.
Comment 2 zhoujian 2014-06-05 05:53:34 UTC
Found the Xserver also cause by Synmark2_OglBatch5/OglDrvCtx performance reduced,by bisected first bad commit is: 746be5a03ebbda4ab411ca3efb2ed95f99e9ea46
Author:     Chris Wilson <chris@chris-wilson.co.uk>
AuthorDate: Wed May 28 08:13:59 2014 +0100
Commit:     Keith Packard <keithp@keithp.com>
CommitDate: Mon Jun 2 13:11:15 2014 -0700

    xfree86: Report DRI3 as a built-in module
Comment 3 Chris Wilson 2014-06-05 06:02:12 UTC
Please use

Section "Device"
  Identifier "Intel"
  Option "DRI" "2"
EndSection


for regression testing.
Comment 4 Chris Wilson 2014-06-05 08:40:49 UTC
I begun looking at OglBatch5 on a hsw i5-4670T and have not seen a differential between dri2/dri3.
Comment 5 zhoujian 2014-06-06 08:23:09 UTC
(In reply to comment #3)
I has been added Identifier "Intel"/Option "DRI" "2" in xorg.conf file,it can be fixed this bug.
Comment 6 Eero Tamminen 2014-06-25 14:28:08 UTC
(In reply to comment #4)
> I begun looking at OglBatch5 on a hsw i5-4670T and have not seen a
> differential between dri2/dri3.

Are you running test in fullscreen & native resolution, or not?  This issue might show up only in fullscreen.  Because Batch5 is partly CPU bound, you may need also same kernel version.

Btw. How do you verify that 3D program uses DRI3?  I'm currently using Gdb over ssh to do that checking [1], but it would be nice to have some more convenient way.

[1] E.g. in Ubuntu 14.04 (Xorg 1.15.1 with present and dri3 extensions, kernel 3.13) with Mesa & xf86-video-intel from this week that are built with DRI3 support, aren't enough to get DRI3.  With Gdb one can see that dri3_create_screen returns NULL and you get dri2 buffer swaps.
Comment 7 zhoujian 2014-06-26 01:23:26 UTC
There are many SynMark2_v5_3_0 cases reduced 20%~40% on HSW-GT3e.
Comment 8 meng 2014-08-14 11:17:33 UTC
The bisected commits also blocked WebGL testing(disable WebGL in chrome).
Comment 9 meng 2014-09-16 06:11:38 UTC
The issues still exists on 2014Q3 as below:
Mesa:      (10.3)9f67c26d1b424b8f3d86b5435c8f74d0a81eb86d
Kernel:  3.16.2
Xf86_video_intel:   (master)2.99.914
Libdrm:         (master)libdrm-2.4.56
Libva:           (master) 1.4.0.pre1
vaapi-intel-driver:    (master) 1.4.0.pre1
Cairo:        1.12.16
Xserver:    (server-1.16-branch)xorg-server-1.16.0
Comment 10 zhoujian 2014-09-24 02:25:03 UTC
With Keith's patch:http://lists.freedesktop.org/archives/dri-devel/2014-July/062842.html can fixed performance issue.
Comment 11 wendy.wang 2014-11-06 08:54:33 UTC
Test DRI3 on BDW GT2 configuration using latest GFX SW Stack(2014-11-05), which included Keith's quad buffer patch(which was merged into Mesa on 9-30 as commit f7a355556ef5fe23056299a77414f9ad8b5e5a1d)

From the test result,SynMark2 v5.3.0 OglBatch5 performance values recover to good values, SynMarkDrvCtx show 30% worse than DRI2 environment, and keep this issue tracked another Bug ID:
https://bugs.freedesktop.org/show_bug.cgi?id=79715

Close this bug as fixed.


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.