diff mbox series

[109/120] MIPS: PS2: FB: Disable GIF DMA completion interrupts

Message ID 7c32a4bbe85b15f94958070991dc9a6ad77d4e1c.1567326213.git.noring@nocrew.org (mailing list archive)
State RFC
Headers show
Series Linux for the PlayStation 2 | expand

Commit Message

Fredrik Noring Sept. 1, 2019, 4:34 p.m. UTC
The GIF asserts DMA completion interrupts that are uninteresting
because DMA operations are fast enough to busy-wait for.

Signed-off-by: Fredrik Noring <noring@nocrew.org>
---
 drivers/video/fbdev/ps2fb.c | 8 ++++++++
 1 file changed, 8 insertions(+)
diff mbox series

Patch

diff --git a/drivers/video/fbdev/ps2fb.c b/drivers/video/fbdev/ps2fb.c
index 92957797045f..d7a54108f37e 100644
--- a/drivers/video/fbdev/ps2fb.c
+++ b/drivers/video/fbdev/ps2fb.c
@@ -2173,6 +2173,12 @@  static int ps2fb_probe(struct platform_device *pdev)
 	}
 	fb_set_cmap(&info->cmap, info);
 
+	/*
+	 * The GIF asserts DMA completion interrupts that are uninteresting
+	 * because DMA operations are fast enough to busy-wait for.
+	 */
+	disable_irq(IRQ_DMAC_GIF);
+
 	if (register_framebuffer(info) < 0) {
 		fb_err(info, "register_framebuffer failed\n");
 		err = -EINVAL;
@@ -2184,6 +2190,7 @@  static int ps2fb_probe(struct platform_device *pdev)
 	return 0;
 
 err_register_framebuffer:
+	enable_irq(IRQ_DMAC_GIF);
 	fb_dealloc_cmap(&info->cmap);
 err_alloc_cmap:
 err_find_mode:
@@ -2212,6 +2219,7 @@  static int ps2fb_remove(struct platform_device *pdev)
 		fb_err(info, "Failed to complete GIF DMA transfer\n");
 		err = -EBUSY;
 	}
+	enable_irq(IRQ_DMAC_GIF);
 	free_page((unsigned long)par->package.buffer);
 
 	return err;