From: Umang Raghuvanshi Subject: [PATCH 0/1] drm/radeon: Fix GPU lockups for the R7 M270 Date: Mon, 13 Mar 2017 13:49:52 +0530 Message-ID: <20170313081953.8306-1-u@umangis.me> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0251256944==" Return-path: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: David Airlie Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, Alex Deucher , Umang Raghuvanshi , =?UTF-8?q?Christian=20K=C3=B6nig?= List-Id: amd-gfx.lists.freedesktop.org This is a multi-part message in MIME format... --===============0251256944== Content-type: multipart/alternative; boundary="----------=_1489393179-6294-60" This is a multi-part message in MIME format... ------------=_1489393179-6294-60 The AMD Radeon R7 M270 card's OpenGL functionality completely broke down in Linux kernel v4.10. Before v4.10, the card was incorrectly identified as a Radeon R7 M265 but worked perfectly (possibly due to the similarities between the two). It should also be noted that this issue is also present in Windows but is fixed by a vendor-specific driver by AMD which hasn't made its way to Linux yet. After bisecting between the v4.9 and v4.10 tags, I discovered that the commit 3a69adfe5617 ("drm/radeon: drop oland quirks") was the culprit. Due to what I assume as lack of firmware support for the chip, the quirks which were addressed in the firmware never made it to the card resulting in this. Specifically, when an OpenGL app was run with DRI_PRIME=1, the GPU would stall and the kernel logs would fill up with messages like the following: "GPU lockup (current fence id 0x0000000010e5 last fence id 0x10ed on ring 0)" "ring 3 stalled for more than 40952msec" This issue would crop up everytime DRI_PRIME=1 was used and is present across various applications - everything from natively supported games to glxgears. When the aforementioned stall would happen, the screen would freeze and the only solution would be to restart the X server altogether. The attached commit reverts this change only for the M270 (the values for identifying it were obtained experimentally and checked across different PCs). It fixes the issue completely but I strongly believe that a firmware patch would be a *much* better solution. Should the need arise, I am willing to provide any additional information that would help fix this issue. Umang Raghuvanshi (1): drm/radeon: Fix GPU lockups for the R7 M270 drivers/gpu/drm/radeon/si_dpm.c | 5 +++++ 1 file changed, 5 insertions(+) -- 2.12.0 -- Cheers, Umang Raghuvanshi. ------------=_1489393179-6294-60 Content-Type: text/html Content-Disposition: inline Content-Transfer-Encoding: quoted-printable

The AMD Radeon R7 M270 card's OpenGL functionality completely broke down= in Linux kernel v4.10. Before v4.10, the card was incorrectly identified a= s a Radeon R7 M265 but worked perfectly (possibly due to the similarities b= etween the two). It should also be noted that this issue is also present in= Windows but is fixed by a vendor-specific driver by AMD which hasn't made = its way to Linux yet.

After bisecting between the v4.9 and v4.10 tags, I discovered that the c= ommit 3a69adfe5617 ("drm/radeon: drop oland quirks") was the culp= rit. Due to what I assume as lack of firmware support for the chip, the qui= rks which were addressed in the firmware never made it to the card resultin= g in this.

Specifically, when an OpenGL app was run with DRI_PRIME=3D1, the GPU wou= ld stall and the kernel logs would fill up with messages like the following= :

“GPU lockup (current fence id 0x0000000010e5 last fence id 0x10ed = on ring 0)” “ring 3 stalled for more than 40952msec”

This issue would crop up everytime DRI_PRIME=3D1 was used and is present= across various applications – everything from natively supported gam= es to glxgears. When the aforementioned stall would happen, the screen woul= d freeze and the only solution would be to restart the X server altogether.=

The attached commit reverts this change only for the M270 (the values fo= r identifying it were obtained experimentally and checked across different = PCs). It fixes the issue completely but I strongly believe that a firmware = patch would be a much better solution.

Should the need arise, I am willing to provide any additional informatio= n that would help fix this issue.

Umang Raghuvanshi (1):

drm/radeon: Fix GPU lockups for the R7 M270
drivers/gpu/drm/radeon/si_dpm.c | 5 +++++
1 file changed, 5 insertions(+)

— 2.12.0

— Cheers, Umang Raghuvanshi.

3D"" ------------=_1489393179-6294-60-- --===============0251256944== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVsCg== --===============0251256944==--