Rev 3243 | Rev 3746 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3243 | Rev 3480 | ||
---|---|---|---|
Line 67... | Line 67... | ||
67 | list_splice(&panel_list, &dev->mode_config.connector_list); |
67 | list_splice(&panel_list, &dev->mode_config.connector_list); |
68 | } |
68 | } |
69 | EXPORT_SYMBOL(drm_helper_move_panel_connectors_to_head); |
69 | EXPORT_SYMBOL(drm_helper_move_panel_connectors_to_head); |
Line 70... | Line 70... | ||
70 | 70 | ||
- | 71 | static bool drm_kms_helper_poll = true; |
|
Line 71... | Line 72... | ||
71 | static bool drm_kms_helper_poll = true; |
72 | module_param_named(poll, drm_kms_helper_poll, bool, 0600); |
72 | 73 | ||
73 | static void drm_mode_validate_flag(struct drm_connector *connector, |
74 | static void drm_mode_validate_flag(struct drm_connector *connector, |
74 | int flags) |
75 | int flags) |
Line 139... | Line 140... | ||
139 | // dbgprintf("detect %p\n", connector->funcs->detect); |
140 | // dbgprintf("detect %p\n", connector->funcs->detect); |
140 | connector->status = connector->funcs->detect(connector, true); |
141 | connector->status = connector->funcs->detect(connector, true); |
141 | // dbgprintf("status %x\n", connector->status); |
142 | // dbgprintf("status %x\n", connector->status); |
142 | } |
143 | } |
Line -... | Line 144... | ||
- | 144 | ||
- | 145 | /* Re-enable polling in case the global poll config changed. */ |
|
- | 146 | if (drm_kms_helper_poll != dev->mode_config.poll_running) |
|
- | 147 | drm_kms_helper_poll_enable(dev); |
|
- | 148 | ||
- | 149 | dev->mode_config.poll_running = drm_kms_helper_poll; |
|
143 | 150 | ||
144 | if (connector->status == connector_status_disconnected) { |
151 | if (connector->status == connector_status_disconnected) { |
145 | DRM_DEBUG_KMS("[CONNECTOR:%d:%s] disconnected\n", |
152 | DRM_DEBUG_KMS("[CONNECTOR:%d:%s] disconnected\n", |
146 | connector->base.id, drm_get_connector_name(connector)); |
153 | connector->base.id, drm_get_connector_name(connector)); |
147 | drm_mode_connector_update_edid_property(connector, NULL); |
154 | drm_mode_connector_update_edid_property(connector, NULL); |
Line 953... | Line 960... | ||
953 | drm_helper_disable_unused_functions(dev); |
960 | drm_helper_disable_unused_functions(dev); |
954 | return 0; |
961 | return 0; |
955 | } |
962 | } |
956 | EXPORT_SYMBOL(drm_helper_resume_force_mode); |
963 | EXPORT_SYMBOL(drm_helper_resume_force_mode); |
Line -... | Line 964... | ||
- | 964 | ||
- | 965 | void drm_kms_helper_hotplug_event(struct drm_device *dev) |
|
- | 966 | { |
|
- | 967 | /* send a uevent + call fbdev */ |
|
- | 968 | if (dev->mode_config.funcs->output_poll_changed) |
|
957 | 969 | dev->mode_config.funcs->output_poll_changed(dev); |
|
- | 970 | } |
|
Line 958... | Line 971... | ||
958 | #if 0 |
971 | EXPORT_SYMBOL(drm_kms_helper_hotplug_event); |
959 | 972 | ||
960 | #define DRM_OUTPUT_POLL_PERIOD (10*HZ) |
973 | #define DRM_OUTPUT_POLL_PERIOD (10*HZ) |
961 | static void output_poll_execute(struct work_struct *work) |
974 | static void output_poll_execute(struct work_struct *work) |
Line 1002... | Line 1015... | ||
1002 | mutex_unlock(&dev->mode_config.mutex); |
1015 | mutex_unlock(&dev->mode_config.mutex); |
Line 1003... | Line 1016... | ||
1003 | 1016 | ||
1004 | if (changed) |
1017 | if (changed) |
Line 1005... | Line 1018... | ||
1005 | drm_kms_helper_hotplug_event(dev); |
1018 | drm_kms_helper_hotplug_event(dev); |
1006 | 1019 | ||
1007 | if (repoll) |
1020 | // if (repoll) |
Line 1008... | Line 1021... | ||
1008 | schedule_delayed_work(delayed_work, DRM_OUTPUT_POLL_PERIOD); |
1021 | // schedule_delayed_work(delayed_work, DRM_OUTPUT_POLL_PERIOD); |
1009 | } |
1022 | } |
1010 | 1023 | ||
1011 | void drm_kms_helper_poll_disable(struct drm_device *dev) |
1024 | void drm_kms_helper_poll_disable(struct drm_device *dev) |
1012 | { |
1025 | { |
1013 | if (!dev->mode_config.poll_enabled) |
1026 | if (!dev->mode_config.poll_enabled) |
1014 | return; |
1027 | return; |
Line 1015... | Line 1028... | ||
1015 | cancel_delayed_work_sync(&dev->mode_config.output_poll_work); |
1028 | // cancel_delayed_work_sync(&dev->mode_config.output_poll_work); |
1016 | } |
1029 | } |
Line 1028... | Line 1041... | ||
1028 | if (connector->polled & (DRM_CONNECTOR_POLL_CONNECT | |
1041 | if (connector->polled & (DRM_CONNECTOR_POLL_CONNECT | |
1029 | DRM_CONNECTOR_POLL_DISCONNECT)) |
1042 | DRM_CONNECTOR_POLL_DISCONNECT)) |
1030 | poll = true; |
1043 | poll = true; |
1031 | } |
1044 | } |
Line 1032... | Line 1045... | ||
1032 | 1045 | ||
1033 | if (poll) |
1046 | // if (poll) |
1034 | schedule_delayed_work(&dev->mode_config.output_poll_work, DRM_OUTPUT_POLL_PERIOD); |
1047 | // schedule_delayed_work(&dev->mode_config.output_poll_work, DRM_OUTPUT_POLL_PERIOD); |
1035 | } |
1048 | } |
Line 1036... | Line 1049... | ||
1036 | EXPORT_SYMBOL(drm_kms_helper_poll_enable); |
1049 | EXPORT_SYMBOL(drm_kms_helper_poll_enable); |
1037 | 1050 | ||
Line 1081... | Line 1094... | ||
1081 | 1094 | ||
1082 | if (changed) |
1095 | if (changed) |
1083 | drm_kms_helper_hotplug_event(dev); |
1096 | drm_kms_helper_hotplug_event(dev); |
1084 | } |
1097 | } |
1085 | EXPORT_SYMBOL(drm_helper_hpd_irq_event); |
- | |
1086 | - |