Subversion Repositories Kolibri OS

Rev

Rev 6283 | Rev 6935 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6283 Rev 6296
Line 119... Line 119...
119
		if (connector->polled & (DRM_CONNECTOR_POLL_CONNECT |
119
		if (connector->polled & (DRM_CONNECTOR_POLL_CONNECT |
120
					 DRM_CONNECTOR_POLL_DISCONNECT))
120
					 DRM_CONNECTOR_POLL_DISCONNECT))
121
			poll = true;
121
			poll = true;
122
	}
122
	}
Line -... Line 123...
-
 
123
 
-
 
124
	if (poll)
123
 
125
		schedule_delayed_work(&dev->mode_config.output_poll_work, DRM_OUTPUT_POLL_PERIOD);
124
}
126
}
Line 125... Line 127...
125
EXPORT_SYMBOL(drm_kms_helper_poll_enable_locked);
127
EXPORT_SYMBOL(drm_kms_helper_poll_enable_locked);
Line 155... Line 157...
155
			connector->funcs->force(connector);
157
			connector->funcs->force(connector);
156
	} else {
158
	} else {
157
		old_status = connector->status;
159
		old_status = connector->status;
Line 158... Line 160...
158
 
160
 
-
 
161
		connector->status = connector->funcs->detect(connector, true);
-
 
162
 
-
 
163
		/*
-
 
164
		 * Normally either the driver's hpd code or the poll loop should
-
 
165
		 * pick up any changes and fire the hotplug event. But if
-
 
166
		 * userspace sneaks in a probe, we might miss a change. Hence
-
 
167
		 * check here, and if anything changed start the hotplug code.
-
 
168
		 */
-
 
169
		if (old_status != connector->status) {
-
 
170
			DRM_DEBUG_KMS("[CONNECTOR:%d:%s] status updated from %d to %d\n",
-
 
171
				      connector->base.id,
-
 
172
				      connector->name,
-
 
173
				      old_status, connector->status);
-
 
174
 
-
 
175
			/*
-
 
176
			 * The hotplug event code might call into the fb
-
 
177
			 * helpers, and so expects that we do not hold any
-
 
178
			 * locks. Fire up the poll struct instead, it will
-
 
179
			 * disable itself again.
-
 
180
			 */
-
 
181
			dev->mode_config.delayed_event = true;
-
 
182
			if (dev->mode_config.poll_enabled)
-
 
183
				schedule_delayed_work(&dev->mode_config.output_poll_work,
-
 
184
						      0);
159
		connector->status = connector->funcs->detect(connector, true);
185
		}
Line 160... Line 186...
160
	}
186
	}
161
 
187
 
162
	/* Re-enable polling in case the global poll config changed. */
188
	/* Re-enable polling in case the global poll config changed. */
Line 295... Line 321...
295
 * This function must be called from process context with no mode
321
 * This function must be called from process context with no mode
296
 * setting locks held.
322
 * setting locks held.
297
 */
323
 */
298
void drm_kms_helper_hotplug_event(struct drm_device *dev)
324
void drm_kms_helper_hotplug_event(struct drm_device *dev)
299
{
325
{
-
 
326
ENTER();
300
	/* send a uevent + call fbdev */
327
    /* send a uevent + call fbdev */
301
//   drm_sysfs_hotplug_event(dev);
328
	drm_sysfs_hotplug_event(dev);
302
//   if (dev->mode_config.funcs->output_poll_changed)
329
	if (dev->mode_config.funcs->output_poll_changed)
303
//       dev->mode_config.funcs->output_poll_changed(dev);
330
		dev->mode_config.funcs->output_poll_changed(dev);
-
 
331
LEAVE();
304
}
332
}
305
EXPORT_SYMBOL(drm_kms_helper_hotplug_event);
333
EXPORT_SYMBOL(drm_kms_helper_hotplug_event);
Line 306... Line 334...
306
 
334
 
307
static void output_poll_execute(struct work_struct *work)
335
static void output_poll_execute(struct work_struct *work)
Line 375... Line 403...
375
		}
403
		}
376
	}
404
	}
Line 377... Line 405...
377
 
405
 
Line 378... Line 406...
378
	mutex_unlock(&dev->mode_config.mutex);
406
	mutex_unlock(&dev->mode_config.mutex);
379
 
407
 
-
 
408
out:
Line -... Line 409...
-
 
409
	if (changed)
-
 
410
		drm_kms_helper_hotplug_event(dev);
380
out:;
411
 
Line 381... Line 412...
381
 
412
	if (repoll)
382
 
413
		schedule_delayed_work(delayed_work, DRM_OUTPUT_POLL_PERIOD);
383
}
414
}
Line 394... Line 425...
394
 */
425
 */
395
void drm_kms_helper_poll_disable(struct drm_device *dev)
426
void drm_kms_helper_poll_disable(struct drm_device *dev)
396
{
427
{
397
	if (!dev->mode_config.poll_enabled)
428
	if (!dev->mode_config.poll_enabled)
398
		return;
429
		return;
399
//   cancel_delayed_work_sync(&dev->mode_config.output_poll_work);
430
	cancel_delayed_work_sync(&dev->mode_config.output_poll_work);
400
}
431
}
401
EXPORT_SYMBOL(drm_kms_helper_poll_disable);
432
EXPORT_SYMBOL(drm_kms_helper_poll_disable);
Line 402... Line 433...
402
 
433
 
403
/**
434
/**