summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authoreggz2020-04-19 23:23:57 +0200
committereggz2020-04-19 23:23:57 +0200
commitcc7c53d4195b0303ada0774dd67555a3de60e4ae (patch)
tree9b782849759ff62d8fa8e7bcd6805df1a32e4086
parent3c89f6c9082769a67b9ee3bc5e0cb1003d498a12 (diff)
downloadaur-cc7c53d4195b0303ada0774dd67555a3de60e4ae.tar.gz
Implemented suggested amdgpu patch by markuschaaf
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD22
-rw-r--r--amdgpu_hwhang_reboot.patch35
3 files changed, 53 insertions, 8 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 94df3a622fb..8e3e428cc6b 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = linux-amd-raven
pkgver = 5.4.v.33
- pkgrel = 1
+ pkgrel = 2
url = https://www.kernel.org/
arch = x86_64
license = GPL2
@@ -16,10 +16,12 @@ pkgbase = linux-amd-raven
source = config.x86_64
source = linux-amd-raven.preset
source = 5012_enable-cpu-optimizations-for-gcc91.patch
+ source = amdgpu_hwhang_reboot.patch
sha256sums = SKIP
sha256sums = e31ddac0ee6e644bce4379e89de0a59b8aebeb20822d560b10bd3a87d6c24e84
sha256sums = 0ac0cf410b0f3eeaa07d41505613e118ea59e01144e905f2dc0a808379f87e87
sha256sums = fb98e49d7a640e05bf0d3a65ca49d0adb19de7547cb7ffca7a6cbacb1f461f0b
+ sha256sums = 62fc91e581c56240220dac84b77684387ae3d5c52afc5904f76a8cfa43e73c05
pkgname = linux-amd-raven
pkgdesc = Linux kernel with working amdgpu for Raven Ridge hardware
diff --git a/PKGBUILD b/PKGBUILD
index 3bef61fd08b..d5153db4752 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,7 +4,7 @@ pkgbase=linux-amd-raven
_srcname=linux
gitver=v5.4.33
pkgver=5.4.v.33
-pkgrel=1
+pkgrel=2
arch=('x86_64')
url="https://www.kernel.org/"
license=('GPL2')
@@ -20,15 +20,20 @@ source=('git+https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git'
# standard config files for mkinitcpio ramdisk
"${pkgbase}.preset"
# patch from our gentoo overlords
- '5012_enable-cpu-optimizations-for-gcc91.patch')
+ '5012_enable-cpu-optimizations-for-gcc91.patch'
+ # amdgpuhang on reboot patch
+ 'amdgpu_hwhang_reboot.patch'
+)
sha256sums=('SKIP'
- #config.x86_64
+ #config.x86_64
'e31ddac0ee6e644bce4379e89de0a59b8aebeb20822d560b10bd3a87d6c24e84'
- #.preset file
- '0ac0cf410b0f3eeaa07d41505613e118ea59e01144e905f2dc0a808379f87e87'
- #patch file
+ #.preset file
+ '0ac0cf410b0f3eeaa07d41505613e118ea59e01144e905f2dc0a808379f87e87'
+ #patch file
'fb98e49d7a640e05bf0d3a65ca49d0adb19de7547cb7ffca7a6cbacb1f461f0b'
- )
+ #amdgpuhang on reboot patch
+ '62fc91e581c56240220dac84b77684387ae3d5c52afc5904f76a8cfa43e73c05'
+)
_kernelname=${pkgbase#linux}
@@ -53,6 +58,9 @@ prepare() {
# Implement cpu optimisation (MZEN2) patch from our gentoo lords
git apply ../5012_enable-cpu-optimizations-for-gcc91.patch
+ # Implement amdgpu_hwhang_reboot.patch
+ git apply ../amdgpu_hwhang_reboot.patch
+
# get kernel version
yes "" | make prepare
diff --git a/amdgpu_hwhang_reboot.patch b/amdgpu_hwhang_reboot.patch
new file mode 100644
index 00000000000..dc24eff4dd7
--- /dev/null
+++ b/amdgpu_hwhang_reboot.patch
@@ -0,0 +1,35 @@
+From b2a7e9735ab2864330be9d00d7f38c961c28de5d Mon Sep 17 00:00:00 2001
+From: Prike Liang <Prike.Liang@amd.com>
+Date: Mon, 13 Apr 2020 21:41:14 +0800
+Subject: drm/amdgpu: fix the hw hang during perform system reboot and reset
+
+The system reboot failed as some IP blocks enter power gate before perform
+hw resource destory. Meanwhile use unify interface to set device CGPG to ungate
+state can simplify the amdgpu poweroff or reset ungate guard.
+
+Fixes: 487eca11a321ef ("drm/amdgpu: fix gfx hang during suspend with video playback (v2)")
+Signed-off-by: Prike Liang <Prike.Liang@amd.com>
+Tested-by: Mengbing Wang <Mengbing.Wang@amd.com>
+Tested-by: Paul Menzel <pmenzel@molgen.mpg.de>
+Acked-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Cc: stable@vger.kernel.org
+---
+ drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+index 7d35b0a366a2..f84f9e35a73b 100644
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+@@ -2356,6 +2356,8 @@ static int amdgpu_device_ip_suspend_phase1(struct amdgpu_device *adev)
+ {
+ int i, r;
+
++ amdgpu_device_set_pg_state(adev, AMD_PG_STATE_UNGATE);
++ amdgpu_device_set_cg_state(adev, AMD_CG_STATE_UNGATE);
+
+ for (i = adev->num_ip_blocks - 1; i >= 0; i--) {
+ if (!adev->ip_blocks[i].status.valid)
+--
+cgit v1.2.1