[v4,0/2] drm: Check polling initialized before

Message ID 1706856176-9483-1-git-send-email-shradhagupta@linux.microsoft.com
Headers
Series drm: Check polling initialized before |

Message

Shradha Gupta Feb. 2, 2024, 6:42 a.m. UTC
  This patchset consists of sanity checks before enabling/disabling
output polling to make sure we do not call polling enable and disable
functions when polling for the device is not initialized or is now
uninitialized(by drm_kms_helper_poll_fini() function)

The first patch consists of these checks in
drm_kms_helper_poll_disable() and drm_kms_helper_poll_enable() calls.
It further flags a warning if a caller violates this. It also adds
these checks in drm_mode_config_helper_resume() and
drm_mode_config_helper_suspend() calls to avoid this warning.

The second patch adds a similar missing check in
drm_helper_probe_single_connector_modes() function that is exposed by
the new warning introduced in the first patch.

Shradha Gupta (2):
  drm: Check output polling initialized before disabling
  drm: Check polling initialized before enabling in
    drm_helper_probe_single_connector_modes

 drivers/gpu/drm/drm_modeset_helper.c | 19 ++++++++++++++++---
 drivers/gpu/drm/drm_probe_helper.c   | 21 +++++++++++++++++----
 2 files changed, 33 insertions(+), 7 deletions(-)
  

Comments

Daniel Vetter Feb. 6, 2024, 2:07 p.m. UTC | #1
On Thu, Feb 01, 2024 at 10:42:56PM -0800, Shradha Gupta wrote:
> This patchset consists of sanity checks before enabling/disabling
> output polling to make sure we do not call polling enable and disable
> functions when polling for the device is not initialized or is now
> uninitialized(by drm_kms_helper_poll_fini() function)
> 
> The first patch consists of these checks in
> drm_kms_helper_poll_disable() and drm_kms_helper_poll_enable() calls.
> It further flags a warning if a caller violates this. It also adds
> these checks in drm_mode_config_helper_resume() and
> drm_mode_config_helper_suspend() calls to avoid this warning.
> 
> The second patch adds a similar missing check in
> drm_helper_probe_single_connector_modes() function that is exposed by
> the new warning introduced in the first patch.
> 
> Shradha Gupta (2):
>   drm: Check output polling initialized before disabling
>   drm: Check polling initialized before enabling in
>     drm_helper_probe_single_connector_modes

On the series:

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>

> 
>  drivers/gpu/drm/drm_modeset_helper.c | 19 ++++++++++++++++---
>  drivers/gpu/drm/drm_probe_helper.c   | 21 +++++++++++++++++----
>  2 files changed, 33 insertions(+), 7 deletions(-)
> 
> -- 
> 2.34.1
>
  
Shradha Gupta Feb. 20, 2024, 6:02 a.m. UTC | #2
Gentle reminder to consume this patchset.

On Tue, Feb 06, 2024 at 03:07:47PM +0100, Daniel Vetter wrote:
> On Thu, Feb 01, 2024 at 10:42:56PM -0800, Shradha Gupta wrote:
> > This patchset consists of sanity checks before enabling/disabling
> > output polling to make sure we do not call polling enable and disable
> > functions when polling for the device is not initialized or is now
> > uninitialized(by drm_kms_helper_poll_fini() function)
> > 
> > The first patch consists of these checks in
> > drm_kms_helper_poll_disable() and drm_kms_helper_poll_enable() calls.
> > It further flags a warning if a caller violates this. It also adds
> > these checks in drm_mode_config_helper_resume() and
> > drm_mode_config_helper_suspend() calls to avoid this warning.
> > 
> > The second patch adds a similar missing check in
> > drm_helper_probe_single_connector_modes() function that is exposed by
> > the new warning introduced in the first patch.
> > 
> > Shradha Gupta (2):
> >   drm: Check output polling initialized before disabling
> >   drm: Check polling initialized before enabling in
> >     drm_helper_probe_single_connector_modes
> 
> On the series:
> 
> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> 
> > 
> >  drivers/gpu/drm/drm_modeset_helper.c | 19 ++++++++++++++++---
> >  drivers/gpu/drm/drm_probe_helper.c   | 21 +++++++++++++++++----
> >  2 files changed, 33 insertions(+), 7 deletions(-)
> > 
> > -- 
> > 2.34.1
> > 
> 
> -- 
> Daniel Vetter
> Software Engineer, Intel Corporation
> http://blog.ffwll.ch
  
Daniel Vetter Feb. 28, 2024, 2:08 p.m. UTC | #3
On Mon, Feb 19, 2024 at 10:02:17PM -0800, Shradha Gupta wrote:
> Gentle reminder to consume this patchset.

Apologies, I've assumed you have commit rights or know someone, but seems
like no one from microsoft can push to drm-misc :-/

Applied to drm-misc-next now, thanks for your patches!
-Sima

> 
> On Tue, Feb 06, 2024 at 03:07:47PM +0100, Daniel Vetter wrote:
> > On Thu, Feb 01, 2024 at 10:42:56PM -0800, Shradha Gupta wrote:
> > > This patchset consists of sanity checks before enabling/disabling
> > > output polling to make sure we do not call polling enable and disable
> > > functions when polling for the device is not initialized or is now
> > > uninitialized(by drm_kms_helper_poll_fini() function)
> > > 
> > > The first patch consists of these checks in
> > > drm_kms_helper_poll_disable() and drm_kms_helper_poll_enable() calls.
> > > It further flags a warning if a caller violates this. It also adds
> > > these checks in drm_mode_config_helper_resume() and
> > > drm_mode_config_helper_suspend() calls to avoid this warning.
> > > 
> > > The second patch adds a similar missing check in
> > > drm_helper_probe_single_connector_modes() function that is exposed by
> > > the new warning introduced in the first patch.
> > > 
> > > Shradha Gupta (2):
> > >   drm: Check output polling initialized before disabling
> > >   drm: Check polling initialized before enabling in
> > >     drm_helper_probe_single_connector_modes
> > 
> > On the series:
> > 
> > Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> > 
> > > 
> > >  drivers/gpu/drm/drm_modeset_helper.c | 19 ++++++++++++++++---
> > >  drivers/gpu/drm/drm_probe_helper.c   | 21 +++++++++++++++++----
> > >  2 files changed, 33 insertions(+), 7 deletions(-)
> > > 
> > > -- 
> > > 2.34.1
> > > 
> > 
> > -- 
> > Daniel Vetter
> > Software Engineer, Intel Corporation
> > http://blog.ffwll.ch