* [PATCH v2 1/1] nouveau: ratelimit IRQ messages
@ 2010-10-04 13:11 Jiri Slaby
2010-10-04 16:24 ` Marcin Slusarz
2010-10-04 23:40 ` Ben Skeggs
0 siblings, 2 replies; 3+ messages in thread
From: Jiri Slaby @ 2010-10-04 13:11 UTC (permalink / raw)
To: airlied; +Cc: dri-devel, linux-kernel, jirislaby, Ben Skeggs, Marcin Slusarz
There are two messages in the ISR of nouveau which might be printed out
hundred times in a second. Ratelimit them. (We need to move
nouveau_ratelimit to the top of the file.)
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Ben Skeggs <bskeggs@redhat.com>
Cc: Marcin Slusarz <marcin.slusarz@gmail.com>
---
drivers/gpu/drm/nouveau/nouveau_irq.c | 23 +++++++++++++----------
1 files changed, 13 insertions(+), 10 deletions(-)
diff --git a/drivers/gpu/drm/nouveau/nouveau_irq.c b/drivers/gpu/drm/nouveau/nouveau_irq.c
index 794b0ee..5b097b4 100644
--- a/drivers/gpu/drm/nouveau/nouveau_irq.c
+++ b/drivers/gpu/drm/nouveau/nouveau_irq.c
@@ -41,6 +41,13 @@
#include "nouveau_connector.h"
#include "nv50_display.h"
+static DEFINE_RATELIMIT_STATE(nouveau_ratelimit_state, 3 * HZ, 20);
+
+static int nouveau_ratelimit(void)
+{
+ return __ratelimit(&nouveau_ratelimit_state);
+}
+
void
nouveau_irq_preinstall(struct drm_device *dev)
{
@@ -200,7 +207,9 @@ nouveau_fifo_irq_handler(struct drm_device *dev)
}
if (status & NV_PFIFO_INTR_DMA_PUSHER) {
- NV_INFO(dev, "PFIFO_DMA_PUSHER - Ch %d\n", chid);
+ if (nouveau_ratelimit())
+ NV_INFO(dev, "PFIFO_DMA_PUSHER - Ch %d\n",
+ chid);
status &= ~NV_PFIFO_INTR_DMA_PUSHER;
nv_wr32(dev, NV03_PFIFO_INTR_0,
@@ -227,8 +236,9 @@ nouveau_fifo_irq_handler(struct drm_device *dev)
}
if (status) {
- NV_INFO(dev, "PFIFO_INTR 0x%08x - Ch %d\n",
- status, chid);
+ if (nouveau_ratelimit())
+ NV_INFO(dev, "PFIFO_INTR 0x%08x - Ch %d\n",
+ status, chid);
nv_wr32(dev, NV03_PFIFO_INTR_0, status);
status = 0;
}
@@ -505,13 +515,6 @@ nouveau_pgraph_intr_notify(struct drm_device *dev, uint32_t nsource)
nouveau_graph_dump_trap_info(dev, "PGRAPH_NOTIFY", &trap);
}
-static DEFINE_RATELIMIT_STATE(nouveau_ratelimit_state, 3 * HZ, 20);
-
-static int nouveau_ratelimit(void)
-{
- return __ratelimit(&nouveau_ratelimit_state);
-}
-
static inline void
nouveau_pgraph_intr_error(struct drm_device *dev, uint32_t nsource)
--
1.7.3.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2 1/1] nouveau: ratelimit IRQ messages
2010-10-04 13:11 [PATCH v2 1/1] nouveau: ratelimit IRQ messages Jiri Slaby
@ 2010-10-04 16:24 ` Marcin Slusarz
2010-10-04 23:40 ` Ben Skeggs
1 sibling, 0 replies; 3+ messages in thread
From: Marcin Slusarz @ 2010-10-04 16:24 UTC (permalink / raw)
To: Jiri Slaby; +Cc: airlied, dri-devel, linux-kernel, jirislaby, Ben Skeggs
On Mon, Oct 04, 2010 at 03:11:30PM +0200, Jiri Slaby wrote:
> There are two messages in the ISR of nouveau which might be printed out
> hundred times in a second. Ratelimit them. (We need to move
> nouveau_ratelimit to the top of the file.)
>
> Signed-off-by: Jiri Slaby <jslaby@suse.cz>
> Cc: Ben Skeggs <bskeggs@redhat.com>
> Cc: Marcin Slusarz <marcin.slusarz@gmail.com>
FWIW
Reviewed-by: Marcin Slusarz <marcin.slusarz@gmail.com>
> ---
> drivers/gpu/drm/nouveau/nouveau_irq.c | 23 +++++++++++++----------
> 1 files changed, 13 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/gpu/drm/nouveau/nouveau_irq.c b/drivers/gpu/drm/nouveau/nouveau_irq.c
> index 794b0ee..5b097b4 100644
> --- a/drivers/gpu/drm/nouveau/nouveau_irq.c
> +++ b/drivers/gpu/drm/nouveau/nouveau_irq.c
> @@ -41,6 +41,13 @@
> #include "nouveau_connector.h"
> #include "nv50_display.h"
>
> +static DEFINE_RATELIMIT_STATE(nouveau_ratelimit_state, 3 * HZ, 20);
> +
> +static int nouveau_ratelimit(void)
> +{
> + return __ratelimit(&nouveau_ratelimit_state);
> +}
> +
> void
> nouveau_irq_preinstall(struct drm_device *dev)
> {
> @@ -200,7 +207,9 @@ nouveau_fifo_irq_handler(struct drm_device *dev)
> }
>
> if (status & NV_PFIFO_INTR_DMA_PUSHER) {
> - NV_INFO(dev, "PFIFO_DMA_PUSHER - Ch %d\n", chid);
> + if (nouveau_ratelimit())
> + NV_INFO(dev, "PFIFO_DMA_PUSHER - Ch %d\n",
> + chid);
>
> status &= ~NV_PFIFO_INTR_DMA_PUSHER;
> nv_wr32(dev, NV03_PFIFO_INTR_0,
> @@ -227,8 +236,9 @@ nouveau_fifo_irq_handler(struct drm_device *dev)
> }
>
> if (status) {
> - NV_INFO(dev, "PFIFO_INTR 0x%08x - Ch %d\n",
> - status, chid);
> + if (nouveau_ratelimit())
> + NV_INFO(dev, "PFIFO_INTR 0x%08x - Ch %d\n",
> + status, chid);
> nv_wr32(dev, NV03_PFIFO_INTR_0, status);
> status = 0;
> }
> @@ -505,13 +515,6 @@ nouveau_pgraph_intr_notify(struct drm_device *dev, uint32_t nsource)
> nouveau_graph_dump_trap_info(dev, "PGRAPH_NOTIFY", &trap);
> }
>
> -static DEFINE_RATELIMIT_STATE(nouveau_ratelimit_state, 3 * HZ, 20);
> -
> -static int nouveau_ratelimit(void)
> -{
> - return __ratelimit(&nouveau_ratelimit_state);
> -}
> -
>
> static inline void
> nouveau_pgraph_intr_error(struct drm_device *dev, uint32_t nsource)
> --
> 1.7.3.1
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2 1/1] nouveau: ratelimit IRQ messages
2010-10-04 13:11 [PATCH v2 1/1] nouveau: ratelimit IRQ messages Jiri Slaby
2010-10-04 16:24 ` Marcin Slusarz
@ 2010-10-04 23:40 ` Ben Skeggs
1 sibling, 0 replies; 3+ messages in thread
From: Ben Skeggs @ 2010-10-04 23:40 UTC (permalink / raw)
To: Jiri Slaby; +Cc: airlied, linux-kernel, dri-devel, jirislaby
On Mon, 2010-10-04 at 15:11 +0200, Jiri Slaby wrote:
> There are two messages in the ISR of nouveau which might be printed out
> hundred times in a second. Ratelimit them. (We need to move
> nouveau_ratelimit to the top of the file.)
Looks good to me. If you could rebase this on nouveau git
(git.freedesktop.org/git/nouveau/linux-2.6), I'll push it.
Thanks,
Ben.
>
> Signed-off-by: Jiri Slaby <jslaby@suse.cz>
> Cc: Ben Skeggs <bskeggs@redhat.com>
> Cc: Marcin Slusarz <marcin.slusarz@gmail.com>
> ---
> drivers/gpu/drm/nouveau/nouveau_irq.c | 23 +++++++++++++----------
> 1 files changed, 13 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/gpu/drm/nouveau/nouveau_irq.c b/drivers/gpu/drm/nouveau/nouveau_irq.c
> index 794b0ee..5b097b4 100644
> --- a/drivers/gpu/drm/nouveau/nouveau_irq.c
> +++ b/drivers/gpu/drm/nouveau/nouveau_irq.c
> @@ -41,6 +41,13 @@
> #include "nouveau_connector.h"
> #include "nv50_display.h"
>
> +static DEFINE_RATELIMIT_STATE(nouveau_ratelimit_state, 3 * HZ, 20);
> +
> +static int nouveau_ratelimit(void)
> +{
> + return __ratelimit(&nouveau_ratelimit_state);
> +}
> +
> void
> nouveau_irq_preinstall(struct drm_device *dev)
> {
> @@ -200,7 +207,9 @@ nouveau_fifo_irq_handler(struct drm_device *dev)
> }
>
> if (status & NV_PFIFO_INTR_DMA_PUSHER) {
> - NV_INFO(dev, "PFIFO_DMA_PUSHER - Ch %d\n", chid);
> + if (nouveau_ratelimit())
> + NV_INFO(dev, "PFIFO_DMA_PUSHER - Ch %d\n",
> + chid);
>
> status &= ~NV_PFIFO_INTR_DMA_PUSHER;
> nv_wr32(dev, NV03_PFIFO_INTR_0,
> @@ -227,8 +236,9 @@ nouveau_fifo_irq_handler(struct drm_device *dev)
> }
>
> if (status) {
> - NV_INFO(dev, "PFIFO_INTR 0x%08x - Ch %d\n",
> - status, chid);
> + if (nouveau_ratelimit())
> + NV_INFO(dev, "PFIFO_INTR 0x%08x - Ch %d\n",
> + status, chid);
> nv_wr32(dev, NV03_PFIFO_INTR_0, status);
> status = 0;
> }
> @@ -505,13 +515,6 @@ nouveau_pgraph_intr_notify(struct drm_device *dev, uint32_t nsource)
> nouveau_graph_dump_trap_info(dev, "PGRAPH_NOTIFY", &trap);
> }
>
> -static DEFINE_RATELIMIT_STATE(nouveau_ratelimit_state, 3 * HZ, 20);
> -
> -static int nouveau_ratelimit(void)
> -{
> - return __ratelimit(&nouveau_ratelimit_state);
> -}
> -
>
> static inline void
> nouveau_pgraph_intr_error(struct drm_device *dev, uint32_t nsource)
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-10-04 23:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-04 13:11 [PATCH v2 1/1] nouveau: ratelimit IRQ messages Jiri Slaby
2010-10-04 16:24 ` Marcin Slusarz
2010-10-04 23:40 ` Ben Skeggs
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox