Lines Matching +full:ddc +full:- +full:i2c

3  * Copyright © 2006-2007 Intel Corporation
31 #include <linux/i2c.h>
65 #define IS_TV(c) ((c)->output_flag & SDVO_TV_MASK)
66 #define IS_TMDS(c) ((c)->output_flag & SDVO_TMDS_MASK)
67 #define IS_LVDS(c) ((c)->output_flag & SDVO_LVDS_MASK)
68 #define IS_TV_OR_LVDS(c) ((c)->output_flag & (SDVO_TV_MASK | SDVO_LVDS_MASK))
69 #define IS_DIGITAL(c) ((c)->output_flag & (SDVO_TMDS_MASK | SDVO_LVDS_MASK))
71 #define HAS_DDC(c) ((c)->output_flag & (SDVO_RGB_MASK | SDVO_TMDS_MASK | \
89 struct i2c_adapter ddc; member
97 struct i2c_adapter *i2c; member
100 struct intel_sdvo_ddc ddc[3]; member
122 * the sdvo flag gets lost in round trip: dtd->adjusted_mode->dtd
138 /* add the property for the SDVO-TV */
156 /* add the property for the SDVO-TV/LVDS */
215 struct drm_device *dev = intel_sdvo->base.base.dev; in intel_sdvo_write_sdvox()
221 intel_de_write(dev_priv, intel_sdvo->sdvo_reg, val); in intel_sdvo_write_sdvox()
222 intel_de_posting_read(dev_priv, intel_sdvo->sdvo_reg); in intel_sdvo_write_sdvox()
228 intel_de_write(dev_priv, intel_sdvo->sdvo_reg, val); in intel_sdvo_write_sdvox()
229 intel_de_posting_read(dev_priv, intel_sdvo->sdvo_reg); in intel_sdvo_write_sdvox()
234 if (intel_sdvo->base.port == PORT_B) in intel_sdvo_write_sdvox()
255 struct drm_i915_private *i915 = to_i915(intel_sdvo->base.base.dev); in intel_sdvo_read_byte()
258 .addr = intel_sdvo->target_addr, in intel_sdvo_read_byte()
264 .addr = intel_sdvo->target_addr, in intel_sdvo_read_byte()
272 if ((ret = i2c_transfer(intel_sdvo->i2c, msgs, 2)) == 2) in intel_sdvo_read_byte()
275 drm_dbg_kms(&i915->drm, "i2c transfer returned %d\n", ret); in intel_sdvo_read_byte()
412 #define SDVO_NAME(svdo) ((svdo)->base.port == PORT_B ? "SDVOB" : "SDVOC")
417 struct drm_i915_private *dev_priv = to_i915(intel_sdvo->base.base.dev); in intel_sdvo_debug_write()
423 pos += snprintf(buffer + pos, max_t(int, sizeof(buffer) - pos, 0), args) in intel_sdvo_debug_write()
438 drm_WARN_ON(&dev_priv->drm, pos >= sizeof(buffer) - 1); in intel_sdvo_debug_write()
441 drm_dbg_kms(&dev_priv->drm, "%s: W: %02X %s\n", SDVO_NAME(intel_sdvo), in intel_sdvo_debug_write()
467 struct drm_i915_private *i915 = to_i915(intel_sdvo->base.base.dev); in __intel_sdvo_write_cmd()
486 msgs[i].addr = intel_sdvo->target_addr; in __intel_sdvo_write_cmd()
490 buf[2*i + 0] = SDVO_I2C_ARG_0 - i; in __intel_sdvo_write_cmd()
493 msgs[i].addr = intel_sdvo->target_addr; in __intel_sdvo_write_cmd()
502 msgs[i+1].addr = intel_sdvo->target_addr; in __intel_sdvo_write_cmd()
507 msgs[i+2].addr = intel_sdvo->target_addr; in __intel_sdvo_write_cmd()
513 ret = i2c_transfer(intel_sdvo->i2c, msgs, i+3); in __intel_sdvo_write_cmd()
515 ret = __i2c_transfer(intel_sdvo->i2c, msgs, i+3); in __intel_sdvo_write_cmd()
517 drm_dbg_kms(&i915->drm, "I2c transfer returned %d\n", ret); in __intel_sdvo_write_cmd()
522 /* failure in I2C transfer */ in __intel_sdvo_write_cmd()
523 drm_dbg_kms(&i915->drm, "I2c transfer returned %d/%d\n", ret, i+3); in __intel_sdvo_write_cmd()
542 struct drm_i915_private *dev_priv = to_i915(intel_sdvo->base.base.dev); in intel_sdvo_read_response()
574 status == SDVO_CMD_STATUS_TARGET_NOT_SPECIFIED) && --retry) { in intel_sdvo_read_response()
587 pos += snprintf(buffer + pos, max_t(int, sizeof(buffer) - pos, 0), args) in intel_sdvo_read_response()
607 drm_WARN_ON(&dev_priv->drm, pos >= sizeof(buffer) - 1); in intel_sdvo_read_response()
610 drm_dbg_kms(&dev_priv->drm, "%s: R: %s\n", in intel_sdvo_read_response()
615 drm_dbg_kms(&dev_priv->drm, "%s: R: ... failed %s\n", in intel_sdvo_read_response()
622 if (adjusted_mode->crtc_clock >= 100000) in intel_sdvo_get_pixel_multiplier()
624 else if (adjusted_mode->crtc_clock >= 50000) in intel_sdvo_get_pixel_multiplier()
633 /* This must be the immediately preceding write before the i2c xfer */ in __intel_sdvo_set_control_bus_switch()
753 return intel_sdvo_set_value(intel_sdvo, cmd, &dtd->part1, sizeof(dtd->part1)) && in intel_sdvo_set_timing()
754 intel_sdvo_set_value(intel_sdvo, cmd + 1, &dtd->part2, sizeof(dtd->part2)); in intel_sdvo_set_timing()
760 return intel_sdvo_get_value(intel_sdvo, cmd, &dtd->part1, sizeof(dtd->part1)) && in intel_sdvo_get_timing()
761 intel_sdvo_get_value(intel_sdvo, cmd + 1, &dtd->part2, sizeof(dtd->part2)); in intel_sdvo_get_timing()
793 args.clock = mode->clock / 10; in intel_sdvo_create_preferred_input_timing()
794 args.width = mode->hdisplay; in intel_sdvo_create_preferred_input_timing()
795 args.height = mode->vdisplay; in intel_sdvo_create_preferred_input_timing()
800 intel_panel_fixed_mode(&intel_sdvo_connector->base, mode); in intel_sdvo_create_preferred_input_timing()
802 if (fixed_mode->hdisplay != args.width || in intel_sdvo_create_preferred_input_timing()
803 fixed_mode->vdisplay != args.height) in intel_sdvo_create_preferred_input_timing()
815 BUILD_BUG_ON(sizeof(dtd->part1) != 8); in intel_sdvo_get_preferred_input_timing()
816 BUILD_BUG_ON(sizeof(dtd->part2) != 8); in intel_sdvo_get_preferred_input_timing()
818 &dtd->part1, sizeof(dtd->part1)) && in intel_sdvo_get_preferred_input_timing()
820 &dtd->part2, sizeof(dtd->part2)); in intel_sdvo_get_preferred_input_timing()
838 width = mode->hdisplay; in intel_sdvo_get_dtd_from_mode()
839 height = mode->vdisplay; in intel_sdvo_get_dtd_from_mode()
842 h_blank_len = mode->htotal - mode->hdisplay; in intel_sdvo_get_dtd_from_mode()
843 h_sync_len = mode->hsync_end - mode->hsync_start; in intel_sdvo_get_dtd_from_mode()
845 v_blank_len = mode->vtotal - mode->vdisplay; in intel_sdvo_get_dtd_from_mode()
846 v_sync_len = mode->vsync_end - mode->vsync_start; in intel_sdvo_get_dtd_from_mode()
848 h_sync_offset = mode->hsync_start - mode->hdisplay; in intel_sdvo_get_dtd_from_mode()
849 v_sync_offset = mode->vsync_start - mode->vdisplay; in intel_sdvo_get_dtd_from_mode()
851 mode_clock = mode->clock; in intel_sdvo_get_dtd_from_mode()
853 dtd->part1.clock = mode_clock; in intel_sdvo_get_dtd_from_mode()
855 dtd->part1.h_active = width & 0xff; in intel_sdvo_get_dtd_from_mode()
856 dtd->part1.h_blank = h_blank_len & 0xff; in intel_sdvo_get_dtd_from_mode()
857 dtd->part1.h_high = (((width >> 8) & 0xf) << 4) | in intel_sdvo_get_dtd_from_mode()
859 dtd->part1.v_active = height & 0xff; in intel_sdvo_get_dtd_from_mode()
860 dtd->part1.v_blank = v_blank_len & 0xff; in intel_sdvo_get_dtd_from_mode()
861 dtd->part1.v_high = (((height >> 8) & 0xf) << 4) | in intel_sdvo_get_dtd_from_mode()
864 dtd->part2.h_sync_off = h_sync_offset & 0xff; in intel_sdvo_get_dtd_from_mode()
865 dtd->part2.h_sync_width = h_sync_len & 0xff; in intel_sdvo_get_dtd_from_mode()
866 dtd->part2.v_sync_off_width = (v_sync_offset & 0xf) << 4 | in intel_sdvo_get_dtd_from_mode()
868 dtd->part2.sync_off_width_high = ((h_sync_offset & 0x300) >> 2) | in intel_sdvo_get_dtd_from_mode()
872 dtd->part2.dtd_flags = 0x18; in intel_sdvo_get_dtd_from_mode()
873 if (mode->flags & DRM_MODE_FLAG_INTERLACE) in intel_sdvo_get_dtd_from_mode()
874 dtd->part2.dtd_flags |= DTD_FLAG_INTERLACE; in intel_sdvo_get_dtd_from_mode()
875 if (mode->flags & DRM_MODE_FLAG_PHSYNC) in intel_sdvo_get_dtd_from_mode()
876 dtd->part2.dtd_flags |= DTD_FLAG_HSYNC_POSITIVE; in intel_sdvo_get_dtd_from_mode()
877 if (mode->flags & DRM_MODE_FLAG_PVSYNC) in intel_sdvo_get_dtd_from_mode()
878 dtd->part2.dtd_flags |= DTD_FLAG_VSYNC_POSITIVE; in intel_sdvo_get_dtd_from_mode()
880 dtd->part2.v_sync_off_high = v_sync_offset & 0xc0; in intel_sdvo_get_dtd_from_mode()
888 mode.hdisplay = dtd->part1.h_active; in intel_sdvo_get_mode_from_dtd()
889 mode.hdisplay += ((dtd->part1.h_high >> 4) & 0x0f) << 8; in intel_sdvo_get_mode_from_dtd()
890 mode.hsync_start = mode.hdisplay + dtd->part2.h_sync_off; in intel_sdvo_get_mode_from_dtd()
891 mode.hsync_start += (dtd->part2.sync_off_width_high & 0xc0) << 2; in intel_sdvo_get_mode_from_dtd()
892 mode.hsync_end = mode.hsync_start + dtd->part2.h_sync_width; in intel_sdvo_get_mode_from_dtd()
893 mode.hsync_end += (dtd->part2.sync_off_width_high & 0x30) << 4; in intel_sdvo_get_mode_from_dtd()
894 mode.htotal = mode.hdisplay + dtd->part1.h_blank; in intel_sdvo_get_mode_from_dtd()
895 mode.htotal += (dtd->part1.h_high & 0xf) << 8; in intel_sdvo_get_mode_from_dtd()
897 mode.vdisplay = dtd->part1.v_active; in intel_sdvo_get_mode_from_dtd()
898 mode.vdisplay += ((dtd->part1.v_high >> 4) & 0x0f) << 8; in intel_sdvo_get_mode_from_dtd()
900 mode.vsync_start += (dtd->part2.v_sync_off_width >> 4) & 0xf; in intel_sdvo_get_mode_from_dtd()
901 mode.vsync_start += (dtd->part2.sync_off_width_high & 0x0c) << 2; in intel_sdvo_get_mode_from_dtd()
902 mode.vsync_start += dtd->part2.v_sync_off_high & 0xc0; in intel_sdvo_get_mode_from_dtd()
904 (dtd->part2.v_sync_off_width & 0xf); in intel_sdvo_get_mode_from_dtd()
905 mode.vsync_end += (dtd->part2.sync_off_width_high & 0x3) << 4; in intel_sdvo_get_mode_from_dtd()
906 mode.vtotal = mode.vdisplay + dtd->part1.v_blank; in intel_sdvo_get_mode_from_dtd()
907 mode.vtotal += (dtd->part1.v_high & 0xf) << 8; in intel_sdvo_get_mode_from_dtd()
909 mode.clock = dtd->part1.clock * 10; in intel_sdvo_get_mode_from_dtd()
911 if (dtd->part2.dtd_flags & DTD_FLAG_INTERLACE) in intel_sdvo_get_mode_from_dtd()
913 if (dtd->part2.dtd_flags & DTD_FLAG_HSYNC_POSITIVE) in intel_sdvo_get_mode_from_dtd()
917 if (dtd->part2.dtd_flags & DTD_FLAG_VSYNC_POSITIVE) in intel_sdvo_get_mode_from_dtd()
1011 struct drm_i915_private *i915 = to_i915(intel_sdvo->base.base.dev); in intel_sdvo_write_infoframe()
1024 drm_dbg_kms(&i915->drm, in intel_sdvo_write_infoframe()
1034 memcpy(tmp, data + i, min_t(unsigned, 8, length - i)); in intel_sdvo_write_infoframe()
1051 struct drm_i915_private *i915 = to_i915(intel_sdvo->base.base.dev); in intel_sdvo_read_infoframe()
1059 return -ENXIO; in intel_sdvo_read_infoframe()
1067 return -ENXIO; in intel_sdvo_read_infoframe()
1072 return -ENXIO; in intel_sdvo_read_infoframe()
1081 drm_dbg_kms(&i915->drm, in intel_sdvo_read_infoframe()
1089 return -ENXIO; in intel_sdvo_read_infoframe()
1091 min_t(unsigned int, 8, hbuf_size - i))) in intel_sdvo_read_infoframe()
1092 return -ENXIO; in intel_sdvo_read_infoframe()
1102 struct drm_i915_private *dev_priv = to_i915(intel_sdvo->base.base.dev); in intel_sdvo_compute_avi_infoframe()
1103 struct hdmi_avi_infoframe *frame = &crtc_state->infoframes.avi.avi; in intel_sdvo_compute_avi_infoframe()
1105 &crtc_state->hw.adjusted_mode; in intel_sdvo_compute_avi_infoframe()
1108 if (!crtc_state->has_hdmi_sink) in intel_sdvo_compute_avi_infoframe()
1111 crtc_state->infoframes.enable |= in intel_sdvo_compute_avi_infoframe()
1115 conn_state->connector, in intel_sdvo_compute_avi_infoframe()
1121 conn_state->connector, in intel_sdvo_compute_avi_infoframe()
1123 crtc_state->limited_color_range ? in intel_sdvo_compute_avi_infoframe()
1128 if (drm_WARN_ON(&dev_priv->drm, ret)) in intel_sdvo_compute_avi_infoframe()
1137 struct drm_i915_private *dev_priv = to_i915(intel_sdvo->base.base.dev); in intel_sdvo_set_avi_infoframe()
1139 const union hdmi_infoframe *frame = &crtc_state->infoframes.avi; in intel_sdvo_set_avi_infoframe()
1142 if ((crtc_state->infoframes.enable & in intel_sdvo_set_avi_infoframe()
1146 if (drm_WARN_ON(&dev_priv->drm, in intel_sdvo_set_avi_infoframe()
1147 frame->any.type != HDMI_INFOFRAME_TYPE_AVI)) in intel_sdvo_set_avi_infoframe()
1151 if (drm_WARN_ON(&dev_priv->drm, len < 0)) in intel_sdvo_set_avi_infoframe()
1162 struct drm_i915_private *i915 = to_i915(intel_sdvo->base.base.dev); in intel_sdvo_get_avi_infoframe()
1164 union hdmi_infoframe *frame = &crtc_state->infoframes.avi; in intel_sdvo_get_avi_infoframe()
1168 if (!crtc_state->has_hdmi_sink) in intel_sdvo_get_avi_infoframe()
1174 drm_dbg_kms(&i915->drm, "failed to read AVI infoframe\n"); in intel_sdvo_get_avi_infoframe()
1180 crtc_state->infoframes.enable |= in intel_sdvo_get_avi_infoframe()
1185 drm_dbg_kms(&i915->drm, "Failed to unpack AVI infoframe\n"); in intel_sdvo_get_avi_infoframe()
1189 if (frame->any.type != HDMI_INFOFRAME_TYPE_AVI) in intel_sdvo_get_avi_infoframe()
1190 drm_dbg_kms(&i915->drm, in intel_sdvo_get_avi_infoframe()
1192 frame->any.type, HDMI_INFOFRAME_TYPE_AVI); in intel_sdvo_get_avi_infoframe()
1198 struct drm_i915_private *i915 = to_i915(intel_sdvo->base.base.dev); in intel_sdvo_get_eld()
1202 if (!crtc_state->has_audio) in intel_sdvo_get_eld()
1212 crtc_state->eld, sizeof(crtc_state->eld)); in intel_sdvo_get_eld()
1214 drm_dbg_kms(&i915->drm, "failed to read ELD\n"); in intel_sdvo_get_eld()
1223 format_map = 1 << conn_state->tv.legacy_mode; in intel_sdvo_set_tv_format()
1241 intel_sdvo_connector->output_flag)) in intel_sdvo_set_output_timings_from_mode()
1277 intel_sdvo->dtd_sdvo_flags = input_dtd.part2.sdvo_flags; in intel_sdvo_get_preferred_input_mode()
1284 struct drm_i915_private *dev_priv = to_i915(pipe_config->uapi.crtc->dev); in i9xx_adjust_sdvo_tv_clock()
1285 unsigned int dotclock = pipe_config->hw.adjusted_mode.crtc_clock; in i9xx_adjust_sdvo_tv_clock()
1286 struct dpll *clock = &pipe_config->dpll; in i9xx_adjust_sdvo_tv_clock()
1293 clock->p1 = 2; in i9xx_adjust_sdvo_tv_clock()
1294 clock->p2 = 10; in i9xx_adjust_sdvo_tv_clock()
1295 clock->n = 3; in i9xx_adjust_sdvo_tv_clock()
1296 clock->m1 = 16; in i9xx_adjust_sdvo_tv_clock()
1297 clock->m2 = 8; in i9xx_adjust_sdvo_tv_clock()
1299 clock->p1 = 1; in i9xx_adjust_sdvo_tv_clock()
1300 clock->p2 = 10; in i9xx_adjust_sdvo_tv_clock()
1301 clock->n = 6; in i9xx_adjust_sdvo_tv_clock()
1302 clock->m1 = 12; in i9xx_adjust_sdvo_tv_clock()
1303 clock->m2 = 8; in i9xx_adjust_sdvo_tv_clock()
1305 drm_dbg_kms(&dev_priv->drm, in i9xx_adjust_sdvo_tv_clock()
1307 return -EINVAL; in i9xx_adjust_sdvo_tv_clock()
1310 pipe_config->clock_set = true; in i9xx_adjust_sdvo_tv_clock()
1318 struct drm_connector *connector = conn_state->connector; in intel_has_hdmi_sink()
1320 return intel_sdvo_connector->is_hdmi && in intel_has_hdmi_sink()
1321 connector->display_info.is_hdmi && in intel_has_hdmi_sink()
1322 READ_ONCE(to_intel_digital_connector_state(conn_state)->force_audio) != HDMI_AUDIO_OFF_DVI; in intel_has_hdmi_sink()
1331 if ((intel_sdvo->colorimetry_cap & SDVO_COLORIMETRY_RGB220) == 0) in intel_sdvo_limited_color_range()
1341 struct drm_connector *connector = conn_state->connector; in intel_sdvo_has_audio()
1347 if (!crtc_state->has_hdmi_sink) in intel_sdvo_has_audio()
1350 if (intel_conn_state->force_audio == HDMI_AUDIO_AUTO) in intel_sdvo_has_audio()
1351 return intel_sdvo_connector->is_hdmi && in intel_sdvo_has_audio()
1352 connector->display_info.has_audio; in intel_sdvo_has_audio()
1354 return intel_conn_state->force_audio == HDMI_AUDIO_ON; in intel_sdvo_has_audio()
1361 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in intel_sdvo_compute_config()
1364 to_intel_sdvo_connector(conn_state->connector); in intel_sdvo_compute_config()
1365 struct drm_display_mode *adjusted_mode = &pipe_config->hw.adjusted_mode; in intel_sdvo_compute_config()
1366 struct drm_display_mode *mode = &pipe_config->hw.mode; in intel_sdvo_compute_config()
1368 if (HAS_PCH_SPLIT(to_i915(encoder->base.dev))) { in intel_sdvo_compute_config()
1369 pipe_config->has_pch_encoder = true; in intel_sdvo_compute_config()
1371 return -EINVAL; in intel_sdvo_compute_config()
1374 drm_dbg_kms(&i915->drm, "forcing bpc to 8 for SDVO\n"); in intel_sdvo_compute_config()
1376 pipe_config->pipe_bpp = 8*3; in intel_sdvo_compute_config()
1377 pipe_config->sink_format = INTEL_OUTPUT_FORMAT_RGB; in intel_sdvo_compute_config()
1378 pipe_config->output_format = INTEL_OUTPUT_FORMAT_RGB; in intel_sdvo_compute_config()
1390 return -EINVAL; in intel_sdvo_compute_config()
1396 pipe_config->sdvo_tv_clock = true; in intel_sdvo_compute_config()
1399 intel_panel_fixed_mode(&intel_sdvo_connector->base, mode); in intel_sdvo_compute_config()
1402 ret = intel_panel_compute_config(&intel_sdvo_connector->base, in intel_sdvo_compute_config()
1410 return -EINVAL; in intel_sdvo_compute_config()
1418 if (adjusted_mode->flags & DRM_MODE_FLAG_DBLSCAN) in intel_sdvo_compute_config()
1419 return -EINVAL; in intel_sdvo_compute_config()
1425 pipe_config->pixel_multiplier = in intel_sdvo_compute_config()
1428 pipe_config->has_hdmi_sink = intel_has_hdmi_sink(intel_sdvo_connector, conn_state); in intel_sdvo_compute_config()
1430 pipe_config->has_audio = in intel_sdvo_compute_config()
1434 pipe_config->limited_color_range = in intel_sdvo_compute_config()
1447 if (conn_state->picture_aspect_ratio) in intel_sdvo_compute_config()
1448 adjusted_mode->picture_aspect_ratio = in intel_sdvo_compute_config()
1449 conn_state->picture_aspect_ratio; in intel_sdvo_compute_config()
1453 drm_dbg_kms(&i915->drm, "bad AVI infoframe\n"); in intel_sdvo_compute_config()
1454 return -EINVAL; in intel_sdvo_compute_config()
1469 const struct drm_connector_state *conn_state = &sdvo_state->base.base; in intel_sdvo_update_props()
1471 to_intel_sdvo_connector(conn_state->connector); in intel_sdvo_update_props()
1474 if (intel_sdvo_conn->left) in intel_sdvo_update_props()
1475 UPDATE_PROPERTY(sdvo_state->tv.overscan_h, OVERSCAN_H); in intel_sdvo_update_props()
1477 if (intel_sdvo_conn->top) in intel_sdvo_update_props()
1478 UPDATE_PROPERTY(sdvo_state->tv.overscan_v, OVERSCAN_V); in intel_sdvo_update_props()
1480 if (intel_sdvo_conn->hpos) in intel_sdvo_update_props()
1481 UPDATE_PROPERTY(sdvo_state->tv.hpos, HPOS); in intel_sdvo_update_props()
1483 if (intel_sdvo_conn->vpos) in intel_sdvo_update_props()
1484 UPDATE_PROPERTY(sdvo_state->tv.vpos, VPOS); in intel_sdvo_update_props()
1486 if (intel_sdvo_conn->saturation) in intel_sdvo_update_props()
1487 UPDATE_PROPERTY(conn_state->tv.saturation, SATURATION); in intel_sdvo_update_props()
1489 if (intel_sdvo_conn->contrast) in intel_sdvo_update_props()
1490 UPDATE_PROPERTY(conn_state->tv.contrast, CONTRAST); in intel_sdvo_update_props()
1492 if (intel_sdvo_conn->hue) in intel_sdvo_update_props()
1493 UPDATE_PROPERTY(conn_state->tv.hue, HUE); in intel_sdvo_update_props()
1495 if (intel_sdvo_conn->brightness) in intel_sdvo_update_props()
1496 UPDATE_PROPERTY(conn_state->tv.brightness, BRIGHTNESS); in intel_sdvo_update_props()
1498 if (intel_sdvo_conn->sharpness) in intel_sdvo_update_props()
1499 UPDATE_PROPERTY(sdvo_state->tv.sharpness, SHARPNESS); in intel_sdvo_update_props()
1501 if (intel_sdvo_conn->flicker_filter) in intel_sdvo_update_props()
1502 UPDATE_PROPERTY(sdvo_state->tv.flicker_filter, FLICKER_FILTER); in intel_sdvo_update_props()
1504 if (intel_sdvo_conn->flicker_filter_2d) in intel_sdvo_update_props()
1505 UPDATE_PROPERTY(sdvo_state->tv.flicker_filter_2d, FLICKER_FILTER_2D); in intel_sdvo_update_props()
1507 if (intel_sdvo_conn->flicker_filter_adaptive) in intel_sdvo_update_props()
1508 UPDATE_PROPERTY(sdvo_state->tv.flicker_filter_adaptive, FLICKER_FILTER_ADAPTIVE); in intel_sdvo_update_props()
1510 if (intel_sdvo_conn->tv_chroma_filter) in intel_sdvo_update_props()
1511 UPDATE_PROPERTY(sdvo_state->tv.chroma_filter, TV_CHROMA_FILTER); in intel_sdvo_update_props()
1513 if (intel_sdvo_conn->tv_luma_filter) in intel_sdvo_update_props()
1514 UPDATE_PROPERTY(sdvo_state->tv.luma_filter, TV_LUMA_FILTER); in intel_sdvo_update_props()
1516 if (intel_sdvo_conn->dot_crawl) in intel_sdvo_update_props()
1517 UPDATE_PROPERTY(sdvo_state->tv.dot_crawl, DOT_CRAWL); in intel_sdvo_update_props()
1527 struct drm_i915_private *dev_priv = to_i915(intel_encoder->base.dev); in intel_sdvo_pre_enable()
1528 struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc); in intel_sdvo_pre_enable()
1529 const struct drm_display_mode *adjusted_mode = &crtc_state->hw.adjusted_mode; in intel_sdvo_pre_enable()
1533 to_intel_sdvo_connector(conn_state->connector); in intel_sdvo_pre_enable()
1534 const struct drm_display_mode *mode = &crtc_state->hw.mode; in intel_sdvo_pre_enable()
1545 * output. This is only correct if we're a single-input device, in in intel_sdvo_pre_enable()
1547 * channel on the motherboard. In a two-input device, the first input in intel_sdvo_pre_enable()
1550 in_out.in0 = intel_sdvo_connector->output_flag; in intel_sdvo_pre_enable()
1559 intel_sdvo_connector->output_flag)) in intel_sdvo_pre_enable()
1565 intel_panel_fixed_mode(&intel_sdvo_connector->base, mode); in intel_sdvo_pre_enable()
1572 drm_info(&dev_priv->drm, in intel_sdvo_pre_enable()
1580 if (crtc_state->has_hdmi_sink) { in intel_sdvo_pre_enable()
1583 crtc_state->limited_color_range ? in intel_sdvo_pre_enable()
1588 !!(adjusted_mode->flags & in intel_sdvo_pre_enable()
1600 input_dtd.part2.sdvo_flags = intel_sdvo->dtd_sdvo_flags; in intel_sdvo_pre_enable()
1602 drm_info(&dev_priv->drm, in intel_sdvo_pre_enable()
1606 switch (crtc_state->pixel_multiplier) { in intel_sdvo_pre_enable()
1608 drm_WARN(&dev_priv->drm, 1, in intel_sdvo_pre_enable()
1626 sdvox = intel_de_read(dev_priv, intel_sdvo->sdvo_reg); in intel_sdvo_pre_enable()
1627 if (intel_sdvo->base.port == PORT_B) in intel_sdvo_pre_enable()
1635 sdvox |= SDVO_PIPE_SEL_CPT(crtc->pipe); in intel_sdvo_pre_enable()
1637 sdvox |= SDVO_PIPE_SEL(crtc->pipe); in intel_sdvo_pre_enable()
1645 sdvox |= (crtc_state->pixel_multiplier - 1) in intel_sdvo_pre_enable()
1658 to_intel_sdvo_connector(&connector->base); in intel_sdvo_connector_get_hw_state()
1664 return active_outputs & intel_sdvo_connector->output_flag; in intel_sdvo_connector_get_hw_state()
1688 struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); in intel_sdvo_get_hw_state()
1695 ret = intel_sdvo_port_enabled(dev_priv, intel_sdvo->sdvo_reg, pipe); in intel_sdvo_get_hw_state()
1703 struct drm_device *dev = encoder->base.dev; in intel_sdvo_get_config()
1713 pipe_config->output_types |= BIT(INTEL_OUTPUT_SDVO); in intel_sdvo_get_config()
1715 sdvox = intel_de_read(dev_priv, intel_sdvo->sdvo_reg); in intel_sdvo_get_config()
1723 drm_dbg(&dev_priv->drm, "failed to retrieve SDVO DTD\n"); in intel_sdvo_get_config()
1724 pipe_config->quirks |= PIPE_CONFIG_QUIRK_MODE_SYNC_FLAGS; in intel_sdvo_get_config()
1737 pipe_config->hw.adjusted_mode.flags |= flags; in intel_sdvo_get_config()
1743 * encoder->get_config we so already have a valid pixel multplier on all in intel_sdvo_get_config()
1747 pipe_config->pixel_multiplier = in intel_sdvo_get_config()
1752 dotclock = pipe_config->port_clock; in intel_sdvo_get_config()
1754 if (pipe_config->pixel_multiplier) in intel_sdvo_get_config()
1755 dotclock /= pipe_config->pixel_multiplier; in intel_sdvo_get_config()
1757 pipe_config->hw.adjusted_mode.crtc_clock = dotclock; in intel_sdvo_get_config()
1776 encoder_pixel_multiplier != pipe_config->pixel_multiplier, in intel_sdvo_get_config()
1778 pipe_config->pixel_multiplier, encoder_pixel_multiplier); in intel_sdvo_get_config()
1783 pipe_config->limited_color_range = true; in intel_sdvo_get_config()
1789 pipe_config->has_audio = true; in intel_sdvo_get_config()
1795 pipe_config->has_hdmi_sink = true; in intel_sdvo_get_config()
1809 if (!old_crtc_state->has_audio) in intel_sdvo_disable_audio()
1820 const u8 *eld = crtc_state->eld; in intel_sdvo_enable_audio()
1822 if (!crtc_state->has_audio) in intel_sdvo_enable_audio()
1840 struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); in intel_disable_sdvo()
1842 struct intel_crtc *crtc = to_intel_crtc(old_crtc_state->uapi.crtc); in intel_disable_sdvo()
1850 temp = intel_de_read(dev_priv, intel_sdvo->sdvo_reg); in intel_disable_sdvo()
1860 if (HAS_PCH_IBX(dev_priv) && crtc->pipe == PIPE_B) { in intel_disable_sdvo()
1901 struct drm_device *dev = encoder->base.dev; in intel_enable_sdvo()
1905 to_intel_sdvo_connector(conn_state->connector); in intel_enable_sdvo()
1906 struct intel_crtc *crtc = to_intel_crtc(pipe_config->uapi.crtc); in intel_enable_sdvo()
1912 temp = intel_de_read(dev_priv, intel_sdvo->sdvo_reg); in intel_enable_sdvo()
1927 drm_dbg_kms(&dev_priv->drm, in intel_enable_sdvo()
1935 intel_sdvo_set_active_outputs(intel_sdvo, intel_sdvo_connector->output_flag); in intel_enable_sdvo()
1942 struct drm_i915_private *i915 = to_i915(connector->dev); in intel_sdvo_mode_valid()
1946 bool has_hdmi_sink = intel_has_hdmi_sink(intel_sdvo_connector, connector->state); in intel_sdvo_mode_valid()
1947 int max_dotclk = i915->display.cdclk.max_dotclk_freq; in intel_sdvo_mode_valid()
1949 int clock = mode->clock; in intel_sdvo_mode_valid()
1958 if (mode->flags & DRM_MODE_FLAG_DBLCLK) { in intel_sdvo_mode_valid()
1964 if (intel_sdvo->pixel_clock_min > clock) in intel_sdvo_mode_valid()
1967 if (intel_sdvo->pixel_clock_max < clock) in intel_sdvo_mode_valid()
1973 status = intel_panel_mode_valid(&intel_sdvo_connector->base, mode); in intel_sdvo_mode_valid()
1983 struct drm_i915_private *i915 = to_i915(intel_sdvo->base.base.dev); in intel_sdvo_get_capabilities()
1990 drm_dbg_kms(&i915->drm, "SDVO capabilities:\n" in intel_sdvo_get_capabilities()
2003 caps->vendor_id, in intel_sdvo_get_capabilities()
2004 caps->device_id, in intel_sdvo_get_capabilities()
2005 caps->device_rev_id, in intel_sdvo_get_capabilities()
2006 caps->sdvo_version_major, in intel_sdvo_get_capabilities()
2007 caps->sdvo_version_minor, in intel_sdvo_get_capabilities()
2008 caps->sdvo_num_inputs, in intel_sdvo_get_capabilities()
2009 caps->smooth_scaling, in intel_sdvo_get_capabilities()
2010 caps->sharp_scaling, in intel_sdvo_get_capabilities()
2011 caps->up_scaling, in intel_sdvo_get_capabilities()
2012 caps->down_scaling, in intel_sdvo_get_capabilities()
2013 caps->stall_support, in intel_sdvo_get_capabilities()
2014 caps->output_flags); in intel_sdvo_get_capabilities()
2032 struct drm_i915_private *dev_priv = to_i915(intel_sdvo->base.base.dev); in intel_sdvo_get_hotplug_support()
2057 &intel_sdvo->hotplug_active, 2); in intel_sdvo_enable_hotplug()
2072 struct i2c_adapter *ddc = connector->ddc; in intel_sdvo_get_edid() local
2074 if (!ddc) in intel_sdvo_get_edid()
2077 return drm_edid_read_ddc(connector, ddc); in intel_sdvo_get_edid()
2080 /* Mac mini hack -- use the same DDC as the analog connector */
2084 struct drm_i915_private *i915 = to_i915(connector->dev); in intel_sdvo_get_analog_edid()
2085 struct i2c_adapter *ddc; in intel_sdvo_get_analog_edid() local
2087 ddc = intel_gmbus_get_adapter(i915, i915->display.vbt.crt_ddc_pin); in intel_sdvo_get_analog_edid()
2088 if (!ddc) in intel_sdvo_get_analog_edid()
2091 return drm_edid_read_ddc(connector, ddc); in intel_sdvo_get_analog_edid()
2104 * port, try to use the CRT ddc to read the EDID for DVI-connector. in intel_sdvo_tmds_sink_detect()
2111 /* DDC bus is shared, match EDID to connector type */ in intel_sdvo_tmds_sink_detect()
2129 drm_dbg_kms(sdvo->base.base.dev, in intel_sdvo_connector_matches_edid()
2138 struct drm_i915_private *i915 = to_i915(connector->dev); in intel_sdvo_detect()
2144 drm_dbg_kms(&i915->drm, "[CONNECTOR:%d:%s]\n", in intel_sdvo_detect()
2145 connector->base.id, connector->name); in intel_sdvo_detect()
2151 return connector->status; in intel_sdvo_detect()
2154 intel_sdvo_connector->output_flag)) in intel_sdvo_detect()
2162 drm_dbg_kms(&i915->drm, "SDVO response %d %d [%x]\n", in intel_sdvo_detect()
2164 intel_sdvo_connector->output_flag); in intel_sdvo_detect()
2169 if ((intel_sdvo_connector->output_flag & response) == 0) in intel_sdvo_detect()
2198 struct drm_i915_private *i915 = to_i915(connector->dev); in intel_sdvo_get_ddc_modes()
2202 drm_dbg_kms(connector->dev, "[CONNECTOR:%d:%s]\n", in intel_sdvo_get_ddc_modes()
2203 connector->base.id, connector->name); in intel_sdvo_get_ddc_modes()
2212 * Mac mini hack. On this device, the DVI-I connector shares one DDC in intel_sdvo_get_ddc_modes()
2214 * DDC fails, check to see if the analog output is disconnected, in in intel_sdvo_get_ddc_modes()
2215 * which case we'll look there for the digital DDC data. in intel_sdvo_get_ddc_modes()
2300 struct drm_i915_private *i915 = to_i915(intel_sdvo->base.base.dev); in intel_sdvo_get_tv_modes()
2303 const struct drm_connector_state *conn_state = connector->state; in intel_sdvo_get_tv_modes()
2309 drm_dbg_kms(&i915->drm, "[CONNECTOR:%d:%s]\n", in intel_sdvo_get_tv_modes()
2310 connector->base.id, connector->name); in intel_sdvo_get_tv_modes()
2319 format_map = 1 << conn_state->tv.legacy_mode; in intel_sdvo_get_tv_modes()
2323 if (!intel_sdvo_set_target_output(intel_sdvo, intel_sdvo_connector->output_flag)) in intel_sdvo_get_tv_modes()
2337 nmode = drm_mode_duplicate(connector->dev, in intel_sdvo_get_tv_modes()
2351 struct drm_i915_private *dev_priv = to_i915(connector->dev); in intel_sdvo_get_lvds_modes()
2353 drm_dbg_kms(&dev_priv->drm, "[CONNECTOR:%d:%s]\n", in intel_sdvo_get_lvds_modes()
2354 connector->base.id, connector->name); in intel_sdvo_get_lvds_modes()
2380 if (property == intel_sdvo_connector->tv_format) { in intel_sdvo_connector_atomic_get_property()
2383 for (i = 0; i < intel_sdvo_connector->format_supported_num; i++) in intel_sdvo_connector_atomic_get_property()
2384 if (state->tv.legacy_mode == intel_sdvo_connector->tv_format_supported[i]) { in intel_sdvo_connector_atomic_get_property()
2390 drm_WARN_ON(connector->dev, 1); in intel_sdvo_connector_atomic_get_property()
2392 } else if (property == intel_sdvo_connector->top || in intel_sdvo_connector_atomic_get_property()
2393 property == intel_sdvo_connector->bottom) in intel_sdvo_connector_atomic_get_property()
2394 *val = intel_sdvo_connector->max_vscan - sdvo_state->tv.overscan_v; in intel_sdvo_connector_atomic_get_property()
2395 else if (property == intel_sdvo_connector->left || in intel_sdvo_connector_atomic_get_property()
2396 property == intel_sdvo_connector->right) in intel_sdvo_connector_atomic_get_property()
2397 *val = intel_sdvo_connector->max_hscan - sdvo_state->tv.overscan_h; in intel_sdvo_connector_atomic_get_property()
2398 else if (property == intel_sdvo_connector->hpos) in intel_sdvo_connector_atomic_get_property()
2399 *val = sdvo_state->tv.hpos; in intel_sdvo_connector_atomic_get_property()
2400 else if (property == intel_sdvo_connector->vpos) in intel_sdvo_connector_atomic_get_property()
2401 *val = sdvo_state->tv.vpos; in intel_sdvo_connector_atomic_get_property()
2402 else if (property == intel_sdvo_connector->saturation) in intel_sdvo_connector_atomic_get_property()
2403 *val = state->tv.saturation; in intel_sdvo_connector_atomic_get_property()
2404 else if (property == intel_sdvo_connector->contrast) in intel_sdvo_connector_atomic_get_property()
2405 *val = state->tv.contrast; in intel_sdvo_connector_atomic_get_property()
2406 else if (property == intel_sdvo_connector->hue) in intel_sdvo_connector_atomic_get_property()
2407 *val = state->tv.hue; in intel_sdvo_connector_atomic_get_property()
2408 else if (property == intel_sdvo_connector->brightness) in intel_sdvo_connector_atomic_get_property()
2409 *val = state->tv.brightness; in intel_sdvo_connector_atomic_get_property()
2410 else if (property == intel_sdvo_connector->sharpness) in intel_sdvo_connector_atomic_get_property()
2411 *val = sdvo_state->tv.sharpness; in intel_sdvo_connector_atomic_get_property()
2412 else if (property == intel_sdvo_connector->flicker_filter) in intel_sdvo_connector_atomic_get_property()
2413 *val = sdvo_state->tv.flicker_filter; in intel_sdvo_connector_atomic_get_property()
2414 else if (property == intel_sdvo_connector->flicker_filter_2d) in intel_sdvo_connector_atomic_get_property()
2415 *val = sdvo_state->tv.flicker_filter_2d; in intel_sdvo_connector_atomic_get_property()
2416 else if (property == intel_sdvo_connector->flicker_filter_adaptive) in intel_sdvo_connector_atomic_get_property()
2417 *val = sdvo_state->tv.flicker_filter_adaptive; in intel_sdvo_connector_atomic_get_property()
2418 else if (property == intel_sdvo_connector->tv_chroma_filter) in intel_sdvo_connector_atomic_get_property()
2419 *val = sdvo_state->tv.chroma_filter; in intel_sdvo_connector_atomic_get_property()
2420 else if (property == intel_sdvo_connector->tv_luma_filter) in intel_sdvo_connector_atomic_get_property()
2421 *val = sdvo_state->tv.luma_filter; in intel_sdvo_connector_atomic_get_property()
2422 else if (property == intel_sdvo_connector->dot_crawl) in intel_sdvo_connector_atomic_get_property()
2423 *val = sdvo_state->tv.dot_crawl; in intel_sdvo_connector_atomic_get_property()
2439 if (property == intel_sdvo_connector->tv_format) { in intel_sdvo_connector_atomic_set_property()
2440 state->tv.legacy_mode = intel_sdvo_connector->tv_format_supported[val]; in intel_sdvo_connector_atomic_set_property()
2442 if (state->crtc) { in intel_sdvo_connector_atomic_set_property()
2444 drm_atomic_get_new_crtc_state(state->state, state->crtc); in intel_sdvo_connector_atomic_set_property()
2446 crtc_state->connectors_changed = true; in intel_sdvo_connector_atomic_set_property()
2448 } else if (property == intel_sdvo_connector->top || in intel_sdvo_connector_atomic_set_property()
2449 property == intel_sdvo_connector->bottom) in intel_sdvo_connector_atomic_set_property()
2451 sdvo_state->tv.overscan_v = intel_sdvo_connector->max_vscan - val; in intel_sdvo_connector_atomic_set_property()
2452 else if (property == intel_sdvo_connector->left || in intel_sdvo_connector_atomic_set_property()
2453 property == intel_sdvo_connector->right) in intel_sdvo_connector_atomic_set_property()
2455 sdvo_state->tv.overscan_h = intel_sdvo_connector->max_hscan - val; in intel_sdvo_connector_atomic_set_property()
2456 else if (property == intel_sdvo_connector->hpos) in intel_sdvo_connector_atomic_set_property()
2457 sdvo_state->tv.hpos = val; in intel_sdvo_connector_atomic_set_property()
2458 else if (property == intel_sdvo_connector->vpos) in intel_sdvo_connector_atomic_set_property()
2459 sdvo_state->tv.vpos = val; in intel_sdvo_connector_atomic_set_property()
2460 else if (property == intel_sdvo_connector->saturation) in intel_sdvo_connector_atomic_set_property()
2461 state->tv.saturation = val; in intel_sdvo_connector_atomic_set_property()
2462 else if (property == intel_sdvo_connector->contrast) in intel_sdvo_connector_atomic_set_property()
2463 state->tv.contrast = val; in intel_sdvo_connector_atomic_set_property()
2464 else if (property == intel_sdvo_connector->hue) in intel_sdvo_connector_atomic_set_property()
2465 state->tv.hue = val; in intel_sdvo_connector_atomic_set_property()
2466 else if (property == intel_sdvo_connector->brightness) in intel_sdvo_connector_atomic_set_property()
2467 state->tv.brightness = val; in intel_sdvo_connector_atomic_set_property()
2468 else if (property == intel_sdvo_connector->sharpness) in intel_sdvo_connector_atomic_set_property()
2469 sdvo_state->tv.sharpness = val; in intel_sdvo_connector_atomic_set_property()
2470 else if (property == intel_sdvo_connector->flicker_filter) in intel_sdvo_connector_atomic_set_property()
2471 sdvo_state->tv.flicker_filter = val; in intel_sdvo_connector_atomic_set_property()
2472 else if (property == intel_sdvo_connector->flicker_filter_2d) in intel_sdvo_connector_atomic_set_property()
2473 sdvo_state->tv.flicker_filter_2d = val; in intel_sdvo_connector_atomic_set_property()
2474 else if (property == intel_sdvo_connector->flicker_filter_adaptive) in intel_sdvo_connector_atomic_set_property()
2475 sdvo_state->tv.flicker_filter_adaptive = val; in intel_sdvo_connector_atomic_set_property()
2476 else if (property == intel_sdvo_connector->tv_chroma_filter) in intel_sdvo_connector_atomic_set_property()
2477 sdvo_state->tv.chroma_filter = val; in intel_sdvo_connector_atomic_set_property()
2478 else if (property == intel_sdvo_connector->tv_luma_filter) in intel_sdvo_connector_atomic_set_property()
2479 sdvo_state->tv.luma_filter = val; in intel_sdvo_connector_atomic_set_property()
2480 else if (property == intel_sdvo_connector->dot_crawl) in intel_sdvo_connector_atomic_set_property()
2481 sdvo_state->tv.dot_crawl = val; in intel_sdvo_connector_atomic_set_property()
2493 state = kmemdup(connector->state, sizeof(*state), GFP_KERNEL); in intel_sdvo_connector_duplicate_state()
2497 __drm_atomic_helper_connector_duplicate_state(connector, &state->base.base); in intel_sdvo_connector_duplicate_state()
2498 return &state->base.base; in intel_sdvo_connector_duplicate_state()
2525 if (new_conn_state->crtc && in intel_sdvo_atomic_check()
2526 (memcmp(&old_state->tv, &new_state->tv, sizeof(old_state->tv)) || in intel_sdvo_atomic_check()
2527 memcmp(&old_conn_state->tv, &new_conn_state->tv, sizeof(old_conn_state->tv)))) { in intel_sdvo_atomic_check()
2530 new_conn_state->crtc); in intel_sdvo_atomic_check()
2532 crtc_state->connectors_changed = true; in intel_sdvo_atomic_check()
2550 for (i = 0; i < ARRAY_SIZE(sdvo->ddc); i++) { in intel_sdvo_encoder_destroy()
2551 if (sdvo->ddc[i].ddc_bus) in intel_sdvo_encoder_destroy()
2552 i2c_del_adapter(&sdvo->ddc[i].ddc); in intel_sdvo_encoder_destroy()
2555 drm_encoder_cleanup(&encoder->base); in intel_sdvo_encoder_destroy()
2574 switch (connector->output_flag) { in intel_sdvo_guess_ddc_bus()
2596 mask &= sdvo->caps.output_flags; in intel_sdvo_guess_ddc_bus()
2598 /* If more than 3 outputs, default to DDC bus 3 for now. */ in intel_sdvo_guess_ddc_bus()
2607 * Choose the appropriate DDC bus for control bus switch command for this
2610 * DDC bus number assignment is in a priority order of RGB outputs, then TMDS
2617 struct drm_i915_private *dev_priv = to_i915(sdvo->base.base.dev); in intel_sdvo_select_ddc_bus()
2621 if (sdvo->base.port == PORT_B) in intel_sdvo_select_ddc_bus()
2622 mapping = &dev_priv->display.vbt.sdvo_mappings[0]; in intel_sdvo_select_ddc_bus()
2624 mapping = &dev_priv->display.vbt.sdvo_mappings[1]; in intel_sdvo_select_ddc_bus()
2626 if (mapping->initialized) in intel_sdvo_select_ddc_bus()
2627 ddc_bus = (mapping->ddc_pin & 0xf0) >> 4; in intel_sdvo_select_ddc_bus()
2634 return &sdvo->ddc[ddc_bus - 1]; in intel_sdvo_select_ddc_bus()
2640 struct drm_i915_private *dev_priv = to_i915(sdvo->base.base.dev); in intel_sdvo_select_i2c_bus()
2644 if (sdvo->base.port == PORT_B) in intel_sdvo_select_i2c_bus()
2645 mapping = &dev_priv->display.vbt.sdvo_mappings[0]; in intel_sdvo_select_i2c_bus()
2647 mapping = &dev_priv->display.vbt.sdvo_mappings[1]; in intel_sdvo_select_i2c_bus()
2649 if (mapping->initialized && in intel_sdvo_select_i2c_bus()
2650 intel_gmbus_is_valid_pin(dev_priv, mapping->i2c_pin)) in intel_sdvo_select_i2c_bus()
2651 pin = mapping->i2c_pin; in intel_sdvo_select_i2c_bus()
2655 drm_dbg_kms(&dev_priv->drm, "[ENCODER:%d:%s] I2C pin %d, target addr 0x%x\n", in intel_sdvo_select_i2c_bus()
2656 sdvo->base.base.base.id, sdvo->base.base.name, in intel_sdvo_select_i2c_bus()
2657 pin, sdvo->target_addr); in intel_sdvo_select_i2c_bus()
2659 sdvo->i2c = intel_gmbus_get_adapter(dev_priv, pin); in intel_sdvo_select_i2c_bus()
2662 * With gmbus we should be able to drive sdvo i2c at 2MHz, but somehow in intel_sdvo_select_i2c_bus()
2666 intel_gmbus_force_bit(sdvo->i2c, true); in intel_sdvo_select_i2c_bus()
2669 /* undo any changes intel_sdvo_select_i2c_bus() did to sdvo->i2c */
2673 intel_gmbus_force_bit(sdvo->i2c, false); in intel_sdvo_unselect_i2c_bus()
2685 struct drm_i915_private *dev_priv = to_i915(sdvo->base.base.dev); in intel_sdvo_get_target_addr()
2688 if (sdvo->base.port == PORT_B) { in intel_sdvo_get_target_addr()
2689 my_mapping = &dev_priv->display.vbt.sdvo_mappings[0]; in intel_sdvo_get_target_addr()
2690 other_mapping = &dev_priv->display.vbt.sdvo_mappings[1]; in intel_sdvo_get_target_addr()
2692 my_mapping = &dev_priv->display.vbt.sdvo_mappings[1]; in intel_sdvo_get_target_addr()
2693 other_mapping = &dev_priv->display.vbt.sdvo_mappings[0]; in intel_sdvo_get_target_addr()
2697 if (my_mapping->target_addr) in intel_sdvo_get_target_addr()
2698 return my_mapping->target_addr; in intel_sdvo_get_target_addr()
2704 if (other_mapping->target_addr) { in intel_sdvo_get_target_addr()
2705 if (other_mapping->target_addr == 0x70) in intel_sdvo_get_target_addr()
2715 if (sdvo->base.port == PORT_B) in intel_sdvo_get_target_addr()
2722 intel_sdvo_init_ddc_proxy(struct intel_sdvo_ddc *ddc,
2729 struct drm_i915_private *i915 = to_i915(encoder->base.base.dev); in intel_sdvo_connector_init()
2730 struct intel_sdvo_ddc *ddc = NULL; in intel_sdvo_connector_init() local
2734 ddc = intel_sdvo_select_ddc_bus(encoder, connector); in intel_sdvo_connector_init()
2736 ret = drm_connector_init_with_ddc(encoder->base.base.dev, in intel_sdvo_connector_init()
2737 &connector->base.base, in intel_sdvo_connector_init()
2739 connector->base.base.connector_type, in intel_sdvo_connector_init()
2740 ddc ? &ddc->ddc : NULL); in intel_sdvo_connector_init()
2744 drm_connector_helper_add(&connector->base.base, in intel_sdvo_connector_init()
2747 connector->base.base.display_info.subpixel_order = SubPixelHorizontalRGB; in intel_sdvo_connector_init()
2748 connector->base.base.interlace_allowed = true; in intel_sdvo_connector_init()
2749 connector->base.get_hw_state = intel_sdvo_connector_get_hw_state; in intel_sdvo_connector_init()
2751 intel_connector_attach_encoder(&connector->base, &encoder->base); in intel_sdvo_connector_init()
2753 if (ddc) in intel_sdvo_connector_init()
2754 drm_dbg_kms(&i915->drm, "[CONNECTOR:%d:%s] using %s\n", in intel_sdvo_connector_init()
2755 connector->base.base.base.id, connector->base.base.name, in intel_sdvo_connector_init()
2756 ddc->ddc.name); in intel_sdvo_connector_init()
2765 intel_attach_force_audio_property(&connector->base.base); in intel_sdvo_add_hdmi_properties()
2766 if (intel_sdvo->colorimetry_cap & SDVO_COLORIMETRY_RGB220) in intel_sdvo_add_hdmi_properties()
2767 intel_attach_broadcast_rgb_property(&connector->base.base); in intel_sdvo_add_hdmi_properties()
2768 intel_attach_aspect_ratio_property(&connector->base.base); in intel_sdvo_add_hdmi_properties()
2786 __drm_atomic_helper_connector_reset(&sdvo_connector->base.base, in intel_sdvo_connector_alloc()
2787 &conn_state->base.base); in intel_sdvo_connector_alloc()
2789 intel_panel_init_alloc(&sdvo_connector->base); in intel_sdvo_connector_alloc()
2797 struct drm_encoder *encoder = &intel_sdvo->base.base; in intel_sdvo_dvi_init()
2800 struct drm_i915_private *i915 = to_i915(intel_encoder->base.dev); in intel_sdvo_dvi_init()
2804 drm_dbg_kms(&i915->drm, "initialising DVI type 0x%x\n", type); in intel_sdvo_dvi_init()
2810 intel_sdvo_connector->output_flag = type; in intel_sdvo_dvi_init()
2812 intel_connector = &intel_sdvo_connector->base; in intel_sdvo_dvi_init()
2813 connector = &intel_connector->base; in intel_sdvo_dvi_init()
2815 intel_sdvo_connector->output_flag) { in intel_sdvo_dvi_init()
2816 intel_sdvo->hotplug_active |= intel_sdvo_connector->output_flag; in intel_sdvo_dvi_init()
2818 * Some SDVO devices have one-shot hotplug interrupts. in intel_sdvo_dvi_init()
2819 * Ensure that they get re-enabled when an interrupt happens. in intel_sdvo_dvi_init()
2821 intel_connector->polled = DRM_CONNECTOR_POLL_HPD; in intel_sdvo_dvi_init()
2822 intel_encoder->hotplug = intel_sdvo_hotplug; in intel_sdvo_dvi_init()
2825 intel_connector->polled = DRM_CONNECTOR_POLL_CONNECT | DRM_CONNECTOR_POLL_DISCONNECT; in intel_sdvo_dvi_init()
2827 intel_connector->base.polled = intel_connector->polled; in intel_sdvo_dvi_init()
2828 encoder->encoder_type = DRM_MODE_ENCODER_TMDS; in intel_sdvo_dvi_init()
2829 connector->connector_type = DRM_MODE_CONNECTOR_DVID; in intel_sdvo_dvi_init()
2832 connector->connector_type = DRM_MODE_CONNECTOR_HDMIA; in intel_sdvo_dvi_init()
2833 intel_sdvo_connector->is_hdmi = true; in intel_sdvo_dvi_init()
2841 if (intel_sdvo_connector->is_hdmi) in intel_sdvo_dvi_init()
2850 struct drm_i915_private *i915 = to_i915(intel_sdvo->base.base.dev); in intel_sdvo_tv_init()
2851 struct drm_encoder *encoder = &intel_sdvo->base.base; in intel_sdvo_tv_init()
2856 drm_dbg_kms(&i915->drm, "initialising TV type 0x%x\n", type); in intel_sdvo_tv_init()
2862 intel_connector = &intel_sdvo_connector->base; in intel_sdvo_tv_init()
2863 connector = &intel_connector->base; in intel_sdvo_tv_init()
2864 encoder->encoder_type = DRM_MODE_ENCODER_TVDAC; in intel_sdvo_tv_init()
2865 connector->connector_type = DRM_MODE_CONNECTOR_SVIDEO; in intel_sdvo_tv_init()
2867 intel_sdvo_connector->output_flag = type; in intel_sdvo_tv_init()
2890 struct drm_i915_private *i915 = to_i915(intel_sdvo->base.base.dev); in intel_sdvo_analog_init()
2891 struct drm_encoder *encoder = &intel_sdvo->base.base; in intel_sdvo_analog_init()
2896 drm_dbg_kms(&i915->drm, "initialising analog type 0x%x\n", type); in intel_sdvo_analog_init()
2902 intel_connector = &intel_sdvo_connector->base; in intel_sdvo_analog_init()
2903 connector = &intel_connector->base; in intel_sdvo_analog_init()
2904 intel_connector->polled = DRM_CONNECTOR_POLL_CONNECT; in intel_sdvo_analog_init()
2905 intel_connector->base.polled = intel_connector->polled; in intel_sdvo_analog_init()
2906 encoder->encoder_type = DRM_MODE_ENCODER_DAC; in intel_sdvo_analog_init()
2907 connector->connector_type = DRM_MODE_CONNECTOR_VGA; in intel_sdvo_analog_init()
2909 intel_sdvo_connector->output_flag = type; in intel_sdvo_analog_init()
2922 struct intel_display *display = to_intel_display(&intel_sdvo->base); in intel_sdvo_lvds_init()
2923 struct drm_encoder *encoder = &intel_sdvo->base.base; in intel_sdvo_lvds_init()
2924 struct drm_i915_private *i915 = to_i915(encoder->dev); in intel_sdvo_lvds_init()
2929 drm_dbg_kms(&i915->drm, "initialising LVDS type 0x%x\n", type); in intel_sdvo_lvds_init()
2935 intel_connector = &intel_sdvo_connector->base; in intel_sdvo_lvds_init()
2936 connector = &intel_connector->base; in intel_sdvo_lvds_init()
2937 encoder->encoder_type = DRM_MODE_ENCODER_LVDS; in intel_sdvo_lvds_init()
2938 connector->connector_type = DRM_MODE_CONNECTOR_LVDS; in intel_sdvo_lvds_init()
2940 intel_sdvo_connector->output_flag = type; in intel_sdvo_lvds_init()
2950 intel_bios_init_panel_late(display, &intel_connector->panel, NULL, NULL); in intel_sdvo_lvds_init()
2954 * SDVO->LVDS transcoders can't cope with the EDID mode. in intel_sdvo_lvds_init()
2959 mutex_lock(&i915->drm.mode_config.mutex); in intel_sdvo_lvds_init()
2961 intel_ddc_get_modes(connector, connector->ddc); in intel_sdvo_lvds_init()
2964 mutex_unlock(&i915->drm.mode_config.mutex); in intel_sdvo_lvds_init()
3013 struct drm_i915_private *i915 = to_i915(intel_sdvo->base.base.dev); in intel_sdvo_output_setup()
3029 flags = intel_sdvo_filter_output_flags(intel_sdvo->caps.output_flags); in intel_sdvo_output_setup()
3032 drm_dbg_kms(&i915->drm, in intel_sdvo_output_setup()
3034 SDVO_NAME(intel_sdvo), intel_sdvo->caps.output_flags); in intel_sdvo_output_setup()
3048 intel_sdvo->base.pipe_mask = ~0; in intel_sdvo_output_setup()
3055 struct drm_device *dev = intel_sdvo->base.base.dev; in intel_sdvo_output_cleanup()
3059 &dev->mode_config.connector_list, head) { in intel_sdvo_output_cleanup()
3060 if (intel_attached_encoder(to_intel_connector(connector)) == &intel_sdvo->base) { in intel_sdvo_output_cleanup()
3071 struct drm_device *dev = intel_sdvo->base.base.dev; in intel_sdvo_tv_create_property()
3089 intel_sdvo_connector->format_supported_num = 0; in intel_sdvo_tv_create_property()
3092 intel_sdvo_connector->tv_format_supported[intel_sdvo_connector->format_supported_num++] = i; in intel_sdvo_tv_create_property()
3095 intel_sdvo_connector->tv_format = in intel_sdvo_tv_create_property()
3097 "mode", intel_sdvo_connector->format_supported_num); in intel_sdvo_tv_create_property()
3098 if (!intel_sdvo_connector->tv_format) in intel_sdvo_tv_create_property()
3101 for (i = 0; i < intel_sdvo_connector->format_supported_num; i++) in intel_sdvo_tv_create_property()
3102 drm_property_add_enum(intel_sdvo_connector->tv_format, i, in intel_sdvo_tv_create_property()
3103 tv_format_names[intel_sdvo_connector->tv_format_supported[i]]); in intel_sdvo_tv_create_property()
3105 …intel_sdvo_connector->base.base.state->tv.legacy_mode = intel_sdvo_connector->tv_format_supported[… in intel_sdvo_tv_create_property()
3106 drm_object_attach_property(&intel_sdvo_connector->base.base.base, in intel_sdvo_tv_create_property()
3107 intel_sdvo_connector->tv_format, 0); in intel_sdvo_tv_create_property()
3117 intel_sdvo_connector->name = \
3119 if (!intel_sdvo_connector->name) return false; \
3121 drm_object_attach_property(&connector->base, \
3122 intel_sdvo_connector->name, 0); \
3128 #define ENHANCEMENT(state, name, NAME) _ENHANCEMENT((state)->name, name, NAME)
3135 struct drm_i915_private *i915 = to_i915(intel_sdvo->base.base.dev); in intel_sdvo_create_enhance_property_tv()
3136 struct drm_device *dev = intel_sdvo->base.base.dev; in intel_sdvo_create_enhance_property_tv()
3137 struct drm_connector *connector = &intel_sdvo_connector->base.base; in intel_sdvo_create_enhance_property_tv()
3138 struct drm_connector_state *conn_state = connector->state; in intel_sdvo_create_enhance_property_tv()
3155 sdvo_state->tv.overscan_h = response; in intel_sdvo_create_enhance_property_tv()
3157 intel_sdvo_connector->max_hscan = data_value[0]; in intel_sdvo_create_enhance_property_tv()
3158 intel_sdvo_connector->left = in intel_sdvo_create_enhance_property_tv()
3160 if (!intel_sdvo_connector->left) in intel_sdvo_create_enhance_property_tv()
3163 drm_object_attach_property(&connector->base, in intel_sdvo_create_enhance_property_tv()
3164 intel_sdvo_connector->left, 0); in intel_sdvo_create_enhance_property_tv()
3166 intel_sdvo_connector->right = in intel_sdvo_create_enhance_property_tv()
3168 if (!intel_sdvo_connector->right) in intel_sdvo_create_enhance_property_tv()
3171 drm_object_attach_property(&connector->base, in intel_sdvo_create_enhance_property_tv()
3172 intel_sdvo_connector->right, 0); in intel_sdvo_create_enhance_property_tv()
3173 drm_dbg_kms(&i915->drm, "h_overscan: max %d, default %d, current %d\n", in intel_sdvo_create_enhance_property_tv()
3188 sdvo_state->tv.overscan_v = response; in intel_sdvo_create_enhance_property_tv()
3190 intel_sdvo_connector->max_vscan = data_value[0]; in intel_sdvo_create_enhance_property_tv()
3191 intel_sdvo_connector->top = in intel_sdvo_create_enhance_property_tv()
3194 if (!intel_sdvo_connector->top) in intel_sdvo_create_enhance_property_tv()
3197 drm_object_attach_property(&connector->base, in intel_sdvo_create_enhance_property_tv()
3198 intel_sdvo_connector->top, 0); in intel_sdvo_create_enhance_property_tv()
3200 intel_sdvo_connector->bottom = in intel_sdvo_create_enhance_property_tv()
3203 if (!intel_sdvo_connector->bottom) in intel_sdvo_create_enhance_property_tv()
3206 drm_object_attach_property(&connector->base, in intel_sdvo_create_enhance_property_tv()
3207 intel_sdvo_connector->bottom, 0); in intel_sdvo_create_enhance_property_tv()
3208 drm_dbg_kms(&i915->drm, "v_overscan: max %d, default %d, current %d\n", in intel_sdvo_create_enhance_property_tv()
3212 ENHANCEMENT(&sdvo_state->tv, hpos, HPOS); in intel_sdvo_create_enhance_property_tv()
3213 ENHANCEMENT(&sdvo_state->tv, vpos, VPOS); in intel_sdvo_create_enhance_property_tv()
3214 ENHANCEMENT(&conn_state->tv, saturation, SATURATION); in intel_sdvo_create_enhance_property_tv()
3215 ENHANCEMENT(&conn_state->tv, contrast, CONTRAST); in intel_sdvo_create_enhance_property_tv()
3216 ENHANCEMENT(&conn_state->tv, hue, HUE); in intel_sdvo_create_enhance_property_tv()
3217 ENHANCEMENT(&conn_state->tv, brightness, BRIGHTNESS); in intel_sdvo_create_enhance_property_tv()
3218 ENHANCEMENT(&sdvo_state->tv, sharpness, SHARPNESS); in intel_sdvo_create_enhance_property_tv()
3219 ENHANCEMENT(&sdvo_state->tv, flicker_filter, FLICKER_FILTER); in intel_sdvo_create_enhance_property_tv()
3220 ENHANCEMENT(&sdvo_state->tv, flicker_filter_adaptive, FLICKER_FILTER_ADAPTIVE); in intel_sdvo_create_enhance_property_tv()
3221 ENHANCEMENT(&sdvo_state->tv, flicker_filter_2d, FLICKER_FILTER_2D); in intel_sdvo_create_enhance_property_tv()
3222 _ENHANCEMENT(sdvo_state->tv.chroma_filter, tv_chroma_filter, TV_CHROMA_FILTER); in intel_sdvo_create_enhance_property_tv()
3223 _ENHANCEMENT(sdvo_state->tv.luma_filter, tv_luma_filter, TV_LUMA_FILTER); in intel_sdvo_create_enhance_property_tv()
3229 sdvo_state->tv.dot_crawl = response & 0x1; in intel_sdvo_create_enhance_property_tv()
3230 intel_sdvo_connector->dot_crawl = in intel_sdvo_create_enhance_property_tv()
3232 if (!intel_sdvo_connector->dot_crawl) in intel_sdvo_create_enhance_property_tv()
3235 drm_object_attach_property(&connector->base, in intel_sdvo_create_enhance_property_tv()
3236 intel_sdvo_connector->dot_crawl, 0); in intel_sdvo_create_enhance_property_tv()
3237 drm_dbg_kms(&i915->drm, "dot crawl: current %d\n", response); in intel_sdvo_create_enhance_property_tv()
3248 struct drm_device *dev = intel_sdvo->base.base.dev; in intel_sdvo_create_enhance_property_lvds()
3249 struct drm_connector *connector = &intel_sdvo_connector->base.base; in intel_sdvo_create_enhance_property_lvds()
3252 ENHANCEMENT(&connector->state->tv, brightness, BRIGHTNESS); in intel_sdvo_create_enhance_property_lvds()
3262 struct drm_i915_private *i915 = to_i915(intel_sdvo->base.base.dev); in intel_sdvo_create_enhance_property()
3274 drm_dbg_kms(&i915->drm, "No enhancement is supported\n"); in intel_sdvo_create_enhance_property()
3290 struct intel_sdvo_ddc *ddc = adapter->algo_data; in intel_sdvo_ddc_proxy_xfer() local
3291 struct intel_sdvo *sdvo = ddc->sdvo; in intel_sdvo_ddc_proxy_xfer()
3293 if (!__intel_sdvo_set_control_bus_switch(sdvo, 1 << ddc->ddc_bus)) in intel_sdvo_ddc_proxy_xfer()
3294 return -EIO; in intel_sdvo_ddc_proxy_xfer()
3296 return sdvo->i2c->algo->master_xfer(sdvo->i2c, msgs, num); in intel_sdvo_ddc_proxy_xfer()
3301 struct intel_sdvo_ddc *ddc = adapter->algo_data; in intel_sdvo_ddc_proxy_func() local
3302 struct intel_sdvo *sdvo = ddc->sdvo; in intel_sdvo_ddc_proxy_func()
3304 return sdvo->i2c->algo->functionality(sdvo->i2c); in intel_sdvo_ddc_proxy_func()
3315 struct intel_sdvo_ddc *ddc = adapter->algo_data; in proxy_lock_bus() local
3316 struct intel_sdvo *sdvo = ddc->sdvo; in proxy_lock_bus()
3318 sdvo->i2c->lock_ops->lock_bus(sdvo->i2c, flags); in proxy_lock_bus()
3324 struct intel_sdvo_ddc *ddc = adapter->algo_data; in proxy_trylock_bus() local
3325 struct intel_sdvo *sdvo = ddc->sdvo; in proxy_trylock_bus()
3327 return sdvo->i2c->lock_ops->trylock_bus(sdvo->i2c, flags); in proxy_trylock_bus()
3333 struct intel_sdvo_ddc *ddc = adapter->algo_data; in proxy_unlock_bus() local
3334 struct intel_sdvo *sdvo = ddc->sdvo; in proxy_unlock_bus()
3336 sdvo->i2c->lock_ops->unlock_bus(sdvo->i2c, flags); in proxy_unlock_bus()
3346 intel_sdvo_init_ddc_proxy(struct intel_sdvo_ddc *ddc, in intel_sdvo_init_ddc_proxy() argument
3349 struct drm_i915_private *dev_priv = to_i915(sdvo->base.base.dev); in intel_sdvo_init_ddc_proxy()
3350 struct pci_dev *pdev = to_pci_dev(dev_priv->drm.dev); in intel_sdvo_init_ddc_proxy()
3352 ddc->sdvo = sdvo; in intel_sdvo_init_ddc_proxy()
3353 ddc->ddc_bus = ddc_bus; in intel_sdvo_init_ddc_proxy()
3355 ddc->ddc.owner = THIS_MODULE; in intel_sdvo_init_ddc_proxy()
3356 snprintf(ddc->ddc.name, I2C_NAME_SIZE, "SDVO %c DDC%d", in intel_sdvo_init_ddc_proxy()
3357 port_name(sdvo->base.port), ddc_bus); in intel_sdvo_init_ddc_proxy()
3358 ddc->ddc.dev.parent = &pdev->dev; in intel_sdvo_init_ddc_proxy()
3359 ddc->ddc.algo_data = ddc; in intel_sdvo_init_ddc_proxy()
3360 ddc->ddc.algo = &intel_sdvo_ddc_proxy; in intel_sdvo_init_ddc_proxy()
3361 ddc->ddc.lock_ops = &proxy_lock_ops; in intel_sdvo_init_ddc_proxy()
3363 return i2c_add_adapter(&ddc->ddc); in intel_sdvo_init_ddc_proxy()
3377 return !drm_WARN(&dev_priv->drm, !is_sdvo_port_valid(dev_priv, port), in assert_sdvo_port_valid()
3399 intel_encoder = &intel_sdvo->base; in intel_sdvo_init()
3400 intel_encoder->type = INTEL_OUTPUT_SDVO; in intel_sdvo_init()
3401 intel_encoder->power_domain = POWER_DOMAIN_PORT_OTHER; in intel_sdvo_init()
3402 intel_encoder->port = port; in intel_sdvo_init()
3404 drm_encoder_init(&dev_priv->drm, &intel_encoder->base, in intel_sdvo_init()
3408 intel_sdvo->sdvo_reg = sdvo_reg; in intel_sdvo_init()
3409 intel_sdvo->target_addr = intel_sdvo_get_target_addr(intel_sdvo) >> 1; in intel_sdvo_init()
3418 drm_dbg_kms(&dev_priv->drm, in intel_sdvo_init()
3425 intel_encoder->compute_config = intel_sdvo_compute_config; in intel_sdvo_init()
3427 intel_encoder->disable = pch_disable_sdvo; in intel_sdvo_init()
3428 intel_encoder->post_disable = pch_post_disable_sdvo; in intel_sdvo_init()
3430 intel_encoder->disable = intel_disable_sdvo; in intel_sdvo_init()
3432 intel_encoder->pre_enable = intel_sdvo_pre_enable; in intel_sdvo_init()
3433 intel_encoder->enable = intel_enable_sdvo; in intel_sdvo_init()
3434 intel_encoder->audio_enable = intel_sdvo_enable_audio; in intel_sdvo_init()
3435 intel_encoder->audio_disable = intel_sdvo_disable_audio; in intel_sdvo_init()
3436 intel_encoder->get_hw_state = intel_sdvo_get_hw_state; in intel_sdvo_init()
3437 intel_encoder->get_config = intel_sdvo_get_config; in intel_sdvo_init()
3440 if (!intel_sdvo_get_capabilities(intel_sdvo, &intel_sdvo->caps)) in intel_sdvo_init()
3443 intel_sdvo->colorimetry_cap = in intel_sdvo_init()
3446 for (i = 0; i < ARRAY_SIZE(intel_sdvo->ddc); i++) { in intel_sdvo_init()
3449 ret = intel_sdvo_init_ddc_proxy(&intel_sdvo->ddc[i], in intel_sdvo_init()
3456 drm_dbg_kms(&dev_priv->drm, in intel_sdvo_init()
3467 if (intel_sdvo->hotplug_active) { in intel_sdvo_init()
3468 if (intel_sdvo->base.port == PORT_B) in intel_sdvo_init()
3469 intel_encoder->hpd_pin = HPD_SDVO_B; in intel_sdvo_init()
3471 intel_encoder->hpd_pin = HPD_SDVO_C; in intel_sdvo_init()
3482 intel_sdvo->base.cloneable = 0; in intel_sdvo_init()
3489 &intel_sdvo->pixel_clock_min, in intel_sdvo_init()
3490 &intel_sdvo->pixel_clock_max)) in intel_sdvo_init()
3493 drm_dbg_kms(&dev_priv->drm, "%s device VID/DID: %02X:%02X.%02X, " in intel_sdvo_init()
3494 "clock range %dMHz - %dMHz, " in intel_sdvo_init()
3498 intel_sdvo->caps.vendor_id, intel_sdvo->caps.device_id, in intel_sdvo_init()
3499 intel_sdvo->caps.device_rev_id, in intel_sdvo_init()
3500 intel_sdvo->pixel_clock_min / 1000, in intel_sdvo_init()
3501 intel_sdvo->pixel_clock_max / 1000, in intel_sdvo_init()
3502 intel_sdvo->caps.sdvo_num_inputs, in intel_sdvo_init()
3504 intel_sdvo->caps.output_flags & in intel_sdvo_init()
3508 intel_sdvo->caps.output_flags & in intel_sdvo_init()
3517 intel_sdvo_encoder_destroy(&intel_encoder->base); in intel_sdvo_init()