Subversion Repositories Kolibri OS

Rev

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

Rev 4560 Rev 5060
Line 1151... Line 1151...
1151
	 * SDVO device will factor out the multiplier during mode_set.
1151
	 * SDVO device will factor out the multiplier during mode_set.
1152
	 */
1152
	 */
1153
	pipe_config->pixel_multiplier =
1153
	pipe_config->pixel_multiplier =
1154
		intel_sdvo_get_pixel_multiplier(adjusted_mode);
1154
		intel_sdvo_get_pixel_multiplier(adjusted_mode);
Line -... Line 1155...
-
 
1155
 
-
 
1156
	pipe_config->has_hdmi_sink = intel_sdvo->has_hdmi_monitor;
1155
 
1157
 
1156
	if (intel_sdvo->color_range_auto) {
1158
	if (intel_sdvo->color_range_auto) {
1157
		/* See CEA-861-E - 5.1 Default Encoding Parameters */
1159
		/* See CEA-861-E - 5.1 Default Encoding Parameters */
1158
		/* FIXME: This bit is only valid when using TMDS encoding and 8
1160
		/* FIXME: This bit is only valid when using TMDS encoding and 8
1159
		 * bit per color mode. */
1161
		 * bit per color mode. */
1160
		if (intel_sdvo->has_hdmi_monitor &&
1162
		if (pipe_config->has_hdmi_sink &&
1161
		    drm_match_cea_mode(adjusted_mode) > 1)
-
 
1162
			intel_sdvo->color_range = HDMI_COLOR_RANGE_16_235;
-
 
1163
		else
-
 
1164
			intel_sdvo->color_range = 0;
-
 
1165
	}
-
 
1166
 
-
 
1167
	if (intel_sdvo->color_range)
1163
		    drm_match_cea_mode(adjusted_mode) > 1)
-
 
1164
			pipe_config->limited_color_range = true;
-
 
1165
	} else {
-
 
1166
		if (pipe_config->has_hdmi_sink &&
-
 
1167
		    intel_sdvo->color_range == HDMI_COLOR_RANGE_16_235)
-
 
1168
			pipe_config->limited_color_range = true;
Line 1168... Line 1169...
1168
		pipe_config->limited_color_range = true;
1169
	}
1169
 
1170
 
1170
	/* Clock computation needs to happen after pixel multiplier. */
1171
	/* Clock computation needs to happen after pixel multiplier. */
Line 1171... Line 1172...
1171
	if (intel_sdvo->is_tv)
1172
	if (intel_sdvo->is_tv)
1172
		i9xx_adjust_sdvo_tv_clock(pipe_config);
1173
		i9xx_adjust_sdvo_tv_clock(pipe_config);
Line 1173... Line 1174...
1173
 
1174
 
1174
	return true;
1175
	return true;
1175
}
1176
}
1176
 
1177
 
1177
static void intel_sdvo_mode_set(struct intel_encoder *intel_encoder)
1178
static void intel_sdvo_pre_enable(struct intel_encoder *intel_encoder)
1178
{
1179
{
Line 1221... Line 1222...
1221
 
1222
 
1222
	/* Set the input timing to the screen. Assume always input 0. */
1223
	/* Set the input timing to the screen. Assume always input 0. */
1223
	if (!intel_sdvo_set_target_input(intel_sdvo))
1224
	if (!intel_sdvo_set_target_input(intel_sdvo))
Line 1224... Line 1225...
1224
		return;
1225
		return;
1225
 
1226
 
1226
	if (intel_sdvo->has_hdmi_monitor) {
1227
	if (crtc->config.has_hdmi_sink) {
1227
		intel_sdvo_set_encode(intel_sdvo, SDVO_ENCODE_HDMI);
1228
		intel_sdvo_set_encode(intel_sdvo, SDVO_ENCODE_HDMI);
1228
		intel_sdvo_set_colorimetry(intel_sdvo,
1229
		intel_sdvo_set_colorimetry(intel_sdvo,
1229
					   SDVO_COLORIMETRY_RGB256);
1230
					   SDVO_COLORIMETRY_RGB256);
Line 1256... Line 1257...
1256
	/* Set the SDVO control regs. */
1257
	/* Set the SDVO control regs. */
1257
	if (INTEL_INFO(dev)->gen >= 4) {
1258
	if (INTEL_INFO(dev)->gen >= 4) {
1258
		/* The real mode polarity is set by the SDVO commands, using
1259
		/* The real mode polarity is set by the SDVO commands, using
1259
		 * struct intel_sdvo_dtd. */
1260
		 * struct intel_sdvo_dtd. */
1260
		sdvox = SDVO_VSYNC_ACTIVE_HIGH | SDVO_HSYNC_ACTIVE_HIGH;
1261
		sdvox = SDVO_VSYNC_ACTIVE_HIGH | SDVO_HSYNC_ACTIVE_HIGH;
1261
		if (!HAS_PCH_SPLIT(dev) && intel_sdvo->is_hdmi)
1262
		if (!HAS_PCH_SPLIT(dev) && crtc->config.limited_color_range)
1262
			sdvox |= intel_sdvo->color_range;
1263
			sdvox |= HDMI_COLOR_RANGE_16_235;
1263
		if (INTEL_INFO(dev)->gen < 5)
1264
		if (INTEL_INFO(dev)->gen < 5)
1264
			sdvox |= SDVO_BORDER_ENABLE;
1265
			sdvox |= SDVO_BORDER_ENABLE;
1265
	} else {
1266
	} else {
1266
		sdvox = I915_READ(intel_sdvo->sdvo_reg);
1267
		sdvox = I915_READ(intel_sdvo->sdvo_reg);
1267
		switch (intel_sdvo->sdvo_reg) {
1268
		switch (intel_sdvo->sdvo_reg) {
Line 1347... Line 1348...
1347
	int dotclock;
1348
	int dotclock;
1348
	u32 flags = 0, sdvox;
1349
	u32 flags = 0, sdvox;
1349
	u8 val;
1350
	u8 val;
1350
	bool ret;
1351
	bool ret;
Line -... Line 1352...
-
 
1352
 
-
 
1353
	sdvox = I915_READ(intel_sdvo->sdvo_reg);
1351
 
1354
 
1352
	ret = intel_sdvo_get_input_timing(intel_sdvo, &dtd);
1355
	ret = intel_sdvo_get_input_timing(intel_sdvo, &dtd);
1353
	if (!ret) {
1356
	if (!ret) {
1354
		/* Some sdvo encoders are not spec compliant and don't
1357
		/* Some sdvo encoders are not spec compliant and don't
1355
		 * implement the mandatory get_timings function. */
1358
		 * implement the mandatory get_timings function. */
Line 1375... Line 1378...
1375
	 * state. Since the general pipe state readout happens before the
1378
	 * state. Since the general pipe state readout happens before the
1376
	 * encoder->get_config we so already have a valid pixel multplier on all
1379
	 * encoder->get_config we so already have a valid pixel multplier on all
1377
	 * other platfroms.
1380
	 * other platfroms.
1378
	 */
1381
	 */
1379
	if (IS_I915G(dev) || IS_I915GM(dev)) {
1382
	if (IS_I915G(dev) || IS_I915GM(dev)) {
1380
		sdvox = I915_READ(intel_sdvo->sdvo_reg);
-
 
1381
		pipe_config->pixel_multiplier =
1383
		pipe_config->pixel_multiplier =
1382
			((sdvox & SDVO_PORT_MULTIPLY_MASK)
1384
			((sdvox & SDVO_PORT_MULTIPLY_MASK)
1383
			 >> SDVO_PORT_MULTIPLY_SHIFT) + 1;
1385
			 >> SDVO_PORT_MULTIPLY_SHIFT) + 1;
1384
	}
1386
	}
Line -... Line 1387...
-
 
1387
 
-
 
1388
	dotclock = pipe_config->port_clock;
1385
 
1389
	if (pipe_config->pixel_multiplier)
Line 1386... Line 1390...
1386
	dotclock = pipe_config->port_clock / pipe_config->pixel_multiplier;
1390
		dotclock /= pipe_config->pixel_multiplier;
1387
 
1391
 
Line 1388... Line 1392...
1388
	if (HAS_PCH_SPLIT(dev))
1392
	if (HAS_PCH_SPLIT(dev))
Line 1404... Line 1408...
1404
		encoder_pixel_multiplier = 4;
1408
		encoder_pixel_multiplier = 4;
1405
		break;
1409
		break;
1406
	}
1410
	}
1407
	}
1411
	}
Line -... Line 1412...
-
 
1412
 
-
 
1413
	if (sdvox & HDMI_COLOR_RANGE_16_235)
-
 
1414
		pipe_config->limited_color_range = true;
-
 
1415
 
-
 
1416
	if (intel_sdvo_get_value(intel_sdvo, SDVO_CMD_GET_ENCODE,
-
 
1417
				 &val, 1)) {
-
 
1418
		if (val == SDVO_ENCODE_HDMI)
-
 
1419
			pipe_config->has_hdmi_sink = true;
-
 
1420
	}
1408
 
1421
 
1409
	WARN(encoder_pixel_multiplier != pipe_config->pixel_multiplier,
1422
	WARN(encoder_pixel_multiplier != pipe_config->pixel_multiplier,
1410
	     "SDVO pixel multiplier mismatch, port: %i, encoder: %i\n",
1423
	     "SDVO pixel multiplier mismatch, port: %i, encoder: %i\n",
1411
	     pipe_config->pixel_multiplier, encoder_pixel_multiplier);
1424
	     pipe_config->pixel_multiplier, encoder_pixel_multiplier);
Line 1459... Line 1472...
1459
	struct intel_sdvo *intel_sdvo = to_sdvo(encoder);
1472
	struct intel_sdvo *intel_sdvo = to_sdvo(encoder);
1460
	struct intel_crtc *intel_crtc = to_intel_crtc(encoder->base.crtc);
1473
	struct intel_crtc *intel_crtc = to_intel_crtc(encoder->base.crtc);
1461
	u32 temp;
1474
	u32 temp;
1462
		bool input1, input2;
1475
		bool input1, input2;
1463
		int i;
1476
		int i;
1464
		u8 status;
1477
	bool success;
Line 1465... Line 1478...
1465
 
1478
 
1466
		temp = I915_READ(intel_sdvo->sdvo_reg);
1479
		temp = I915_READ(intel_sdvo->sdvo_reg);
1467
	if ((temp & SDVO_ENABLE) == 0) {
1480
	if ((temp & SDVO_ENABLE) == 0) {
1468
		/* HW workaround for IBX, we need to move the port
1481
		/* HW workaround for IBX, we need to move the port
Line 1473... Line 1486...
1473
			intel_sdvo_write_sdvox(intel_sdvo, temp | SDVO_ENABLE);
1486
			intel_sdvo_write_sdvox(intel_sdvo, temp | SDVO_ENABLE);
1474
	}
1487
	}
1475
		for (i = 0; i < 2; i++)
1488
		for (i = 0; i < 2; i++)
1476
			intel_wait_for_vblank(dev, intel_crtc->pipe);
1489
			intel_wait_for_vblank(dev, intel_crtc->pipe);
Line 1477... Line 1490...
1477
 
1490
 
1478
		status = intel_sdvo_get_trained_inputs(intel_sdvo, &input1, &input2);
1491
	success = intel_sdvo_get_trained_inputs(intel_sdvo, &input1, &input2);
1479
		/* Warn if the device reported failure to sync.
1492
		/* Warn if the device reported failure to sync.
1480
		 * A lot of SDVO devices fail to notify of sync, but it's
1493
		 * A lot of SDVO devices fail to notify of sync, but it's
1481
		 * a given it the status is a success, we succeeded.
1494
		 * a given it the status is a success, we succeeded.
1482
		 */
1495
		 */
1483
		if (status == SDVO_CMD_STATUS_SUCCESS && !input1) {
1496
	if (success && !input1) {
1484
			DRM_DEBUG_KMS("First %s output reported failure to "
1497
			DRM_DEBUG_KMS("First %s output reported failure to "
1485
					"sync\n", SDVO_NAME(intel_sdvo));
1498
					"sync\n", SDVO_NAME(intel_sdvo));
Line 1486... Line 1499...
1486
		}
1499
		}
Line 1730... Line 1743...
1730
	struct intel_sdvo *intel_sdvo = intel_attached_sdvo(connector);
1743
	struct intel_sdvo *intel_sdvo = intel_attached_sdvo(connector);
1731
	struct intel_sdvo_connector *intel_sdvo_connector = to_intel_sdvo_connector(connector);
1744
	struct intel_sdvo_connector *intel_sdvo_connector = to_intel_sdvo_connector(connector);
1732
	enum drm_connector_status ret;
1745
	enum drm_connector_status ret;
Line 1733... Line 1746...
1733
 
1746
 
1734
	DRM_DEBUG_KMS("[CONNECTOR:%d:%s]\n",
1747
	DRM_DEBUG_KMS("[CONNECTOR:%d:%s]\n",
Line 1735... Line 1748...
1735
		      connector->base.id, drm_get_connector_name(connector));
1748
		      connector->base.id, connector->name);
1736
 
1749
 
1737
	if (!intel_sdvo_get_value(intel_sdvo,
1750
	if (!intel_sdvo_get_value(intel_sdvo,
1738
				  SDVO_CMD_GET_ATTACHED_DISPLAYS,
1751
				  SDVO_CMD_GET_ATTACHED_DISPLAYS,
Line 1792... Line 1805...
1792
static void intel_sdvo_get_ddc_modes(struct drm_connector *connector)
1805
static void intel_sdvo_get_ddc_modes(struct drm_connector *connector)
1793
{
1806
{
1794
	struct edid *edid;
1807
	struct edid *edid;
Line 1795... Line 1808...
1795
 
1808
 
1796
	DRM_DEBUG_KMS("[CONNECTOR:%d:%s]\n",
1809
	DRM_DEBUG_KMS("[CONNECTOR:%d:%s]\n",
Line 1797... Line 1810...
1797
		      connector->base.id, drm_get_connector_name(connector));
1810
		      connector->base.id, connector->name);
1798
 
1811
 
Line 1799... Line 1812...
1799
	/* set the bus switch and get the modes */
1812
	/* set the bus switch and get the modes */
Line 1890... Line 1903...
1890
	struct intel_sdvo_sdtv_resolution_request tv_res;
1903
	struct intel_sdvo_sdtv_resolution_request tv_res;
1891
	uint32_t reply = 0, format_map = 0;
1904
	uint32_t reply = 0, format_map = 0;
1892
	int i;
1905
	int i;
Line 1893... Line 1906...
1893
 
1906
 
1894
	DRM_DEBUG_KMS("[CONNECTOR:%d:%s]\n",
1907
	DRM_DEBUG_KMS("[CONNECTOR:%d:%s]\n",
Line 1895... Line 1908...
1895
		      connector->base.id, drm_get_connector_name(connector));
1908
		      connector->base.id, connector->name);
1896
 
1909
 
1897
	/* Read the list of supported input resolutions for the selected TV
1910
	/* Read the list of supported input resolutions for the selected TV
1898
	 * format.
1911
	 * format.
Line 1927... Line 1940...
1927
	struct intel_sdvo *intel_sdvo = intel_attached_sdvo(connector);
1940
	struct intel_sdvo *intel_sdvo = intel_attached_sdvo(connector);
1928
	struct drm_i915_private *dev_priv = connector->dev->dev_private;
1941
	struct drm_i915_private *dev_priv = connector->dev->dev_private;
1929
	struct drm_display_mode *newmode;
1942
	struct drm_display_mode *newmode;
Line 1930... Line 1943...
1930
 
1943
 
1931
	DRM_DEBUG_KMS("[CONNECTOR:%d:%s]\n",
1944
	DRM_DEBUG_KMS("[CONNECTOR:%d:%s]\n",
Line 1932... Line 1945...
1932
		      connector->base.id, drm_get_connector_name(connector));
1945
		      connector->base.id, connector->name);
1933
 
1946
 
1934
	/*
1947
	/*
1935
	 * Fetch modes from VBT. For SDVO prefer the VBT mode since some
1948
	 * Fetch modes from VBT. For SDVO prefer the VBT mode since some
Line 2380... Line 2393...
2380
	else
2393
	else
2381
		return 0x72;
2394
		return 0x72;
2382
}
2395
}
Line 2383... Line 2396...
2383
 
2396
 
-
 
2397
static void
-
 
2398
intel_sdvo_connector_unregister(struct intel_connector *intel_connector)
-
 
2399
{
-
 
2400
	struct drm_connector *drm_connector;
-
 
2401
	struct intel_sdvo *sdvo_encoder;
-
 
2402
 
-
 
2403
	drm_connector = &intel_connector->base;
-
 
2404
	sdvo_encoder = intel_attached_sdvo(&intel_connector->base);
-
 
2405
 
-
 
2406
	intel_connector_unregister(intel_connector);
-
 
2407
}
-
 
2408
 
2384
static void
2409
static int
2385
intel_sdvo_connector_init(struct intel_sdvo_connector *connector,
2410
intel_sdvo_connector_init(struct intel_sdvo_connector *connector,
2386
			  struct intel_sdvo *encoder)
2411
			  struct intel_sdvo *encoder)
-
 
2412
{
-
 
2413
	struct drm_connector *drm_connector;
-
 
2414
	int ret;
-
 
2415
 
2387
{
2416
	drm_connector = &connector->base.base;
2388
	drm_connector_init(encoder->base.base.dev,
2417
	ret = drm_connector_init(encoder->base.base.dev,
2389
			   &connector->base.base,
2418
			   drm_connector,
2390
			   &intel_sdvo_connector_funcs,
2419
			   &intel_sdvo_connector_funcs,
-
 
2420
			   connector->base.base.connector_type);
-
 
2421
	if (ret < 0)
Line 2391... Line 2422...
2391
			   connector->base.base.connector_type);
2422
		return ret;
2392
 
2423
 
Line 2393... Line 2424...
2393
	drm_connector_helper_add(&connector->base.base,
2424
	drm_connector_helper_add(drm_connector,
2394
				 &intel_sdvo_connector_helper_funcs);
2425
				 &intel_sdvo_connector_helper_funcs);
2395
 
2426
 
2396
	connector->base.base.interlace_allowed = 1;
2427
	connector->base.base.interlace_allowed = 1;
-
 
2428
	connector->base.base.doublescan_allowed = 0;
Line 2397... Line 2429...
2397
	connector->base.base.doublescan_allowed = 0;
2429
	connector->base.base.display_info.subpixel_order = SubPixelHorizontalRGB;
-
 
2430
	connector->base.get_hw_state = intel_sdvo_connector_get_hw_state;
2398
	connector->base.base.display_info.subpixel_order = SubPixelHorizontalRGB;
2431
	connector->base.unregister = intel_sdvo_connector_unregister;
2399
	connector->base.get_hw_state = intel_sdvo_connector_get_hw_state;
2432
 
Line 2400... Line 2433...
2400
 
2433
	intel_connector_attach_encoder(&connector->base, &encoder->base);
2401
	intel_connector_attach_encoder(&connector->base, &encoder->base);
2434
 
2402
	drm_sysfs_connector_add(&connector->base.base);
2435
	return ret;
Line 2457... Line 2490...
2457
	if (intel_sdvo_is_hdmi_connector(intel_sdvo, device)) {
2490
	if (intel_sdvo_is_hdmi_connector(intel_sdvo, device)) {
2458
		connector->connector_type = DRM_MODE_CONNECTOR_HDMIA;
2491
		connector->connector_type = DRM_MODE_CONNECTOR_HDMIA;
2459
		intel_sdvo->is_hdmi = true;
2492
		intel_sdvo->is_hdmi = true;
2460
	}
2493
	}
Line 2461... Line 2494...
2461
 
2494
 
-
 
2495
	if (intel_sdvo_connector_init(intel_sdvo_connector, intel_sdvo) < 0) {
-
 
2496
		kfree(intel_sdvo_connector);
-
 
2497
		return false;
-
 
2498
	}
2462
	intel_sdvo_connector_init(intel_sdvo_connector, intel_sdvo);
2499
 
2463
	if (intel_sdvo->is_hdmi)
2500
	if (intel_sdvo->is_hdmi)
Line 2464... Line 2501...
2464
		intel_sdvo_add_hdmi_properties(intel_sdvo, intel_sdvo_connector);
2501
		intel_sdvo_add_hdmi_properties(intel_sdvo, intel_sdvo_connector);
2465
 
2502
 
Line 2488... Line 2525...
2488
	intel_sdvo->controlled_output |= type;
2525
	intel_sdvo->controlled_output |= type;
2489
	intel_sdvo_connector->output_flag = type;
2526
	intel_sdvo_connector->output_flag = type;
Line 2490... Line 2527...
2490
 
2527
 
Line 2491... Line 2528...
2491
	intel_sdvo->is_tv = true;
2528
	intel_sdvo->is_tv = true;
-
 
2529
 
-
 
2530
	if (intel_sdvo_connector_init(intel_sdvo_connector, intel_sdvo) < 0) {
-
 
2531
		kfree(intel_sdvo_connector);
Line 2492... Line 2532...
2492
 
2532
		return false;
2493
	intel_sdvo_connector_init(intel_sdvo_connector, intel_sdvo);
2533
	}
Line 2494... Line 2534...
2494
 
2534
 
2495
	if (!intel_sdvo_tv_create_property(intel_sdvo, intel_sdvo_connector, type))
2535
	if (!intel_sdvo_tv_create_property(intel_sdvo, intel_sdvo_connector, type))
Line 2496... Line 2536...
2496
		goto err;
2536
		goto err;
Line 2497... Line 2537...
2497
 
2537
 
2498
	if (!intel_sdvo_create_enhance_property(intel_sdvo, intel_sdvo_connector))
2538
	if (!intel_sdvo_create_enhance_property(intel_sdvo, intel_sdvo_connector))
2499
		goto err;
2539
		goto err;
2500
 
2540
 
2501
	return true;
2541
	return true;
Line 2502... Line 2542...
2502
 
2542
 
Line 2532... Line 2572...
2532
	} else if (device == 1) {
2572
	} else if (device == 1) {
2533
		intel_sdvo->controlled_output |= SDVO_OUTPUT_RGB1;
2573
		intel_sdvo->controlled_output |= SDVO_OUTPUT_RGB1;
2534
		intel_sdvo_connector->output_flag = SDVO_OUTPUT_RGB1;
2574
		intel_sdvo_connector->output_flag = SDVO_OUTPUT_RGB1;
2535
	}
2575
	}
Line 2536... Line 2576...
2536
 
2576
 
2537
	intel_sdvo_connector_init(intel_sdvo_connector,
2577
	if (intel_sdvo_connector_init(intel_sdvo_connector, intel_sdvo) < 0) {
-
 
2578
		kfree(intel_sdvo_connector);
-
 
2579
		return false;
-
 
2580
	}
2538
				  intel_sdvo);
2581
 
2539
	return true;
2582
	return true;
Line 2540... Line 2583...
2540
}
2583
}
2541
 
2584
 
Line 2564... Line 2607...
2564
	} else if (device == 1) {
2607
	} else if (device == 1) {
2565
		intel_sdvo->controlled_output |= SDVO_OUTPUT_LVDS1;
2608
		intel_sdvo->controlled_output |= SDVO_OUTPUT_LVDS1;
2566
		intel_sdvo_connector->output_flag = SDVO_OUTPUT_LVDS1;
2609
		intel_sdvo_connector->output_flag = SDVO_OUTPUT_LVDS1;
2567
	}
2610
	}
Line 2568... Line 2611...
2568
 
2611
 
-
 
2612
	if (intel_sdvo_connector_init(intel_sdvo_connector, intel_sdvo) < 0) {
-
 
2613
		kfree(intel_sdvo_connector);
-
 
2614
		return false;
-
 
2615
	}
2569
	intel_sdvo_connector_init(intel_sdvo_connector, intel_sdvo);
2616
 
2570
	if (!intel_sdvo_create_enhance_property(intel_sdvo, intel_sdvo_connector))
2617
	if (!intel_sdvo_create_enhance_property(intel_sdvo, intel_sdvo_connector))
Line 2571... Line 2618...
2571
		goto err;
2618
		goto err;
Line 2572... Line 2619...
2572
 
2619
 
2573
	return true;
2620
	return true;
2574
 
2621
 
2575
err:
2622
err:
2576
	drm_sysfs_connector_remove(connector);
2623
	drm_connector_unregister(connector);
Line 2577... Line 2624...
2577
	intel_sdvo_destroy(connector);
2624
	intel_sdvo_destroy(connector);
Line 2644... Line 2691...
2644
	struct drm_connector *connector, *tmp;
2691
	struct drm_connector *connector, *tmp;
Line 2645... Line 2692...
2645
 
2692
 
2646
	list_for_each_entry_safe(connector, tmp,
2693
	list_for_each_entry_safe(connector, tmp,
2647
				 &dev->mode_config.connector_list, head) {
2694
				 &dev->mode_config.connector_list, head) {
2648
		if (intel_attached_encoder(connector) == &intel_sdvo->base) {
2695
		if (intel_attached_encoder(connector) == &intel_sdvo->base) {
2649
			drm_sysfs_connector_remove(connector);
2696
			drm_connector_unregister(connector);
2650
			intel_sdvo_destroy(connector);
2697
			intel_sdvo_destroy(connector);
2651
	}
2698
	}
2652
	}
2699
	}
Line 2945... Line 2992...
2945
        }
2992
        }
2946
    }
2993
    }
Line 2947... Line 2994...
2947
 
2994
 
2948
	intel_encoder->compute_config = intel_sdvo_compute_config;
2995
	intel_encoder->compute_config = intel_sdvo_compute_config;
2949
	intel_encoder->disable = intel_disable_sdvo;
2996
	intel_encoder->disable = intel_disable_sdvo;
2950
	intel_encoder->mode_set = intel_sdvo_mode_set;
2997
	intel_encoder->pre_enable = intel_sdvo_pre_enable;
2951
	intel_encoder->enable = intel_enable_sdvo;
2998
	intel_encoder->enable = intel_enable_sdvo;
2952
	intel_encoder->get_hw_state = intel_sdvo_get_hw_state;
2999
	intel_encoder->get_hw_state = intel_sdvo_get_hw_state;
Line 2953... Line 3000...
2953
	intel_encoder->get_config = intel_sdvo_get_config;
3000
	intel_encoder->get_config = intel_sdvo_get_config;
Line 2978... Line 3025...
2978
	 * not the case we have evidence that cloning a plain unscaled mode with
3025
	 * not the case we have evidence that cloning a plain unscaled mode with
2979
	 * VGA doesn't really work. Furthermore the cloning flags are way too
3026
	 * VGA doesn't really work. Furthermore the cloning flags are way too
2980
	 * simplistic anyway to express such constraints, so just give up on
3027
	 * simplistic anyway to express such constraints, so just give up on
2981
	 * cloning for SDVO encoders.
3028
	 * cloning for SDVO encoders.
2982
	 */
3029
	 */
2983
	intel_sdvo->base.cloneable = false;
3030
	intel_sdvo->base.cloneable = 0;
Line 2984... Line 3031...
2984
 
3031
 
Line 2985... Line 3032...
2985
    intel_sdvo_select_ddc_bus(dev_priv, intel_sdvo, sdvo_reg);
3032
    intel_sdvo_select_ddc_bus(dev_priv, intel_sdvo, sdvo_reg);
2986
 
3033