dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/print: Add drm_dbg_ratelimited
@ 2023-10-06 13:26 Andi Shyti
  2023-10-09 16:52 ` Andi Shyti
  0 siblings, 1 reply; 5+ messages in thread
From: Andi Shyti @ 2023-10-06 13:26 UTC (permalink / raw)
  To: intel-gfx, dri-devel
  Cc: Thomas Zimmermann, Maxime Ripard, Matthew Auld, Andi Shyti,
	Nirmoy Das

From: Nirmoy Das <nirmoy.das@intel.com>

Add a function for ratelimitted debug print.

Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Maxime Ripard <mripard@kernel.org>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: David Airlie <airlied@gmail.com>
Cc: Daniel Vetter <daniel@ffwll.ch>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com>
Signed-off-by: Nirmoy Das <nirmoy.das@intel.com>
Signed-off-by: Andi Shyti <andi.shyti@linux.intel.com>
---
 include/drm/drm_print.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/include/drm/drm_print.h b/include/drm/drm_print.h
index a93a387f8a1a..ad77ac4b6808 100644
--- a/include/drm/drm_print.h
+++ b/include/drm/drm_print.h
@@ -602,6 +602,9 @@ void __drm_err(const char *format, ...);
 		drm_dev_printk(drm_ ? drm_->dev : NULL, KERN_DEBUG, fmt, ## __VA_ARGS__);	\
 })
 
+#define drm_dbg_ratelimited(drm, fmt, ...) \
+	__DRM_DEFINE_DBG_RATELIMITED(DRIVER, drm, fmt, ## __VA_ARGS__)
+
 #define drm_dbg_kms_ratelimited(drm, fmt, ...) \
 	__DRM_DEFINE_DBG_RATELIMITED(KMS, drm, fmt, ## __VA_ARGS__)
 
-- 
2.40.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] drm/print: Add drm_dbg_ratelimited
  2023-10-06 13:26 [PATCH] drm/print: Add drm_dbg_ratelimited Andi Shyti
@ 2023-10-09 16:52 ` Andi Shyti
  2023-10-09 18:52   ` [Intel-gfx] " John Harrison
  0 siblings, 1 reply; 5+ messages in thread
From: Andi Shyti @ 2023-10-09 16:52 UTC (permalink / raw)
  To: Andi Shyti
  Cc: intel-gfx, Matthew Auld, Maxime Ripard, dri-devel,
	Thomas Zimmermann, Nirmoy Das

Hi,

> From: Nirmoy Das <nirmoy.das@intel.com>
> 
> Add a function for ratelimitted debug print.
> 
> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Cc: Maxime Ripard <mripard@kernel.org>
> Cc: Thomas Zimmermann <tzimmermann@suse.de>
> Cc: David Airlie <airlied@gmail.com>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Reviewed-by: Matthew Auld <matthew.auld@intel.com>
> Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com>
> Signed-off-by: Nirmoy Das <nirmoy.das@intel.com>
> Signed-off-by: Andi Shyti <andi.shyti@linux.intel.com>

Just a kind reminder!

This is the second time this patch has been sent and we have seen
some potential use of the drm_dbg_ratelimited().

Any feedback?

Thanks,
Andi

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Intel-gfx] [PATCH] drm/print: Add drm_dbg_ratelimited
  2023-10-09 16:52 ` Andi Shyti
@ 2023-10-09 18:52   ` John Harrison
  2023-10-09 19:43     ` Andi Shyti
  0 siblings, 1 reply; 5+ messages in thread
From: John Harrison @ 2023-10-09 18:52 UTC (permalink / raw)
  To: Andi Shyti
  Cc: intel-gfx, Maxime Ripard, dri-devel, Thomas Zimmermann,
	Nirmoy Das, Matthew Auld

On 10/9/2023 09:52, Andi Shyti wrote:
> Hi,
>
>> From: Nirmoy Das <nirmoy.das@intel.com>
>>
>> Add a function for ratelimitted debug print.
>>
>> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
>> Cc: Maxime Ripard <mripard@kernel.org>
>> Cc: Thomas Zimmermann <tzimmermann@suse.de>
>> Cc: David Airlie <airlied@gmail.com>
>> Cc: Daniel Vetter <daniel@ffwll.ch>
>> Reviewed-by: Matthew Auld <matthew.auld@intel.com>
>> Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com>
>> Signed-off-by: Nirmoy Das <nirmoy.das@intel.com>
>> Signed-off-by: Andi Shyti <andi.shyti@linux.intel.com>
> Just a kind reminder!
>
> This is the second time this patch has been sent and we have seen
> some potential use of the drm_dbg_ratelimited().
But this patch does not actually add a user. So it is dead code at this 
point, which is not allowed.

If you have code that wants to use such a helper then the helper should 
be part of the patch that adds that code.

John.

>
> Any feedback?
>
> Thanks,
> Andi


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Intel-gfx] [PATCH] drm/print: Add drm_dbg_ratelimited
  2023-10-09 18:52   ` [Intel-gfx] " John Harrison
@ 2023-10-09 19:43     ` Andi Shyti
  2023-10-09 19:52       ` John Harrison
  0 siblings, 1 reply; 5+ messages in thread
From: Andi Shyti @ 2023-10-09 19:43 UTC (permalink / raw)
  To: John Harrison
  Cc: Andi Shyti, Thomas Zimmermann, intel-gfx, Maxime Ripard,
	dri-devel, Nirmoy Das, Matthew Auld

Hi John,

> > > From: Nirmoy Das <nirmoy.das@intel.com>
> > > 
> > > Add a function for ratelimitted debug print.
> > > 
> > > Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> > > Cc: Maxime Ripard <mripard@kernel.org>
> > > Cc: Thomas Zimmermann <tzimmermann@suse.de>
> > > Cc: David Airlie <airlied@gmail.com>
> > > Cc: Daniel Vetter <daniel@ffwll.ch>
> > > Reviewed-by: Matthew Auld <matthew.auld@intel.com>
> > > Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com>
> > > Signed-off-by: Nirmoy Das <nirmoy.das@intel.com>
> > > Signed-off-by: Andi Shyti <andi.shyti@linux.intel.com>
> > Just a kind reminder!
> > 
> > This is the second time this patch has been sent and we have seen
> > some potential use of the drm_dbg_ratelimited().
> But this patch does not actually add a user. So it is dead code at this
> point, which is not allowed.
> 
> If you have code that wants to use such a helper then the helper should be
> part of the patch that adds that code.

this is the kind of "Argh! If I had it!" patch. At the 3/4th
"Argh! If I had it!" then you decide to send it but don't
remember for which case you needed it.

I'm sure that once this goes in won't be long until poeple will
start using it. In any case, if it doesn't go in I will keep it
ready until the case comes.

Andi

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Intel-gfx] [PATCH] drm/print: Add drm_dbg_ratelimited
  2023-10-09 19:43     ` Andi Shyti
@ 2023-10-09 19:52       ` John Harrison
  0 siblings, 0 replies; 5+ messages in thread
From: John Harrison @ 2023-10-09 19:52 UTC (permalink / raw)
  To: Andi Shyti
  Cc: intel-gfx, Maxime Ripard, dri-devel, Thomas Zimmermann,
	Nirmoy Das, Matthew Auld

On 10/9/2023 12:43, Andi Shyti wrote:
> Hi John,
>
>>>> From: Nirmoy Das <nirmoy.das@intel.com>
>>>>
>>>> Add a function for ratelimitted debug print.
>>>>
>>>> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
>>>> Cc: Maxime Ripard <mripard@kernel.org>
>>>> Cc: Thomas Zimmermann <tzimmermann@suse.de>
>>>> Cc: David Airlie <airlied@gmail.com>
>>>> Cc: Daniel Vetter <daniel@ffwll.ch>
>>>> Reviewed-by: Matthew Auld <matthew.auld@intel.com>
>>>> Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com>
>>>> Signed-off-by: Nirmoy Das <nirmoy.das@intel.com>
>>>> Signed-off-by: Andi Shyti <andi.shyti@linux.intel.com>
>>> Just a kind reminder!
>>>
>>> This is the second time this patch has been sent and we have seen
>>> some potential use of the drm_dbg_ratelimited().
>> But this patch does not actually add a user. So it is dead code at this
>> point, which is not allowed.
>>
>> If you have code that wants to use such a helper then the helper should be
>> part of the patch that adds that code.
> this is the kind of "Argh! If I had it!" patch. At the 3/4th
> "Argh! If I had it!" then you decide to send it but don't
> remember for which case you needed it.
But you should have sent it on the 1st patch set that wanted it.

And if you have code already merged that would benefit from it, then 
update that code to use it and post that as a patch together with this 
implementation.

And note that if your code is GT related, then it should use 
gt_dbg_ratelimited not drm_dbg_ratelimited.

John.


>
> I'm sure that once this goes in won't be long until poeple will
> start using it. In any case, if it doesn't go in I will keep it
> ready until the case comes.
>
> Andi


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-10-09 19:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-06 13:26 [PATCH] drm/print: Add drm_dbg_ratelimited Andi Shyti
2023-10-09 16:52 ` Andi Shyti
2023-10-09 18:52   ` [Intel-gfx] " John Harrison
2023-10-09 19:43     ` Andi Shyti
2023-10-09 19:52       ` John Harrison

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox