Subversion Repositories Kolibri OS

Rev

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

Rev 1321 Rev 1404
Line 214... Line 214...
214
	return false;
214
	return false;
215
}
215
}
216
EXPORT_SYMBOL(drm_helper_crtc_in_use);
216
EXPORT_SYMBOL(drm_helper_crtc_in_use);
Line 217... Line 217...
217
 
217
 
218
/**
218
/**
219
 * drm_disable_unused_functions - disable unused objects
219
 * drm_helper_disable_unused_functions - disable unused objects
220
 * @dev: DRM device
220
 * @dev: DRM device
221
 *
221
 *
222
 * LOCKING:
222
 * LOCKING:
223
 * Caller must hold mode config lock.
223
 * Caller must hold mode config lock.
Line 570... Line 570...
570
{
570
{
571
	struct drm_device *dev;
571
	struct drm_device *dev;
572
	struct drm_crtc *tmp;
572
	struct drm_crtc *tmp;
573
	int crtc_mask = 1;
573
	int crtc_mask = 1;
Line 574... Line 574...
574
 
574
 
Line 575... Line 575...
575
//   WARN(!crtc, "checking null crtc?");
575
	WARN(!crtc, "checking null crtc?");
Line 576... Line 576...
576
 
576
 
577
	dev = crtc->dev;
577
	dev = crtc->dev;
Line 700... Line 700...
700
	list_for_each_entry(encoder, &dev->mode_config.encoder_list, head) {
700
	list_for_each_entry(encoder, &dev->mode_config.encoder_list, head) {
Line 701... Line 701...
701
 
701
 
702
		if (encoder->crtc != crtc)
702
		if (encoder->crtc != crtc)
Line 703... Line 703...
703
			continue;
703
			continue;
704
 
704
 
705
		DRM_INFO("%s: set mode %s %x\n", drm_get_encoder_name(encoder),
705
		DRM_DEBUG("%s: set mode %s %x\n", drm_get_encoder_name(encoder),
706
			 mode->name, mode->base.id);
706
			 mode->name, mode->base.id);
707
		encoder_funcs = encoder->helper_private;
707
		encoder_funcs = encoder->helper_private;
Line 1019... Line 1019...
1019
bool drm_helper_initial_config(struct drm_device *dev)
1019
bool drm_helper_initial_config(struct drm_device *dev)
1020
{
1020
{
1021
	int count = 0;
1021
	int count = 0;
Line 1022... Line 1022...
1022
 
1022
 
1023
	/* disable all the possible outputs/crtcs before entering KMS mode */
1023
	/* disable all the possible outputs/crtcs before entering KMS mode */
Line 1024... Line 1024...
1024
	drm_helper_disable_unused_functions(dev);
1024
//	drm_helper_disable_unused_functions(dev);
Line 1025... Line 1025...
1025
 
1025
 
1026
	drm_fb_helper_parse_command_line(dev);
1026
//   drm_fb_helper_parse_command_line(dev);
1027
 
1027
 
Line 1028... Line 1028...
1028
	count = drm_helper_probe_connector_modes(dev,
1028
	count = drm_helper_probe_connector_modes(dev,
1029
						 dev->mode_config.max_width,
1029
						 dev->mode_config.max_width,
1030
						 dev->mode_config.max_height);
1030
						 dev->mode_config.max_height);
-
 
1031
 
1031
 
1032
	/*
Line 1032... Line 1033...
1032
	/*
1033
	 * we shouldn't end up with no modes here.
Line 1033... Line 1034...
1033
	 * we shouldn't end up with no modes here.
1034
	 */
1034
	 */
1035
	if (count == 0)
Line 1160... Line 1161...
1160
EXPORT_SYMBOL(drm_helper_mode_fill_fb_struct);
1161
EXPORT_SYMBOL(drm_helper_mode_fill_fb_struct);
Line 1161... Line 1162...
1161
 
1162
 
1162
int drm_helper_resume_force_mode(struct drm_device *dev)
1163
int drm_helper_resume_force_mode(struct drm_device *dev)
1163
{
1164
{
-
 
1165
	struct drm_crtc *crtc;
-
 
1166
	struct drm_encoder *encoder;
-
 
1167
	struct drm_encoder_helper_funcs *encoder_funcs;
1164
	struct drm_crtc *crtc;
1168
	struct drm_crtc_helper_funcs *crtc_funcs;
Line 1165... Line 1169...
1165
	int ret;
1169
	int ret;
Line 1166... Line 1170...
1166
 
1170
 
Line 1172... Line 1176...
1172
		ret = drm_crtc_helper_set_mode(crtc, &crtc->mode,
1176
		ret = drm_crtc_helper_set_mode(crtc, &crtc->mode,
1173
					       crtc->x, crtc->y, crtc->fb);
1177
					       crtc->x, crtc->y, crtc->fb);
Line 1174... Line 1178...
1174
 
1178
 
1175
		if (ret == false)
1179
		if (ret == false)
-
 
1180
			DRM_ERROR("failed to set mode on crtc %p\n", crtc);
-
 
1181
 
-
 
1182
		/* Turn off outputs that were already powered off */
-
 
1183
		if (drm_helper_choose_crtc_dpms(crtc)) {
-
 
1184
			list_for_each_entry(encoder, &dev->mode_config.encoder_list, head) {
-
 
1185
 
-
 
1186
				if(encoder->crtc != crtc)
-
 
1187
					continue;
-
 
1188
 
-
 
1189
				encoder_funcs = encoder->helper_private;
-
 
1190
				if (encoder_funcs->dpms)
-
 
1191
					(*encoder_funcs->dpms) (encoder,
-
 
1192
								drm_helper_choose_encoder_dpms(encoder));
-
 
1193
 
-
 
1194
				crtc_funcs = crtc->helper_private;
-
 
1195
				if (crtc_funcs->dpms)
-
 
1196
					(*crtc_funcs->dpms) (crtc,
-
 
1197
							     drm_helper_choose_crtc_dpms(crtc));
-
 
1198
			}
1176
			DRM_ERROR("failed to set mode on crtc %p\n", crtc);
1199
		}
1177
	}
1200
	}
1178
	/* disable the unused connectors while restoring the modesetting */
1201
	/* disable the unused connectors while restoring the modesetting */
1179
	drm_helper_disable_unused_functions(dev);
1202
	drm_helper_disable_unused_functions(dev);
1180
	return 0;
1203
	return 0;