aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/drm_crtc_helper.c
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2012-10-23 18:23:34 +0000
committerDave Airlie <airlied@redhat.com>2012-11-20 15:50:57 +1000
commit69787f7da6b2adc4054357a661aaa1701a9ca76f (patch)
tree0db5e474558eb7526a01a953acfba3f97e9a7681 /drivers/gpu/drm/drm_crtc_helper.c
parent816da85a0990c2b52cfffa77637d1c770d6790e9 (diff)
drm: run the hpd irq event code directly
All drivers already have a work item to run the hpd code, so we don't need to launch a new one in the helper code. Dave Airlie mentioned that the cancel+re-queue might paper over DP related hpd ping-pongs, hence why this is split out. 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>
Diffstat (limited to 'drivers/gpu/drm/drm_crtc_helper.c')
-rw-r--r--drivers/gpu/drm/drm_crtc_helper.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c
index 9adbd2b311d..a8a61e43f93 100644
--- a/drivers/gpu/drm/drm_crtc_helper.c
+++ b/drivers/gpu/drm/drm_crtc_helper.c
@@ -1019,12 +1019,9 @@ void drm_kms_helper_poll_enable(struct drm_device *dev)
}
EXPORT_SYMBOL(drm_kms_helper_poll_enable);
-static void hpd_irq_event_execute(struct work_struct *work);
-
void drm_kms_helper_poll_init(struct drm_device *dev)
{
INIT_DELAYED_WORK(&dev->mode_config.output_poll_work, output_poll_execute);
- INIT_DELAYED_WORK(&dev->mode_config.hpd_irq_work, hpd_irq_event_execute);
dev->mode_config.poll_enabled = true;
drm_kms_helper_poll_enable(dev);
@@ -1037,10 +1034,8 @@ void drm_kms_helper_poll_fini(struct drm_device *dev)
}
EXPORT_SYMBOL(drm_kms_helper_poll_fini);
-static void hpd_irq_event_execute(struct work_struct *work)
+void drm_helper_hpd_irq_event(struct drm_device *dev)
{
- struct delayed_work *delayed_work = to_delayed_work(work);
- struct drm_device *dev = container_of(delayed_work, struct drm_device, mode_config.hpd_irq_work);
struct drm_connector *connector;
enum drm_connector_status old_status;
bool changed = false;
@@ -1071,11 +1066,4 @@ static void hpd_irq_event_execute(struct work_struct *work)
if (changed)
drm_kms_helper_hotplug_event(dev);
}
-
-void drm_helper_hpd_irq_event(struct drm_device *dev)
-{
- cancel_delayed_work(&dev->mode_config.hpd_irq_work);
- if (drm_kms_helper_poll)
- schedule_delayed_work(&dev->mode_config.hpd_irq_work, 0);
-}
EXPORT_SYMBOL(drm_helper_hpd_irq_event);