diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-10-23 14:23:34 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2012-11-20 00:50:57 -0500 |
commit | 69787f7da6b2adc4054357a661aaa1701a9ca76f (patch) | |
tree | 0db5e474558eb7526a01a953acfba3f97e9a7681 /drivers/gpu/drm/drm_crtc_helper.c | |
parent | 816da85a0990c2b52cfffa77637d1c770d6790e9 (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.c | 14 |
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 9adbd2b311d0..a8a61e43f93b 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) | |||
1019 | } | 1019 | } |
1020 | EXPORT_SYMBOL(drm_kms_helper_poll_enable); | 1020 | EXPORT_SYMBOL(drm_kms_helper_poll_enable); |
1021 | 1021 | ||
1022 | static void hpd_irq_event_execute(struct work_struct *work); | ||
1023 | |||
1024 | void drm_kms_helper_poll_init(struct drm_device *dev) | 1022 | void drm_kms_helper_poll_init(struct drm_device *dev) |
1025 | { | 1023 | { |
1026 | INIT_DELAYED_WORK(&dev->mode_config.output_poll_work, output_poll_execute); | 1024 | INIT_DELAYED_WORK(&dev->mode_config.output_poll_work, output_poll_execute); |
1027 | INIT_DELAYED_WORK(&dev->mode_config.hpd_irq_work, hpd_irq_event_execute); | ||
1028 | dev->mode_config.poll_enabled = true; | 1025 | dev->mode_config.poll_enabled = true; |
1029 | 1026 | ||
1030 | drm_kms_helper_poll_enable(dev); | 1027 | drm_kms_helper_poll_enable(dev); |
@@ -1037,10 +1034,8 @@ void drm_kms_helper_poll_fini(struct drm_device *dev) | |||
1037 | } | 1034 | } |
1038 | EXPORT_SYMBOL(drm_kms_helper_poll_fini); | 1035 | EXPORT_SYMBOL(drm_kms_helper_poll_fini); |
1039 | 1036 | ||
1040 | static void hpd_irq_event_execute(struct work_struct *work) | 1037 | void drm_helper_hpd_irq_event(struct drm_device *dev) |
1041 | { | 1038 | { |
1042 | struct delayed_work *delayed_work = to_delayed_work(work); | ||
1043 | struct drm_device *dev = container_of(delayed_work, struct drm_device, mode_config.hpd_irq_work); | ||
1044 | struct drm_connector *connector; | 1039 | struct drm_connector *connector; |
1045 | enum drm_connector_status old_status; | 1040 | enum drm_connector_status old_status; |
1046 | bool changed = false; | 1041 | bool changed = false; |
@@ -1071,11 +1066,4 @@ static void hpd_irq_event_execute(struct work_struct *work) | |||
1071 | if (changed) | 1066 | if (changed) |
1072 | drm_kms_helper_hotplug_event(dev); | 1067 | drm_kms_helper_hotplug_event(dev); |
1073 | } | 1068 | } |
1074 | |||
1075 | void drm_helper_hpd_irq_event(struct drm_device *dev) | ||
1076 | { | ||
1077 | cancel_delayed_work(&dev->mode_config.hpd_irq_work); | ||
1078 | if (drm_kms_helper_poll) | ||
1079 | schedule_delayed_work(&dev->mode_config.hpd_irq_work, 0); | ||
1080 | } | ||
1081 | EXPORT_SYMBOL(drm_helper_hpd_irq_event); | 1069 | EXPORT_SYMBOL(drm_helper_hpd_irq_event); |