Rev 3746 | Rev 4075 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3746 | Rev 3764 | ||
---|---|---|---|
Line 119... | Line 119... | ||
119 | struct drm_display_mode *mode; |
119 | struct drm_display_mode *mode; |
120 | struct drm_connector_helper_funcs *connector_funcs = |
120 | struct drm_connector_helper_funcs *connector_funcs = |
121 | connector->helper_private; |
121 | connector->helper_private; |
122 | int count = 0; |
122 | int count = 0; |
123 | int mode_flags = 0; |
123 | int mode_flags = 0; |
- | 124 | bool verbose_prune = true; |
|
Line 124... | Line 125... | ||
124 | 125 | ||
125 | DRM_DEBUG_KMS("[CONNECTOR:%d:%s]\n", connector->base.id, |
126 | DRM_DEBUG_KMS("[CONNECTOR:%d:%s]\n", connector->base.id, |
126 | drm_get_connector_name(connector)); |
127 | drm_get_connector_name(connector)); |
127 | /* set all modes to the unverified state */ |
128 | /* set all modes to the unverified state */ |
Line 134... | Line 135... | ||
134 | else |
135 | else |
135 | connector->status = connector_status_disconnected; |
136 | connector->status = connector_status_disconnected; |
136 | if (connector->funcs->force) |
137 | if (connector->funcs->force) |
137 | connector->funcs->force(connector); |
138 | connector->funcs->force(connector); |
138 | } else { |
139 | } else { |
139 | // dbgprintf("call detect funcs %p ", connector->funcs); |
- | |
140 | // dbgprintf("detect %p\n", connector->funcs->detect); |
- | |
141 | connector->status = connector->funcs->detect(connector, true); |
140 | connector->status = connector->funcs->detect(connector, true); |
142 | // dbgprintf("status %x\n", connector->status); |
- | |
143 | } |
141 | } |
Line 144... | Line 142... | ||
144 | 142 | ||
145 | /* Re-enable polling in case the global poll config changed. */ |
143 | /* Re-enable polling in case the global poll config changed. */ |
146 | if (drm_kms_helper_poll != dev->mode_config.poll_running) |
144 | if (drm_kms_helper_poll != dev->mode_config.poll_running) |
Line 150... | Line 148... | ||
150 | 148 | ||
151 | if (connector->status == connector_status_disconnected) { |
149 | if (connector->status == connector_status_disconnected) { |
152 | DRM_DEBUG_KMS("[CONNECTOR:%d:%s] disconnected\n", |
150 | DRM_DEBUG_KMS("[CONNECTOR:%d:%s] disconnected\n", |
153 | connector->base.id, drm_get_connector_name(connector)); |
151 | connector->base.id, drm_get_connector_name(connector)); |
- | 152 | drm_mode_connector_update_edid_property(connector, NULL); |
|
154 | drm_mode_connector_update_edid_property(connector, NULL); |
153 | verbose_prune = false; |
155 | goto prune; |
154 | goto prune; |
Line 156... | Line 155... | ||
156 | } |
155 | } |
157 | 156 | ||
Line 183... | Line 182... | ||
183 | mode->status = connector_funcs->mode_valid(connector, |
182 | mode->status = connector_funcs->mode_valid(connector, |
184 | mode); |
183 | mode); |
185 | } |
184 | } |
Line 186... | Line 185... | ||
186 | 185 | ||
187 | prune: |
186 | prune: |
Line 188... | Line 187... | ||
188 | drm_mode_prune_invalid(dev, &connector->modes, true); |
187 | drm_mode_prune_invalid(dev, &connector->modes, verbose_prune); |
189 | 188 | ||
Line 190... | Line 189... | ||
190 | if (list_empty(&connector->modes)) |
189 | if (list_empty(&connector->modes)) |
Line 1005... | Line 1004... | ||
1005 | if (old_status == connector_status_connected && |
1004 | if (old_status == connector_status_connected && |
1006 | !(connector->polled & DRM_CONNECTOR_POLL_DISCONNECT)) |
1005 | !(connector->polled & DRM_CONNECTOR_POLL_DISCONNECT)) |
1007 | continue; |
1006 | continue; |
Line 1008... | Line 1007... | ||
1008 | 1007 | ||
- | 1008 | connector->status = connector->funcs->detect(connector, false); |
|
- | 1009 | if (old_status != connector->status) { |
|
- | 1010 | const char *old, *new; |
|
- | 1011 | ||
- | 1012 | old = drm_get_connector_status_name(old_status); |
|
- | 1013 | new = drm_get_connector_status_name(connector->status); |
|
1009 | connector->status = connector->funcs->detect(connector, false); |
1014 | |
- | 1015 | DRM_DEBUG_KMS("[CONNECTOR:%d:%s] " |
|
1010 | DRM_DEBUG_KMS("[CONNECTOR:%d:%s] status updated from %d to %d\n", |
1016 | "status updated from %s to %s\n", |
1011 | connector->base.id, |
1017 | connector->base.id, |
1012 | drm_get_connector_name(connector), |
1018 | drm_get_connector_name(connector), |
1013 | old_status, connector->status); |
- | |
- | 1019 | old, new); |
|
1014 | if (old_status != connector->status) |
1020 | |
1015 | changed = true; |
1021 | changed = true; |
- | 1022 | } |
|
Line 1016... | Line 1023... | ||
1016 | } |
1023 | } |
Line 1017... | Line 1024... | ||
1017 | 1024 | ||
1018 | mutex_unlock(&dev->mode_config.mutex); |
1025 | mutex_unlock(&dev->mode_config.mutex); |
Line 1083... | Line 1090... | ||
1083 | continue; |
1090 | continue; |
Line 1084... | Line 1091... | ||
1084 | 1091 | ||
Line 1085... | Line 1092... | ||
1085 | old_status = connector->status; |
1092 | old_status = connector->status; |
1086 | 1093 | ||
1087 | connector->status = connector->funcs->detect(connector, false); |
1094 | connector->status = connector->funcs->detect(connector, false); |
1088 | DRM_DEBUG_KMS("[CONNECTOR:%d:%s] status updated from %d to %d\n", |
1095 | DRM_DEBUG_KMS("[CONNECTOR:%d:%s] status updated from %s to %s\n", |
- | 1096 | connector->base.id, |
|
1089 | connector->base.id, |
1097 | drm_get_connector_name(connector), |
1090 | drm_get_connector_name(connector), |
1098 | drm_get_connector_status_name(old_status), |
1091 | old_status, connector->status); |
1099 | drm_get_connector_status_name(connector->status)); |
1092 | if (old_status != connector->status) |
1100 | if (old_status != connector->status) |
Line 1093... | Line 1101... | ||
1093 | changed = true; |
1101 | changed = true; |