* [PATCH v3 1/1] nouveau: ratelimit IRQ messages
@ 2010-10-05 13:07 Jiri Slaby
2010-10-07 3:41 ` Ben Skeggs
0 siblings, 1 reply; 2+ messages in thread
From: Jiri Slaby @ 2010-10-05 13:07 UTC (permalink / raw)
To: bskeggs; +Cc: jirislaby, linux-kernel, Jiri Slaby
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>
Reviewed-by: Marcin Slusarz <marcin.slusarz@gmail.com>
---
Rebased on the top of nouveau git.
drivers/gpu/drm/nouveau/nouveau_irq.c | 26 ++++++++++++++------------
1 files changed, 14 insertions(+), 12 deletions(-)
diff --git a/drivers/gpu/drm/nouveau/nouveau_irq.c b/drivers/gpu/drm/nouveau/nouveau_irq.c
index 6fd51a5..b9e1ffe 100644
--- a/drivers/gpu/drm/nouveau/nouveau_irq.c
+++ b/drivers/gpu/drm/nouveau/nouveau_irq.c
@@ -42,6 +42,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)
{
@@ -213,11 +220,12 @@ nouveau_fifo_irq_handler(struct drm_device *dev)
u32 ib_get = nv_rd32(dev, 0x003334);
u32 ib_put = nv_rd32(dev, 0x003330);
- NV_INFO(dev, "PFIFO_DMA_PUSHER - Ch %d Get 0x%02x%08x "
+ if (nouveau_ratelimit())
+ NV_INFO(dev, "PFIFO_DMA_PUSHER - Ch %d Get 0x%02x%08x "
"Put 0x%02x%08x IbGet 0x%08x IbPut 0x%08x "
"State 0x%08x Push 0x%08x\n",
- chid, ho_get, get, ho_put, put, ib_get, ib_put,
- state, push);
+ chid, ho_get, get, ho_put, put,
+ ib_get, ib_put, state, push);
/* METHOD_COUNT, in DMA_STATE on earlier chipsets */
nv_wr32(dev, 0x003364, 0x00000000);
@@ -266,8 +274,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;
}
@@ -544,13 +553,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] 2+ messages in thread
* Re: [PATCH v3 1/1] nouveau: ratelimit IRQ messages
2010-10-05 13:07 [PATCH v3 1/1] nouveau: ratelimit IRQ messages Jiri Slaby
@ 2010-10-07 3:41 ` Ben Skeggs
0 siblings, 0 replies; 2+ messages in thread
From: Ben Skeggs @ 2010-10-07 3:41 UTC (permalink / raw)
To: Jiri Slaby; +Cc: jirislaby, linux-kernel
On Tue, 2010-10-05 at 15:07 +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>
> Reviewed-by: Marcin Slusarz <marcin.slusarz@gmail.com>
> ---
>
>
> Rebased on the top of nouveau git.
Thank you, I've pushed this to nouveau git now.
Ben.
>
>
> drivers/gpu/drm/nouveau/nouveau_irq.c | 26 ++++++++++++++------------
> 1 files changed, 14 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/gpu/drm/nouveau/nouveau_irq.c b/drivers/gpu/drm/nouveau/nouveau_irq.c
> index 6fd51a5..b9e1ffe 100644
> --- a/drivers/gpu/drm/nouveau/nouveau_irq.c
> +++ b/drivers/gpu/drm/nouveau/nouveau_irq.c
> @@ -42,6 +42,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)
> {
> @@ -213,11 +220,12 @@ nouveau_fifo_irq_handler(struct drm_device *dev)
> u32 ib_get = nv_rd32(dev, 0x003334);
> u32 ib_put = nv_rd32(dev, 0x003330);
>
> - NV_INFO(dev, "PFIFO_DMA_PUSHER - Ch %d Get 0x%02x%08x "
> + if (nouveau_ratelimit())
> + NV_INFO(dev, "PFIFO_DMA_PUSHER - Ch %d Get 0x%02x%08x "
> "Put 0x%02x%08x IbGet 0x%08x IbPut 0x%08x "
> "State 0x%08x Push 0x%08x\n",
> - chid, ho_get, get, ho_put, put, ib_get, ib_put,
> - state, push);
> + chid, ho_get, get, ho_put, put,
> + ib_get, ib_put, state, push);
>
> /* METHOD_COUNT, in DMA_STATE on earlier chipsets */
> nv_wr32(dev, 0x003364, 0x00000000);
> @@ -266,8 +274,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;
> }
> @@ -544,13 +553,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] 2+ messages in thread
end of thread, other threads:[~2010-10-07 3:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-05 13:07 [PATCH v3 1/1] nouveau: ratelimit IRQ messages Jiri Slaby
2010-10-07 3:41 ` Ben Skeggs
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome