]> git.baikalelectronics.ru Git - kernel.git/commit
drm: don't start the poll engine in probe_single_connector
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 23 Oct 2012 18:23:36 +0000 (18:23 +0000)
committerDave Airlie <airlied@redhat.com>
Tue, 20 Nov 2012 05:51:17 +0000 (15:51 +1000)
commit8f7666df83d6b7f76b525157765459d2b20b0077
tree633d4f1b534dc859139a614425f528d5a536077d
parentfcd2117187370f094d683970cbf82d531e6b11fc
drm: don't start the poll engine in probe_single_connector

Actually there's a reason this stuff is there, and it's called

commit be7c748b599b53956bf444a59a34b5d1e943e16b
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Fri Aug 20 09:13:36 2010 +0100

    drm/kms: Add a module parameter to disable polling

The idea has been that users can enable/disable polling at runtime. So
the quick hack has been to just re-enable the output polling if xrandr
asks for the latest state of the connectors.

The problem with that hack is that when we force connectors to another
state than what would be detected, we nicely ping-pong:
- Userspace calls probe, gets the forced state, but polling starts
  again.
- Polling notices that the state is actually different, wakes up
  userspace.
- Repeat.

As that commit already explains, the right fix would be to make the
locking more fine-grained, so that hotplug detection on one output
does not interfere with cursor updates on another crtc.

But that is way too much work. So let's just safe this gross hack by
caching the last-seen state of drm_kms_helper_poll for that driver,
and only fire up the poll engine again if it changed from off to on.

v2: Fixup the edge detection of drm_kms_helper_poll.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=49907
Tested-by: Tvrtko Ursulin <tvrtko.ursulin@onelan.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/drm_crtc_helper.c
include/drm/drm_crtc.h