]> git.baikalelectronics.ru Git - kernel.git/commit
drm: handle HPD and polled connectors separately
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 23 Oct 2012 18:23:33 +0000 (18:23 +0000)
committerDave Airlie <airlied@redhat.com>
Tue, 20 Nov 2012 05:50:42 +0000 (15:50 +1000)
commit764caf8c67e419f36d766370dc27ac4d7058bf78
tree3e3bd2c22624db838a8456c167058b4e56b177fc
parentfafdcaf007a9a06896aa2e18e389ad0f0a84c187
drm: handle HPD and polled connectors separately

Instead of reusing the polling code for hpd handling, split them up.
This has a few consequences:
- Don't touch HPD capable connectors in the poll loop.
- Only touch HPD capable connectors in drm_helper_hpd_irq_event.
- We could run the HPD handling directly (because all callers already
  use their own work item), but for easier bisect that happens in it's
  own patch.

The ultimate goal is that drivers grow some smarts about which
connectors have received a hotplug event and only call the detect code
of that connector. But that's a second step.

v2: s/hdp/hpd/, noticed by Adam Jackson. I can't type.

v3: Split out the work item removal as requested by Dave Airlie. This
results in a temporary mode_config.hpd_irq_work item to keep things
the same.

v4: In the hpd_irq_event handler don't bail out if other bits than HPD
are set. This is useful where e.g. hpd is unreliably, but mostly
works. Drivers can then set both HPD and POLL flags, and users get the
best of both worlds: Quick hotplug feedback if the hpd works, but
still reliable detection with the polling. The poll loop already works
the same, and doesn't bail if HPD is set.

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