Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm: extract drm_kms_helper_hotplug_event

Useful if drivers want to be slightly more clever about hotplug
handling.

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>

authored by

Daniel Vetter and committed by
Dave Airlie
3d3683f0 c6eefa17

+12 -6
+11 -6
drivers/gpu/drm/drm_crtc_helper.c
··· 936 936 } 937 937 EXPORT_SYMBOL(drm_helper_resume_force_mode); 938 938 939 + void drm_kms_helper_hotplug_event(struct drm_device *dev) 940 + { 941 + /* send a uevent + call fbdev */ 942 + drm_sysfs_hotplug_event(dev); 943 + if (dev->mode_config.funcs->output_poll_changed) 944 + dev->mode_config.funcs->output_poll_changed(dev); 945 + } 946 + EXPORT_SYMBOL(drm_kms_helper_hotplug_event); 947 + 939 948 #define DRM_OUTPUT_POLL_PERIOD (10*HZ) 940 949 static void output_poll_execute(struct work_struct *work) 941 950 { ··· 987 978 988 979 mutex_unlock(&dev->mode_config.mutex); 989 980 990 - if (changed) { 991 - /* send a uevent + call fbdev */ 992 - drm_sysfs_hotplug_event(dev); 993 - if (dev->mode_config.funcs->output_poll_changed) 994 - dev->mode_config.funcs->output_poll_changed(dev); 995 - } 981 + if (changed) 982 + drm_kms_helper_hotplug_event(dev); 996 983 997 984 if (repoll) 998 985 schedule_delayed_work(delayed_work, DRM_OUTPUT_POLL_PERIOD);
+1
include/drm/drm_crtc_helper.h
··· 164 164 extern void drm_kms_helper_poll_init(struct drm_device *dev); 165 165 extern void drm_kms_helper_poll_fini(struct drm_device *dev); 166 166 extern void drm_helper_hpd_irq_event(struct drm_device *dev); 167 + extern void drm_kms_helper_hotplug_event(struct drm_device *dev); 167 168 168 169 extern void drm_kms_helper_poll_disable(struct drm_device *dev); 169 170 extern void drm_kms_helper_poll_enable(struct drm_device *dev);