This series adds GPU reset handling support for Tyr in a new module drivers/gpu/drm/tyr/driver.rs which encapsulates the low-level reset controller internals and exposes a ResetHandle API to the driver.
The reset module owns reset state, queueing and execution ordering through OrderedQueue and handles duplicate/concurrent reset requests with a pending flag. Apart from the reset module, the first 3 patches: - Fixes a potential reset-complete stale state bug by clearing completed state before doing soft reset. - Adds Work::disable_sync() (wrapper of bindings::disable_work_sync). - Adds OrderedQueue support. Runtime tested on hardware by Deborah Brouwer (see [1]) and myself. [1]: https://gitlab.freedesktop.org/panfrost/linux/-/merge_requests/63#note_3364131 Link: https://gitlab.freedesktop.org/panfrost/linux/-/issues/28 --- Onur Özkan (4): drm/tyr: clear reset IRQ before soft reset rust: add Work::disable_sync rust: add ordered workqueue wrapper drm/tyr: add GPU reset handling drivers/gpu/drm/tyr/driver.rs | 38 +++---- drivers/gpu/drm/tyr/reset.rs | 180 ++++++++++++++++++++++++++++++++++ drivers/gpu/drm/tyr/tyr.rs | 1 + rust/helpers/workqueue.c | 6 ++ rust/kernel/workqueue.rs | 62 ++++++++++++ 5 files changed, 260 insertions(+), 27 deletions(-) create mode 100644 drivers/gpu/drm/tyr/reset.rs base-commit: 0ccc0dac94bf2f5c6eb3e9e7f1014cd9dddf009f -- 2.51.2
