All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2/2] drm/probe_helper: warning on poll_enabled for issue catching
@ 2023-03-08 12:17 Guchun Chen
  2023-03-08 13:06 ` Jani Nikula
  0 siblings, 1 reply; 5+ messages in thread
From: Guchun Chen @ 2023-03-08 12:17 UTC (permalink / raw)
  To: amd-gfx, dri-devel, alexander.deucher, hawking.zhang,
	dmitry.baryshkov, spasswolf
  Cc: Guchun Chen

In order to catch issues in other drivers to ensure proper call
sequence of polling function.

Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/2411
Fixes: a4e771729a51("drm/probe_helper: sort out poll_running vs poll_enabled")
Reported-by: Bert Karwatzki <spasswolf@web.de>
Suggested-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Guchun Chen <guchun.chen@amd.com>
---
 drivers/gpu/drm/drm_probe_helper.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/drm_probe_helper.c b/drivers/gpu/drm/drm_probe_helper.c
index 8127be134c39..85e0e80d4a52 100644
--- a/drivers/gpu/drm/drm_probe_helper.c
+++ b/drivers/gpu/drm/drm_probe_helper.c
@@ -852,6 +852,8 @@ EXPORT_SYMBOL(drm_kms_helper_is_poll_worker);
  */
 void drm_kms_helper_poll_disable(struct drm_device *dev)
 {
+	WARN_ON(!dev->mode_config.poll_enabled);
+
 	if (dev->mode_config.poll_running)
 		drm_kms_helper_disable_hpd(dev);
 
-- 
2.25.1


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

* Re: [PATCH 2/2] drm/probe_helper: warning on poll_enabled for issue catching
  2023-03-08 12:17 [PATCH 2/2] drm/probe_helper: warning on poll_enabled for issue catching Guchun Chen
@ 2023-03-08 13:06 ` Jani Nikula
  0 siblings, 0 replies; 5+ messages in thread
From: Jani Nikula @ 2023-03-08 13:06 UTC (permalink / raw)
  To: Guchun Chen, amd-gfx, dri-devel, alexander.deucher, hawking.zhang,
	dmitry.baryshkov, spasswolf
  Cc: Guchun Chen

On Wed, 08 Mar 2023, Guchun Chen <guchun.chen@amd.com> wrote:
> In order to catch issues in other drivers to ensure proper call
> sequence of polling function.
>
> Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/2411
> Fixes: a4e771729a51("drm/probe_helper: sort out poll_running vs poll_enabled")

How does an additional warning "fix" anything?

> Reported-by: Bert Karwatzki <spasswolf@web.de>
> Suggested-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> Signed-off-by: Guchun Chen <guchun.chen@amd.com>
> ---
>  drivers/gpu/drm/drm_probe_helper.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/drm_probe_helper.c b/drivers/gpu/drm/drm_probe_helper.c
> index 8127be134c39..85e0e80d4a52 100644
> --- a/drivers/gpu/drm/drm_probe_helper.c
> +++ b/drivers/gpu/drm/drm_probe_helper.c
> @@ -852,6 +852,8 @@ EXPORT_SYMBOL(drm_kms_helper_is_poll_worker);
>   */
>  void drm_kms_helper_poll_disable(struct drm_device *dev)
>  {
> +	WARN_ON(!dev->mode_config.poll_enabled);

drm_WARN_ON()  please.

> +
>  	if (dev->mode_config.poll_running)
>  		drm_kms_helper_disable_hpd(dev);

-- 
Jani Nikula, Intel Open Source Graphics Center

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

* [PATCH 2/2] drm/probe_helper: warning on poll_enabled for issue catching
@ 2023-03-09  5:48 Guchun Chen
  2023-03-09  8:49 ` Dmitry Baryshkov
  0 siblings, 1 reply; 5+ messages in thread
From: Guchun Chen @ 2023-03-09  5:48 UTC (permalink / raw)
  To: amd-gfx, dri-devel, alexander.deucher, hawking.zhang,
	dmitry.baryshkov, spasswolf, mike
  Cc: Guchun Chen

In order to catch issues in other drivers to ensure proper call
sequence of polling function.

Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/2411
Fixes: a4e771729a51("drm/probe_helper: sort out poll_running vs poll_enabled")
Reported-by: Bert Karwatzki <spasswolf@web.de>
Suggested-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Guchun Chen <guchun.chen@amd.com>
---
 drivers/gpu/drm/drm_probe_helper.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/drm_probe_helper.c b/drivers/gpu/drm/drm_probe_helper.c
index 8127be134c39..85e0e80d4a52 100644
--- a/drivers/gpu/drm/drm_probe_helper.c
+++ b/drivers/gpu/drm/drm_probe_helper.c
@@ -852,6 +852,8 @@ EXPORT_SYMBOL(drm_kms_helper_is_poll_worker);
  */
 void drm_kms_helper_poll_disable(struct drm_device *dev)
 {
+	WARN_ON(!dev->mode_config.poll_enabled);
+
 	if (dev->mode_config.poll_running)
 		drm_kms_helper_disable_hpd(dev);
 
-- 
2.25.1


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

* Re: [PATCH 2/2] drm/probe_helper: warning on poll_enabled for issue catching
  2023-03-09  5:48 Guchun Chen
@ 2023-03-09  8:49 ` Dmitry Baryshkov
  2023-03-09 13:08   ` Chen, Guchun
  0 siblings, 1 reply; 5+ messages in thread
From: Dmitry Baryshkov @ 2023-03-09  8:49 UTC (permalink / raw)
  To: Guchun Chen, amd-gfx, dri-devel, alexander.deucher, hawking.zhang,
	spasswolf, mike

On 09/03/2023 07:48, Guchun Chen wrote:
> In order to catch issues in other drivers to ensure proper call
> sequence of polling function.
> 
> Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/2411
> Fixes: a4e771729a51("drm/probe_helper: sort out poll_running vs poll_enabled")

Previously it was suggested that this is not a fix, so the Fixes header 
is incorrect.

Also please use -vN when preparing/sending patchsets. This is v2.

> Reported-by: Bert Karwatzki <spasswolf@web.de>
> Suggested-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> Signed-off-by: Guchun Chen <guchun.chen@amd.com>
> ---
>   drivers/gpu/drm/drm_probe_helper.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/gpu/drm/drm_probe_helper.c b/drivers/gpu/drm/drm_probe_helper.c
> index 8127be134c39..85e0e80d4a52 100644
> --- a/drivers/gpu/drm/drm_probe_helper.c
> +++ b/drivers/gpu/drm/drm_probe_helper.c
> @@ -852,6 +852,8 @@ EXPORT_SYMBOL(drm_kms_helper_is_poll_worker);
>    */
>   void drm_kms_helper_poll_disable(struct drm_device *dev)
>   {
> +	WARN_ON(!dev->mode_config.poll_enabled);
> +
>   	if (dev->mode_config.poll_running)
>   		drm_kms_helper_disable_hpd(dev);
>   

-- 
With best wishes
Dmitry


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

* RE: [PATCH 2/2] drm/probe_helper: warning on poll_enabled for issue catching
  2023-03-09  8:49 ` Dmitry Baryshkov
@ 2023-03-09 13:08   ` Chen, Guchun
  0 siblings, 0 replies; 5+ messages in thread
From: Chen, Guchun @ 2023-03-09 13:08 UTC (permalink / raw)
  To: Dmitry Baryshkov, amd-gfx@lists.freedesktop.org,
	dri-devel@lists.freedesktop.org, Deucher, Alexander,
	Zhang, Hawking, spasswolf@web.de, mike@fireburn.co.uk



> -----Original Message-----
> From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> Sent: Thursday, March 9, 2023 4:49 PM
> To: Chen, Guchun <Guchun.Chen@amd.com>; amd-
> gfx@lists.freedesktop.org; dri-devel@lists.freedesktop.org; Deucher,
> Alexander <Alexander.Deucher@amd.com>; Zhang, Hawking
> <Hawking.Zhang@amd.com>; spasswolf@web.de; mike@fireburn.co.uk
> Subject: Re: [PATCH 2/2] drm/probe_helper: warning on poll_enabled for
> issue catching
> 
> On 09/03/2023 07:48, Guchun Chen wrote:
> > In order to catch issues in other drivers to ensure proper call
> > sequence of polling function.
> >
> > Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/2411
> > Fixes: a4e771729a51("drm/probe_helper: sort out poll_running vs
> > poll_enabled")
> 
> Previously it was suggested that this is not a fix, so the Fixes header is
> incorrect.
> 
> Also please use -vN when preparing/sending patchsets. This is v2.

Will fix these in V3.
 
Regards,
Guchun

> > Reported-by: Bert Karwatzki <spasswolf@web.de>
> > Suggested-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> > Signed-off-by: Guchun Chen <guchun.chen@amd.com>
> > ---
> >   drivers/gpu/drm/drm_probe_helper.c | 2 ++
> >   1 file changed, 2 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/drm_probe_helper.c
> > b/drivers/gpu/drm/drm_probe_helper.c
> > index 8127be134c39..85e0e80d4a52 100644
> > --- a/drivers/gpu/drm/drm_probe_helper.c
> > +++ b/drivers/gpu/drm/drm_probe_helper.c
> > @@ -852,6 +852,8 @@
> EXPORT_SYMBOL(drm_kms_helper_is_poll_worker);
> >    */
> >   void drm_kms_helper_poll_disable(struct drm_device *dev)
> >   {
> > +	WARN_ON(!dev->mode_config.poll_enabled);
> > +
> >   	if (dev->mode_config.poll_running)
> >   		drm_kms_helper_disable_hpd(dev);
> >
> 
> --
> With best wishes
> Dmitry


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

end of thread, other threads:[~2023-03-09 13:08 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-08 12:17 [PATCH 2/2] drm/probe_helper: warning on poll_enabled for issue catching Guchun Chen
2023-03-08 13:06 ` Jani Nikula
  -- strict thread matches above, loose matches on Subject: below --
2023-03-09  5:48 Guchun Chen
2023-03-09  8:49 ` Dmitry Baryshkov
2023-03-09 13:08   ` Chen, Guchun

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.