diff mbox series

[v2,5/5] drm/komeda: add rate limiting disable to err_verbosity

Message ID 20191107114155.54307-6-mihail.atanassov@arm.com (mailing list archive)
State New, archived
Headers show
Series drm/komeda: Improve IRQ error event prints | expand

Commit Message

Mihail Atanassov Nov. 7, 2019, 11:42 a.m. UTC
It's possible to get multiple events in a single frame/flip, so add an
option to print them all.

Reviewed-by: James Qian Wang (Arm Technology China) <james.qian.wang@arm.com>
Signed-off-by: Mihail Atanassov <mihail.atanassov@arm.com>
---

 v2: Clean up continuation line warning from checkpatch.

 drivers/gpu/drm/arm/display/komeda/komeda_dev.h   | 2 ++
 drivers/gpu/drm/arm/display/komeda/komeda_event.c | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

Comments

Liviu Dudau Nov. 11, 2019, 3:53 p.m. UTC | #1
On Thu, Nov 07, 2019 at 11:42:44AM +0000, Mihail Atanassov wrote:
> It's possible to get multiple events in a single frame/flip, so add an
> option to print them all.
> 
> Reviewed-by: James Qian Wang (Arm Technology China) <james.qian.wang@arm.com>
> Signed-off-by: Mihail Atanassov <mihail.atanassov@arm.com>

For the whole series:

Acked-by: Liviu Dudau <liviu.dudau@arm.com>

Best regards,
Liviu

> ---
> 
>  v2: Clean up continuation line warning from checkpatch.
> 
>  drivers/gpu/drm/arm/display/komeda/komeda_dev.h   | 2 ++
>  drivers/gpu/drm/arm/display/komeda/komeda_event.c | 2 +-
>  2 files changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_dev.h b/drivers/gpu/drm/arm/display/komeda/komeda_dev.h
> index d9fc9c48859a..15f52e304c08 100644
> --- a/drivers/gpu/drm/arm/display/komeda/komeda_dev.h
> +++ b/drivers/gpu/drm/arm/display/komeda/komeda_dev.h
> @@ -224,6 +224,8 @@ struct komeda_dev {
>  #define KOMEDA_DEV_PRINT_INFO_EVENTS BIT(2)
>  	/* Dump DRM state on an error or warning event. */
>  #define KOMEDA_DEV_PRINT_DUMP_STATE_ON_EVENT BIT(8)
> +	/* Disable rate limiting of event prints (normally one per commit) */
> +#define KOMEDA_DEV_PRINT_DISABLE_RATELIMIT BIT(12)
>  };
>  
>  static inline bool
> diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_event.c b/drivers/gpu/drm/arm/display/komeda/komeda_event.c
> index 7fd624761a2b..bf269683f811 100644
> --- a/drivers/gpu/drm/arm/display/komeda/komeda_event.c
> +++ b/drivers/gpu/drm/arm/display/komeda/komeda_event.c
> @@ -119,7 +119,7 @@ void komeda_print_events(struct komeda_events *evts, struct drm_device *dev)
>  	/* reduce the same msg print, only print the first evt for one frame */
>  	if (evts->global || is_new_frame(evts))
>  		en_print = true;
> -	if (!en_print)
> +	if (!(err_verbosity & KOMEDA_DEV_PRINT_DISABLE_RATELIMIT) && !en_print)
>  		return;
>  
>  	if (err_verbosity & KOMEDA_DEV_PRINT_ERR_EVENTS)
> -- 
> 2.23.0
>
Mihail Atanassov Nov. 12, 2019, 1 p.m. UTC | #2
On Monday, 11 November 2019 15:53:14 GMT Liviu Dudau wrote:
> On Thu, Nov 07, 2019 at 11:42:44AM +0000, Mihail Atanassov wrote:
> > It's possible to get multiple events in a single frame/flip, so add an
> > option to print them all.
> > 
> > Reviewed-by: James Qian Wang (Arm Technology China) <james.qian.wang@arm.com>
> > Signed-off-by: Mihail Atanassov <mihail.atanassov@arm.com>
> 
> For the whole series:
> 
> Acked-by: Liviu Dudau <liviu.dudau@arm.com>

Thanks, applied to drm-misc-next.

> 
> Best regards,
> Liviu
> 
> > ---
> > 
> >  v2: Clean up continuation line warning from checkpatch.
> > 
> >  drivers/gpu/drm/arm/display/komeda/komeda_dev.h   | 2 ++
> >  drivers/gpu/drm/arm/display/komeda/komeda_event.c | 2 +-
> >  2 files changed, 3 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_dev.h b/drivers/gpu/drm/arm/display/komeda/komeda_dev.h
> > index d9fc9c48859a..15f52e304c08 100644
> > --- a/drivers/gpu/drm/arm/display/komeda/komeda_dev.h
> > +++ b/drivers/gpu/drm/arm/display/komeda/komeda_dev.h
> > @@ -224,6 +224,8 @@ struct komeda_dev {
> >  #define KOMEDA_DEV_PRINT_INFO_EVENTS BIT(2)
> >  	/* Dump DRM state on an error or warning event. */
> >  #define KOMEDA_DEV_PRINT_DUMP_STATE_ON_EVENT BIT(8)
> > +	/* Disable rate limiting of event prints (normally one per commit) */
> > +#define KOMEDA_DEV_PRINT_DISABLE_RATELIMIT BIT(12)
> >  };
> >  
> >  static inline bool
> > diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_event.c b/drivers/gpu/drm/arm/display/komeda/komeda_event.c
> > index 7fd624761a2b..bf269683f811 100644
> > --- a/drivers/gpu/drm/arm/display/komeda/komeda_event.c
> > +++ b/drivers/gpu/drm/arm/display/komeda/komeda_event.c
> > @@ -119,7 +119,7 @@ void komeda_print_events(struct komeda_events *evts, struct drm_device *dev)
> >  	/* reduce the same msg print, only print the first evt for one frame */
> >  	if (evts->global || is_new_frame(evts))
> >  		en_print = true;
> > -	if (!en_print)
> > +	if (!(err_verbosity & KOMEDA_DEV_PRINT_DISABLE_RATELIMIT) && !en_print)
> >  		return;
> >  
> >  	if (err_verbosity & KOMEDA_DEV_PRINT_ERR_EVENTS)
> > -- 
> > 2.23.0
> > 
> 
> -- 
> ====================
> | I would like to |
> | fix the world,  |
> | but they're not |
> | giving me the   |
>  \ source code!  /
>   ---------------
>     ¯\_(ツ)_/¯
>
Daniel Vetter Nov. 12, 2019, 6:24 p.m. UTC | #3
On Tue, Nov 12, 2019 at 2:00 PM Mihail Atanassov
<Mihail.Atanassov@arm.com> wrote:
>
> On Monday, 11 November 2019 15:53:14 GMT Liviu Dudau wrote:
> > On Thu, Nov 07, 2019 at 11:42:44AM +0000, Mihail Atanassov wrote:
> > > It's possible to get multiple events in a single frame/flip, so add an
> > > option to print them all.
> > >
> > > Reviewed-by: James Qian Wang (Arm Technology China) <james.qian.wang@arm.com>
> > > Signed-off-by: Mihail Atanassov <mihail.atanassov@arm.com>
> >
> > For the whole series:
> >
> > Acked-by: Liviu Dudau <liviu.dudau@arm.com>
>
> Thanks, applied to drm-misc-next.

And now komeda doesn't even compile anymore. I'm ... impressed.

I mean generally people break other people's driver, not their own.
-Daniel

> >
> > Best regards,
> > Liviu
> >
> > > ---
> > >
> > >  v2: Clean up continuation line warning from checkpatch.
> > >
> > >  drivers/gpu/drm/arm/display/komeda/komeda_dev.h   | 2 ++
> > >  drivers/gpu/drm/arm/display/komeda/komeda_event.c | 2 +-
> > >  2 files changed, 3 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_dev.h b/drivers/gpu/drm/arm/display/komeda/komeda_dev.h
> > > index d9fc9c48859a..15f52e304c08 100644
> > > --- a/drivers/gpu/drm/arm/display/komeda/komeda_dev.h
> > > +++ b/drivers/gpu/drm/arm/display/komeda/komeda_dev.h
> > > @@ -224,6 +224,8 @@ struct komeda_dev {
> > >  #define KOMEDA_DEV_PRINT_INFO_EVENTS BIT(2)
> > >     /* Dump DRM state on an error or warning event. */
> > >  #define KOMEDA_DEV_PRINT_DUMP_STATE_ON_EVENT BIT(8)
> > > +   /* Disable rate limiting of event prints (normally one per commit) */
> > > +#define KOMEDA_DEV_PRINT_DISABLE_RATELIMIT BIT(12)
> > >  };
> > >
> > >  static inline bool
> > > diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_event.c b/drivers/gpu/drm/arm/display/komeda/komeda_event.c
> > > index 7fd624761a2b..bf269683f811 100644
> > > --- a/drivers/gpu/drm/arm/display/komeda/komeda_event.c
> > > +++ b/drivers/gpu/drm/arm/display/komeda/komeda_event.c
> > > @@ -119,7 +119,7 @@ void komeda_print_events(struct komeda_events *evts, struct drm_device *dev)
> > >     /* reduce the same msg print, only print the first evt for one frame */
> > >     if (evts->global || is_new_frame(evts))
> > >             en_print = true;
> > > -   if (!en_print)
> > > +   if (!(err_verbosity & KOMEDA_DEV_PRINT_DISABLE_RATELIMIT) && !en_print)
> > >             return;
> > >
> > >     if (err_verbosity & KOMEDA_DEV_PRINT_ERR_EVENTS)
> > > --
> > > 2.23.0
> > >
> >
> > --
> > ====================
> > | I would like to |
> > | fix the world,  |
> > | but they're not |
> > | giving me the   |
> >  \ source code!  /
> >   ---------------
> >     ¯\_(ツ)_/¯
> >
>
>
> --
> Mihail
>
>
>
James Qian Wang Nov. 13, 2019, 1:42 a.m. UTC | #4
On Tue, Nov 12, 2019 at 07:24:16PM +0100, Daniel Vetter wrote:
> On Tue, Nov 12, 2019 at 2:00 PM Mihail Atanassov
> <Mihail.Atanassov@arm.com> wrote:
> >
> > On Monday, 11 November 2019 15:53:14 GMT Liviu Dudau wrote:
> > > On Thu, Nov 07, 2019 at 11:42:44AM +0000, Mihail Atanassov wrote:
> > > > It's possible to get multiple events in a single frame/flip, so add an
> > > > option to print them all.
> > > >
> > > > Reviewed-by: James Qian Wang (Arm Technology China) <james.qian.wang@arm.com>
> > > > Signed-off-by: Mihail Atanassov <mihail.atanassov@arm.com>
> > >
> > > For the whole series:
> > >
> > > Acked-by: Liviu Dudau <liviu.dudau@arm.com>
> >
> > Thanks, applied to drm-misc-next.
> 
> And now komeda doesn't even compile anymore. I'm ... impressed.
> 
> I mean generally people break other people's driver, not their own.
> -Daniel

Hi Daniel:

Real Real sorry, we will find a way to avoid such stupid problem.

And the fix is: https://patchwork.freedesktop.org/series/69386/

Best regards,
James
> > >
> > > Best regards,
> > > Liviu
> > >
> > > > ---
> > > >
> > > >  v2: Clean up continuation line warning from checkpatch.
> > > >
> > > >  drivers/gpu/drm/arm/display/komeda/komeda_dev.h   | 2 ++
> > > >  drivers/gpu/drm/arm/display/komeda/komeda_event.c | 2 +-
> > > >  2 files changed, 3 insertions(+), 1 deletion(-)
> > > >
> > > > diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_dev.h b/drivers/gpu/drm/arm/display/komeda/komeda_dev.h
> > > > index d9fc9c48859a..15f52e304c08 100644
> > > > --- a/drivers/gpu/drm/arm/display/komeda/komeda_dev.h
> > > > +++ b/drivers/gpu/drm/arm/display/komeda/komeda_dev.h
> > > > @@ -224,6 +224,8 @@ struct komeda_dev {
> > > >  #define KOMEDA_DEV_PRINT_INFO_EVENTS BIT(2)
> > > >     /* Dump DRM state on an error or warning event. */
> > > >  #define KOMEDA_DEV_PRINT_DUMP_STATE_ON_EVENT BIT(8)
> > > > +   /* Disable rate limiting of event prints (normally one per commit) */
> > > > +#define KOMEDA_DEV_PRINT_DISABLE_RATELIMIT BIT(12)
> > > >  };
> > > >
> > > >  static inline bool
> > > > diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_event.c b/drivers/gpu/drm/arm/display/komeda/komeda_event.c
> > > > index 7fd624761a2b..bf269683f811 100644
> > > > --- a/drivers/gpu/drm/arm/display/komeda/komeda_event.c
> > > > +++ b/drivers/gpu/drm/arm/display/komeda/komeda_event.c
> > > > @@ -119,7 +119,7 @@ void komeda_print_events(struct komeda_events *evts, struct drm_device *dev)
> > > >     /* reduce the same msg print, only print the first evt for one frame */
> > > >     if (evts->global || is_new_frame(evts))
> > > >             en_print = true;
> > > > -   if (!en_print)
> > > > +   if (!(err_verbosity & KOMEDA_DEV_PRINT_DISABLE_RATELIMIT) && !en_print)
> > > >             return;
> > > >
> > > >     if (err_verbosity & KOMEDA_DEV_PRINT_ERR_EVENTS)
> > > > --
> > > > 2.23.0
> > > >
> > >
> > > --
> > > ====================
> > > | I would like to |
> > > | fix the world,  |
> > > | but they're not |
> > > | giving me the   |
> > >  \ source code!  /
> > >   ---------------
> > >     ¯\_(ツ)_/¯
> > >
> >
> >
> > --
> > Mihail
> >
> >
> >
> 
> 
> -- 
> Daniel Vetter
> Software Engineer, Intel Corporation
> +41 (0) 79 365 57 48 - http://blog.ffwll.ch
Mihail Atanassov Nov. 13, 2019, 1:43 p.m. UTC | #5
On Tuesday, 12 November 2019 18:24:16 GMT Daniel Vetter wrote:
> On Tue, Nov 12, 2019 at 2:00 PM Mihail Atanassov
> <Mihail.Atanassov@arm.com> wrote:
> >
> > On Monday, 11 November 2019 15:53:14 GMT Liviu Dudau wrote:
> > > On Thu, Nov 07, 2019 at 11:42:44AM +0000, Mihail Atanassov wrote:
> > > > It's possible to get multiple events in a single frame/flip, so add an
> > > > option to print them all.
> > > >
> > > > Reviewed-by: James Qian Wang (Arm Technology China) <james.qian.wang@arm.com>
> > > > Signed-off-by: Mihail Atanassov <mihail.atanassov@arm.com>
> > >
> > > For the whole series:
> > >
> > > Acked-by: Liviu Dudau <liviu.dudau@arm.com>
> >
> > Thanks, applied to drm-misc-next.
> 
> And now komeda doesn't even compile anymore. I'm ... impressed.
> 

Mea culpa! Sorry about the breakage, I did build-test but apparently
not the right checkout :/. I'll adjust my workflow to make sure this
doesn't happen again.

> I mean generally people break other people's driver, not their own.
> -Daniel
> 
> > >
> > > Best regards,
> > > Liviu
> > >
> > > > ---
> > > >
> > > >  v2: Clean up continuation line warning from checkpatch.
> > > >
> > > >  drivers/gpu/drm/arm/display/komeda/komeda_dev.h   | 2 ++
> > > >  drivers/gpu/drm/arm/display/komeda/komeda_event.c | 2 +-
> > > >  2 files changed, 3 insertions(+), 1 deletion(-)
> > > >
> > > > diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_dev.h b/drivers/gpu/drm/arm/display/komeda/komeda_dev.h
> > > > index d9fc9c48859a..15f52e304c08 100644
> > > > --- a/drivers/gpu/drm/arm/display/komeda/komeda_dev.h
> > > > +++ b/drivers/gpu/drm/arm/display/komeda/komeda_dev.h
> > > > @@ -224,6 +224,8 @@ struct komeda_dev {
> > > >  #define KOMEDA_DEV_PRINT_INFO_EVENTS BIT(2)
> > > >     /* Dump DRM state on an error or warning event. */
> > > >  #define KOMEDA_DEV_PRINT_DUMP_STATE_ON_EVENT BIT(8)
> > > > +   /* Disable rate limiting of event prints (normally one per commit) */
> > > > +#define KOMEDA_DEV_PRINT_DISABLE_RATELIMIT BIT(12)
> > > >  };
> > > >
> > > >  static inline bool
> > > > diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_event.c b/drivers/gpu/drm/arm/display/komeda/komeda_event.c
> > > > index 7fd624761a2b..bf269683f811 100644
> > > > --- a/drivers/gpu/drm/arm/display/komeda/komeda_event.c
> > > > +++ b/drivers/gpu/drm/arm/display/komeda/komeda_event.c
> > > > @@ -119,7 +119,7 @@ void komeda_print_events(struct komeda_events *evts, struct drm_device *dev)
> > > >     /* reduce the same msg print, only print the first evt for one frame */
> > > >     if (evts->global || is_new_frame(evts))
> > > >             en_print = true;
> > > > -   if (!en_print)
> > > > +   if (!(err_verbosity & KOMEDA_DEV_PRINT_DISABLE_RATELIMIT) && !en_print)
> > > >             return;
> > > >
> > > >     if (err_verbosity & KOMEDA_DEV_PRINT_ERR_EVENTS)
> > > > --
> > > > 2.23.0
> > > >
> > >
> > > --
> > > ====================
> > > | I would like to |
> > > | fix the world,  |
> > > | but they're not |
> > > | giving me the   |
> > >  \ source code!  /
> > >   ---------------
> > >     ¯\_(ツ)_/¯
> > >
> >
> >
> > --
> > Mihail
> >
> >
> >
> 
> 
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_dev.h b/drivers/gpu/drm/arm/display/komeda/komeda_dev.h
index d9fc9c48859a..15f52e304c08 100644
--- a/drivers/gpu/drm/arm/display/komeda/komeda_dev.h
+++ b/drivers/gpu/drm/arm/display/komeda/komeda_dev.h
@@ -224,6 +224,8 @@  struct komeda_dev {
 #define KOMEDA_DEV_PRINT_INFO_EVENTS BIT(2)
 	/* Dump DRM state on an error or warning event. */
 #define KOMEDA_DEV_PRINT_DUMP_STATE_ON_EVENT BIT(8)
+	/* Disable rate limiting of event prints (normally one per commit) */
+#define KOMEDA_DEV_PRINT_DISABLE_RATELIMIT BIT(12)
 };
 
 static inline bool
diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_event.c b/drivers/gpu/drm/arm/display/komeda/komeda_event.c
index 7fd624761a2b..bf269683f811 100644
--- a/drivers/gpu/drm/arm/display/komeda/komeda_event.c
+++ b/drivers/gpu/drm/arm/display/komeda/komeda_event.c
@@ -119,7 +119,7 @@  void komeda_print_events(struct komeda_events *evts, struct drm_device *dev)
 	/* reduce the same msg print, only print the first evt for one frame */
 	if (evts->global || is_new_frame(evts))
 		en_print = true;
-	if (!en_print)
+	if (!(err_verbosity & KOMEDA_DEV_PRINT_DISABLE_RATELIMIT) && !en_print)
 		return;
 
 	if (err_verbosity & KOMEDA_DEV_PRINT_ERR_EVENTS)