Subversion Repositories Kolibri OS

Rev

Rev 6937 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6937 Rev 7144
Line 211... Line 211...
211
	intel_disable_crt(encoder);
211
	intel_disable_crt(encoder);
212
}
212
}
Line 213... Line 213...
213
 
213
 
214
static void intel_enable_crt(struct intel_encoder *encoder)
214
static void intel_enable_crt(struct intel_encoder *encoder)
215
{
-
 
216
	struct intel_crt *crt = intel_encoder_to_crt(encoder);
-
 
217
 
215
{
218
	intel_crt_set_dpms(encoder, crt->connector->base.dpms);
216
	intel_crt_set_dpms(encoder, DRM_MODE_DPMS_ON);
Line 219... Line 217...
219
}
217
}
220
 
218
 
221
static enum drm_mode_status
219
static enum drm_mode_status
222
intel_crt_mode_valid(struct drm_connector *connector,
220
intel_crt_mode_valid(struct drm_connector *connector,
223
		     struct drm_display_mode *mode)
221
		     struct drm_display_mode *mode)
-
 
222
{
Line 224... Line 223...
224
{
223
	struct drm_device *dev = connector->dev;
225
	struct drm_device *dev = connector->dev;
224
	int max_dotclk = to_i915(dev)->max_dotclk_freq;
226
 
225
 
Line 236... Line 235...
236
	else
235
	else
237
		max_clock = 400000;
236
		max_clock = 400000;
238
	if (mode->clock > max_clock)
237
	if (mode->clock > max_clock)
239
		return MODE_CLOCK_HIGH;
238
		return MODE_CLOCK_HIGH;
Line -... Line 239...
-
 
239
 
-
 
240
	if (mode->clock > max_dotclk)
-
 
241
		return MODE_CLOCK_HIGH;
240
 
242
 
241
	/* The FDI receiver on LPT only supports 8bpc and only has 2 lanes. */
243
	/* The FDI receiver on LPT only supports 8bpc and only has 2 lanes. */
242
	if (HAS_PCH_LPT(dev) &&
244
	if (HAS_PCH_LPT(dev) &&
243
	    (ironlake_get_lanes_required(mode->clock, 270000, 24) > 2))
245
	    (ironlake_get_lanes_required(mode->clock, 270000, 24) > 2))
Line 480... Line 482...
480
 
482
 
481
	return false;
483
	return false;
Line 482... Line 484...
482
}
484
}
483
 
485
 
484
static enum drm_connector_status
486
static enum drm_connector_status
485
intel_crt_load_detect(struct intel_crt *crt)
487
intel_crt_load_detect(struct intel_crt *crt, uint32_t pipe)
486
{
488
{
487
	struct drm_device *dev = crt->base.base.dev;
-
 
488
	struct drm_i915_private *dev_priv = dev->dev_private;
489
	struct drm_device *dev = crt->base.base.dev;
489
	uint32_t pipe = to_intel_crtc(crt->base.base.crtc)->pipe;
490
	struct drm_i915_private *dev_priv = dev->dev_private;
490
	uint32_t save_bclrpat;
491
	uint32_t save_bclrpat;
491
	uint32_t save_vtotal;
492
	uint32_t save_vtotal;
492
	uint32_t vtotal, vactive;
493
	uint32_t vtotal, vactive;
Line 653... Line 654...
653
	/* for pre-945g platforms use load detect */
654
	/* for pre-945g platforms use load detect */
654
	if (intel_get_load_detect_pipe(connector, NULL, &tmp, &ctx)) {
655
	if (intel_get_load_detect_pipe(connector, NULL, &tmp, &ctx)) {
655
		if (intel_crt_detect_ddc(connector))
656
		if (intel_crt_detect_ddc(connector))
656
			status = connector_status_connected;
657
			status = connector_status_connected;
657
		else if (INTEL_INFO(dev)->gen < 4)
658
		else if (INTEL_INFO(dev)->gen < 4)
658
			status = intel_crt_load_detect(crt);
659
			status = intel_crt_load_detect(crt,
-
 
660
				to_intel_crtc(connector->state->crtc)->pipe);
659
		else
661
		else
660
			status = connector_status_unknown;
662
			status = connector_status_unknown;
661
		intel_release_load_detect_pipe(connector, &tmp, &ctx);
663
		intel_release_load_detect_pipe(connector, &tmp, &ctx);
662
	} else
664
	} else
663
		status = connector_status_unknown;
665
		status = connector_status_unknown;