From: bugzilla-daemon@freedesktop.org Subject: [Bug 97260] [bisected] R9 290 low performance in Linux 4.7 Date: Tue, 16 Aug 2016 15:49:54 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0392787055==" Return-path: Received: from culpepper.freedesktop.org (culpepper.freedesktop.org [IPv6:2610:10:20:722:a800:ff:fe98:4b55]) by gabe.freedesktop.org (Postfix) with ESMTP id C4EDC6E6D2 for ; Tue, 16 Aug 2016 15:49:54 +0000 (UTC) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============0392787055== Content-Type: multipart/alternative; boundary="14713625945.534a.31422"; charset="UTF-8" --14713625945.534a.31422 Date: Tue, 16 Aug 2016 15:49:54 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.freedesktop.org/ Auto-Submitted: auto-generated https://bugs.freedesktop.org/show_bug.cgi?id=3D97260 --- Comment #20 from Kai --- Created attachment 125820 --> https://bugs.freedesktop.org/attachment.cgi?id=3D125820&action=3Dedit dmesg output with additional debug info from attachment 125808 (In reply to Alex Deucher from comment #16) > Does just reverting this chunk fix the issue? >=20 > @@ -1630,6 +1631,9 @@ int radeon_modeset_init(struct radeon_device *rdev) >=20=20 > rdev->ddev->mode_config.funcs =3D &radeon_mode_funcs; >=20=20 > + if (radeon_use_pflipirq =3D=3D 2 && rdev->family >=3D CHIP_R600) > + rdev->ddev->mode_config.async_page_flip =3D true; > + > if (ASIC_IS_DCE5(rdev)) { > rdev->ddev->mode_config.max_width =3D 16384; > rdev->ddev->mode_config.max_height =3D 16384; Yes, just removing the default enable here has the same effect as reverting= the entire patch. (In reply to Michel D=C3=A4nzer from comment #18) > Created attachment 125808 > radeon: Add some page flip debugging output >=20 > Well, that's a surprising result of the bisection. >=20 > I can imagine two possible causes, or possibly some combination thereof: >=20 > * The processing of asynchronous flips or the corresponding completion > interrupts > is delayed for some reason > * Using flips instead of blits for buffer swaps lowers the load on the GP= U 3D > engine, so the SMU doesn't switch to higher clocks >=20 > The attached debugging patch should give us more information about the > former. With it applied, run the following while an affected application = is > running in fullscreen: >=20 > sudo sh -c 'echo 2 >/sys/module/drm/parameters/debug'; sleep 1; sudo sh -c > 'echo 0 >/sys/module/drm/parameters/debug' >=20 > Then attach the resulting dmesg output. Here you go. That was generated by running XCOM 2. > BTW, does the problem still happen with Alex's current drm-next-4.9-wip > branch? Haven't tested that yet. Maybe somebody else can do that. ;-) (In reply to Michel D=C3=A4nzer from comment #19) > BTW, there are some potential workarounds: >=20 > * Disable DRI3 for affected games with the environment variable > LIBGL_DRI3_DISABLE=3D1 >=20 > * Enable sync-to-vblank in affected applications, or force it with > vblank_mode=3D3 Well, this is going to be odd: I had VSync enabled in XCOM, since without t= hat option I got poorer performance in the past than with it. Now, after your n= ote here I actually *disabled* the VSync option in the game. 4.6.4 (or 4.7.0 without the offending commit/the enable removed) shows no longer a performa= nce difference and I'm getting ~30 FPS in XCOM 2. BUT with your ASYNC patch (vanilla 4.7.0) and VSync turned of in the game gives me ALSO ~30 FPS! I'd still say this is a regression as there is no difference without your patch, but maybe this information can help you in narrowing down the cause? I hope I haven't missed any open question. Let me know if you need anything else. --=20 You are receiving this mail because: You are the assignee for the bug.= --14713625945.534a.31422 Date: Tue, 16 Aug 2016 15:49:54 +0000 MIME-Version: 1.0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.freedesktop.org/ Auto-Submitted: auto-generated

Commen= t # 20 on bug 97260<= /a> from Kai
Created attachment 125820 [details]
dmesg output with additional debug info from attachment 125808 [details] [review]

(In reply to Alex Deucher from comm=
ent #16)
> Does just reverting this chunk fix the issue?
>=20
> @@ -1630,6 +1631,9 @@ int radeon_modeset_init(struct r=
adeon_device *rdev)
>=20=20
>         rdev->ddev->mode_config.funcs =3D &radeon_mode_funcs;
>=20=20
> +       if (radeon_use_pflipirq =3D=3D 2 && rdev->family &g=
t;=3D CHIP_R600)
> +               rdev->ddev->mode_config.async_page_flip =3D true;
> +
>         if (ASIC_IS_DCE5(rdev)) {
>                 rdev->ddev->mode_config.max_width =3D 16384;
>                 rdev->ddev->mode_config.max_height =3D 16384;

Yes, just removing the default enable here has the same effect as reverting=
 the
entire patch.

(In reply to Michel D=C3=A4nzer from comment #18)
> Created attachment 125808 [details] [review]
> radeon: Add some page flip debugging output
>=20
> Well, that's a surprising result of the bisection.
>=20
> I can imagine two possible causes, or possibly some combination thereo=
f:
>=20
> * The processing of asynchronous flips or the corresponding completion
> interrupts
>   is delayed for some reason
> * Using flips instead of blits for buffer swaps lowers the load on the=
 GPU 3D
>   engine, so the SMU doesn't switch to higher clocks
>=20
> The attached debugging patch should give us more information about the
> former. With it applied, run the following while an affected applicati=
on is
> running in fullscreen:
>=20
> sudo sh -c 'echo 2 >/sys/module/drm/parameters/debug'; sleep 1; sud=
o sh -c
> 'echo 0 >/sys/module/drm/parameters/debug'
>=20
> Then attach the resulting dmesg output.

Here you go. That was generated by running XCOM 2.

> BTW, does the problem still happen with Alex's c=
urrent drm-next-4.9-wip
> branch?

Haven't tested that yet. Maybe somebody else can do that. ;-)

(In reply to Michel D=C3=A4nzer from comment #19)
> BTW, there are some potential workarounds:
>=20
> * Disable DRI3 for affected games with the environment variable
>   LIBGL_DRI3_DISABLE=3D1
>=20
> * Enable sync-to-vblank in affected applications, or force it with
> vblank_mode=3D3

Well, this is going to be odd: I had VSync enabled in XCOM, since without t=
hat
option I got poorer performance in the past than with it. Now, after your n=
ote
here I actually *disabled* the VSync option in the game. 4.6.4 (or 4.7.0
without the offending commit/the enable removed) shows no longer a performa=
nce
difference and I'm getting ~30 FPS in XCOM 2. BUT with your ASYNC patch
(vanilla 4.7.0) and VSync turned of in the game gives me ALSO ~30 FPS! I'd
still say this is a regression as there is no difference without your patch,
but maybe this information can help you in narrowing down the cause?

I hope I haven't missed any open question. Let me know if you need anything
else.


You are receiving this mail because:
  • You are the assignee for the bug.
= --14713625945.534a.31422-- --===============0392787055== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVsCg== --===============0392787055==--