Skip to content
Commit 9a2eba33 authored by Peter Ujfalusi's avatar Peter Ujfalusi Committed by Ben Skeggs
Browse files

drm/nouveau: Fix drm poll_helper handling

Commit cae9ff03 effectively disabled the drm poll_helper by checking
the wrong flag to see if the driver should enable the poll or not:
mode_config.poll_enabled is only set to true by poll_init and it is not
indicating if the poll is enabled or not.
nouveau_display_create() will initialize the poll and going to disable it
right away. After poll_init() the mode_config.poll_enabled will be true,
but the poll itself is disabled.

To avoid the race caused by calling the poll_enable() from different paths,
this patch will enable the poll from one place, in the
nouveau_display_hpd_work().

In case the pm_runtime is disabled we will enable the poll in
nouveau_drm_load() once.

Fixes: cae9ff03

 ("drm/nouveau: Don't enabling polling twice on runtime resume")
Signed-off-by: default avatarPeter Ujfalusi <peter.ujfalusi@ti.com>
Reviewed-by: default avatarLyude <lyude@redhat.com>
Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent e4311ee5
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment