diff options
author | Varad Gautam <varadgautam@google.com> | 2023-04-04 17:11:18 +0000 |
---|---|---|
committer | Varad Gautam <varadgautam@google.com> | 2023-04-04 17:25:03 +0000 |
commit | a6919ba26a50a8d8d70377fcd0b75102af4265ee (patch) | |
tree | b829f8a3df52140360b41e6c285a08043da19ac2 /mali_kbase | |
parent | fd068334b8839c878cbff750e267b05d7103407d (diff) | |
download | gpu-a6919ba26a50a8d8d70377fcd0b75102af4265ee.tar.gz |
mali_kbase: reset: Flush SSCD worker before resetting the GPU
coredump_work isn't guaranteed to happen before reset, which means the
resulting SSCD can contain either of pre-reset or post-reset state.
post-reset state isn't helpful in debugging a GPU hang. Ensure that we
always collect the pre-reset state by flushing the coredump worker
before resetting the GPU.
Bug: 264595878
Test: Raced reset debugfs write with trigger_core_dump sysfs write to
check that the device is stable and coredump happens before reset.
Change-Id: I7a553f8dd156d5dbee2d8008a70545641ed8dbe9
Signed-off-by: Varad Gautam <varadgautam@google.com>
Diffstat (limited to 'mali_kbase')
-rw-r--r-- | mali_kbase/csf/mali_kbase_csf_reset_gpu.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/mali_kbase/csf/mali_kbase_csf_reset_gpu.c b/mali_kbase/csf/mali_kbase_csf_reset_gpu.c index 74dcdc3..a6c38a4 100644 --- a/mali_kbase/csf/mali_kbase_csf_reset_gpu.c +++ b/mali_kbase/csf/mali_kbase_csf_reset_gpu.c @@ -178,6 +178,9 @@ static void kbase_csf_reset_begin_hw_access_sync( unsigned long hwaccess_lock_flags; unsigned long scheduler_spin_lock_flags; + /* Flush any pending coredumps */ + flush_work(&kbdev->csf.coredump_work); + /* Note this is a WARN/atomic_set because it is a software issue for a * race to be occurring here */ |