1 From 31fa4aeafa41a38c76085af4de7192c572e85119 Mon Sep 17 00:00:00 2001
2 From: Akhil Goyal <akhil.goyal@nxp.com>
3 Date: Fri, 20 Jul 2018 16:43:25 +0530
4 Subject: [PATCH] staging: fsl_ppfe: performance tuning for user space
6 interrupt coalescing of 100 usec is added.
8 Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
9 Signed-off-by: Sachin Saxena <sachin.saxena@nxp.com>
11 drivers/staging/fsl_ppfe/pfe_cdev.c | 12 +++++++++---
12 1 file changed, 9 insertions(+), 3 deletions(-)
14 --- a/drivers/staging/fsl_ppfe/pfe_cdev.c
15 +++ b/drivers/staging/fsl_ppfe/pfe_cdev.c
16 @@ -116,15 +116,18 @@ static irqreturn_t hif_us_isr(int irq, v
18 if (int_status & HIF_RXPKT_INT) {
19 int_enable_mask &= ~(HIF_RXPKT_INT);
20 + /* Disable interrupts, they will be enabled after
23 + writel_relaxed(int_enable_mask, HIF_INT_ENABLE);
25 eventfd_signal(trigger, 1);
28 - /*Disable interrupts, they will be enabled after they are serviced */
29 - writel_relaxed(int_enable_mask, HIF_INT_ENABLE);
34 +#define PFE_INTR_COAL_USECS 100
35 static long pfe_cdev_ioctl(struct file *fp, unsigned int cmd,
38 @@ -159,6 +162,9 @@ static long pfe_cdev_ioctl(struct file *
39 eventfd_ctx_put(g_trigger);
42 + writel((PFE_INTR_COAL_USECS * (pfe->ctrl.sys_clk / 1000)) |
43 + HIF_INT_COAL_ENABLE, HIF_INT_COAL);
45 pr_debug("request_irq for hif interrupt: %d\n", pfe->hif_irq);