Lines Matching +full:port +full:- +full:base

3  * Copyright © 2006-2007 Intel Corporation
60 .port = PORT_C,
67 .port = PORT_C,
74 .port = PORT_C,
81 .port = PORT_A,
88 .port = PORT_C,
95 .port = PORT_C,
103 .port = PORT_B,
110 struct intel_encoder base; member
119 return container_of(encoder, struct intel_dvo, base); in enc_to_dvo()
129 struct drm_i915_private *i915 = to_i915(connector->base.dev); in intel_dvo_connector_get_hw_state()
132 enum port port = encoder->port; in intel_dvo_connector_get_hw_state() local
135 tmp = intel_de_read(i915, DVO(port)); in intel_dvo_connector_get_hw_state()
140 return intel_dvo->dev.dev_ops->get_hw_state(&intel_dvo->dev); in intel_dvo_connector_get_hw_state()
146 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in intel_dvo_get_hw_state()
147 enum port port = encoder->port; in intel_dvo_get_hw_state() local
150 tmp = intel_de_read(i915, DVO(port)); in intel_dvo_get_hw_state()
160 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in intel_dvo_get_config()
161 enum port port = encoder->port; in intel_dvo_get_config() local
164 pipe_config->output_types |= BIT(INTEL_OUTPUT_DVO); in intel_dvo_get_config()
166 tmp = intel_de_read(i915, DVO(port)); in intel_dvo_get_config()
176 pipe_config->hw.adjusted_mode.flags |= flags; in intel_dvo_get_config()
178 pipe_config->hw.adjusted_mode.crtc_clock = pipe_config->port_clock; in intel_dvo_get_config()
186 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in intel_disable_dvo()
188 enum port port = encoder->port; in intel_disable_dvo() local
190 intel_dvo->dev.dev_ops->dpms(&intel_dvo->dev, false); in intel_disable_dvo()
192 intel_de_rmw(i915, DVO(port), DVO_ENABLE, 0); in intel_disable_dvo()
193 intel_de_posting_read(i915, DVO(port)); in intel_disable_dvo()
201 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in intel_enable_dvo()
203 enum port port = encoder->port; in intel_enable_dvo() local
205 intel_dvo->dev.dev_ops->mode_set(&intel_dvo->dev, in intel_enable_dvo()
206 &pipe_config->hw.mode, in intel_enable_dvo()
207 &pipe_config->hw.adjusted_mode); in intel_enable_dvo()
209 intel_de_rmw(i915, DVO(port), 0, DVO_ENABLE); in intel_enable_dvo()
210 intel_de_posting_read(i915, DVO(port)); in intel_enable_dvo()
212 intel_dvo->dev.dev_ops->dpms(&intel_dvo->dev, true); in intel_enable_dvo()
220 struct drm_i915_private *i915 = to_i915(connector->base.dev); in intel_dvo_mode_valid()
224 int max_dotclk = to_i915(connector->base.dev)->max_dotclk_freq; in intel_dvo_mode_valid()
225 int target_clock = mode->clock; in intel_dvo_mode_valid()
232 if (mode->flags & DRM_MODE_FLAG_DBLSCAN) in intel_dvo_mode_valid()
244 target_clock = fixed_mode->clock; in intel_dvo_mode_valid()
250 return intel_dvo->dev.dev_ops->mode_valid(&intel_dvo->dev, mode); in intel_dvo_mode_valid()
258 struct intel_connector *connector = to_intel_connector(conn_state->connector); in intel_dvo_compute_config()
259 struct drm_display_mode *adjusted_mode = &pipe_config->hw.adjusted_mode; in intel_dvo_compute_config()
261 intel_panel_fixed_mode(intel_dvo->attached_connector, adjusted_mode); in intel_dvo_compute_config()
277 if (adjusted_mode->flags & DRM_MODE_FLAG_DBLSCAN) in intel_dvo_compute_config()
278 return -EINVAL; in intel_dvo_compute_config()
280 pipe_config->sink_format = INTEL_OUTPUT_FORMAT_RGB; in intel_dvo_compute_config()
281 pipe_config->output_format = INTEL_OUTPUT_FORMAT_RGB; in intel_dvo_compute_config()
291 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in intel_dvo_pre_enable()
292 struct intel_crtc *crtc = to_intel_crtc(pipe_config->uapi.crtc); in intel_dvo_pre_enable()
293 const struct drm_display_mode *adjusted_mode = &pipe_config->hw.adjusted_mode; in intel_dvo_pre_enable()
294 enum port port = encoder->port; in intel_dvo_pre_enable() local
295 enum pipe pipe = crtc->pipe; in intel_dvo_pre_enable()
299 dvo_val = intel_de_read(i915, DVO(port)) & in intel_dvo_pre_enable()
307 if (adjusted_mode->flags & DRM_MODE_FLAG_PHSYNC) in intel_dvo_pre_enable()
309 if (adjusted_mode->flags & DRM_MODE_FLAG_PVSYNC) in intel_dvo_pre_enable()
312 intel_de_write(i915, DVO_SRCDIM(port), in intel_dvo_pre_enable()
313 DVO_SRCDIM_HORIZONTAL(adjusted_mode->crtc_hdisplay) | in intel_dvo_pre_enable()
314 DVO_SRCDIM_VERTICAL(adjusted_mode->crtc_vdisplay)); in intel_dvo_pre_enable()
315 intel_de_write(i915, DVO(port), dvo_val); in intel_dvo_pre_enable()
322 struct drm_i915_private *i915 = to_i915(connector->base.dev); in intel_dvo_detect()
325 drm_dbg_kms(&i915->drm, "[CONNECTOR:%d:%s]\n", in intel_dvo_detect()
326 connector->base.base.id, connector->base.name); in intel_dvo_detect()
331 return intel_dvo->dev.dev_ops->detect(&intel_dvo->dev); in intel_dvo_detect()
337 struct drm_i915_private *i915 = to_i915(connector->base.dev); in intel_dvo_get_modes()
343 * (TV-out, for example), but for now with just TMDS and LVDS, in intel_dvo_get_modes()
346 num_modes = intel_ddc_get_modes(&connector->base, in intel_dvo_get_modes()
373 if (intel_dvo->dev.dev_ops->destroy) in intel_dvo_enc_destroy()
374 intel_dvo->dev.dev_ops->destroy(&intel_dvo->dev); in intel_dvo_enc_destroy()
385 switch (dvo->type) { in intel_dvo_encoder_type()
392 MISSING_CASE(dvo->type); in intel_dvo_encoder_type()
399 switch (dvo->type) { in intel_dvo_connector_type()
406 MISSING_CASE(dvo->type); in intel_dvo_connector_type()
426 if (intel_gmbus_is_valid_pin(dev_priv, dvo->gpio)) in intel_dvo_init_dev()
427 gpio = dvo->gpio; in intel_dvo_init_dev()
428 else if (dvo->type == INTEL_DVO_CHIP_LVDS) in intel_dvo_init_dev()
440 intel_dvo->dev = *dvo; in intel_dvo_init_dev()
457 ret = dvo->dev_ops->init(&intel_dvo->dev, i2c); in intel_dvo_init_dev()
500 intel_dvo->attached_connector = connector; in intel_dvo_init()
502 encoder = &intel_dvo->base; in intel_dvo_init()
504 encoder->disable = intel_disable_dvo; in intel_dvo_init()
505 encoder->enable = intel_enable_dvo; in intel_dvo_init()
506 encoder->get_hw_state = intel_dvo_get_hw_state; in intel_dvo_init()
507 encoder->get_config = intel_dvo_get_config; in intel_dvo_init()
508 encoder->compute_config = intel_dvo_compute_config; in intel_dvo_init()
509 encoder->pre_enable = intel_dvo_pre_enable; in intel_dvo_init()
510 connector->get_hw_state = intel_dvo_connector_get_hw_state; in intel_dvo_init()
518 assert_port_valid(i915, intel_dvo->dev.port); in intel_dvo_init()
520 encoder->type = INTEL_OUTPUT_DVO; in intel_dvo_init()
521 encoder->power_domain = POWER_DOMAIN_PORT_OTHER; in intel_dvo_init()
522 encoder->port = intel_dvo->dev.port; in intel_dvo_init()
523 encoder->pipe_mask = ~0; in intel_dvo_init()
525 if (intel_dvo->dev.type != INTEL_DVO_CHIP_LVDS) in intel_dvo_init()
526 encoder->cloneable = BIT(INTEL_OUTPUT_ANALOG) | in intel_dvo_init()
529 drm_encoder_init(&i915->drm, &encoder->base, in intel_dvo_init()
531 intel_dvo_encoder_type(&intel_dvo->dev), in intel_dvo_init()
532 "DVO %c", port_name(encoder->port)); in intel_dvo_init()
534 drm_dbg_kms(&i915->drm, "[ENCODER:%d:%s] detected %s\n", in intel_dvo_init()
535 encoder->base.base.id, encoder->base.name, in intel_dvo_init()
536 intel_dvo->dev.name); in intel_dvo_init()
538 if (intel_dvo->dev.type == INTEL_DVO_CHIP_TMDS) in intel_dvo_init()
539 connector->polled = DRM_CONNECTOR_POLL_CONNECT | in intel_dvo_init()
542 drm_connector_init(&i915->drm, &connector->base, in intel_dvo_init()
544 intel_dvo_connector_type(&intel_dvo->dev)); in intel_dvo_init()
546 drm_connector_helper_add(&connector->base, in intel_dvo_init()
548 connector->base.display_info.subpixel_order = SubPixelHorizontalRGB; in intel_dvo_init()
552 if (intel_dvo->dev.type == INTEL_DVO_CHIP_LVDS) { in intel_dvo_init()