diff options
author | Erico Nunes <nunes.erico@gmail.com> | 2024-04-05 17:29:49 +0200 |
---|---|---|
committer | Qiang Yu <yuq825@gmail.com> | 2024-04-15 09:05:38 +0800 |
commit | 49c13b4d2dd4a831225746e758893673f6ae961c (patch) | |
tree | 0224fab4f5fcdd8749e917de8c680937db25ea19 /drivers/gpu/drm/lima/lima_bcast.c | |
parent | 42d34193f9c905a2f36e2684bbd21dee37bd20b4 (diff) |
drm/lima: add mask irq callback to gp and pp
This is needed because we want to reset those devices in device-agnostic
code such as lima_sched.
In particular, masking irqs will be useful before a hard reset to
prevent race conditions.
Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240405152951.1531555-2-nunes.erico@gmail.com
Diffstat (limited to 'drivers/gpu/drm/lima/lima_bcast.c')
-rw-r--r-- | drivers/gpu/drm/lima/lima_bcast.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/gpu/drm/lima/lima_bcast.c b/drivers/gpu/drm/lima/lima_bcast.c index fbc43f243c54..6d000504e1a4 100644 --- a/drivers/gpu/drm/lima/lima_bcast.c +++ b/drivers/gpu/drm/lima/lima_bcast.c @@ -43,6 +43,18 @@ void lima_bcast_suspend(struct lima_ip *ip) } +int lima_bcast_mask_irq(struct lima_ip *ip) +{ + bcast_write(LIMA_BCAST_BROADCAST_MASK, 0); + bcast_write(LIMA_BCAST_INTERRUPT_MASK, 0); + return 0; +} + +int lima_bcast_reset(struct lima_ip *ip) +{ + return lima_bcast_hw_init(ip); +} + int lima_bcast_init(struct lima_ip *ip) { int i; |