Lines Matching +full:bit +full:- +full:banging

3  * Copyright © 2006-2007 Intel Corporation
136 struct drm_device *dev = connector->base.dev; in intel_dvo_connector_get_hw_state()
141 tmp = intel_de_read(dev_priv, intel_dvo->dev.dvo_reg); in intel_dvo_connector_get_hw_state()
146 return intel_dvo->dev.dev_ops->get_hw_state(&intel_dvo->dev); in intel_dvo_connector_get_hw_state()
152 struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); in intel_dvo_get_hw_state()
156 tmp = intel_de_read(dev_priv, intel_dvo->dev.dvo_reg); in intel_dvo_get_hw_state()
166 struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); in intel_dvo_get_config()
170 pipe_config->output_types |= BIT(INTEL_OUTPUT_DVO); in intel_dvo_get_config()
172 tmp = intel_de_read(dev_priv, intel_dvo->dev.dvo_reg); in intel_dvo_get_config()
182 pipe_config->hw.adjusted_mode.flags |= flags; in intel_dvo_get_config()
184 pipe_config->hw.adjusted_mode.crtc_clock = pipe_config->port_clock; in intel_dvo_get_config()
192 struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); in intel_disable_dvo()
194 i915_reg_t dvo_reg = intel_dvo->dev.dvo_reg; in intel_disable_dvo()
197 intel_dvo->dev.dev_ops->dpms(&intel_dvo->dev, false); in intel_disable_dvo()
207 struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); in intel_enable_dvo()
209 i915_reg_t dvo_reg = intel_dvo->dev.dvo_reg; in intel_enable_dvo()
212 intel_dvo->dev.dev_ops->mode_set(&intel_dvo->dev, in intel_enable_dvo()
213 &pipe_config->hw.mode, in intel_enable_dvo()
214 &pipe_config->hw.adjusted_mode); in intel_enable_dvo()
219 intel_dvo->dev.dev_ops->dpms(&intel_dvo->dev, true); in intel_enable_dvo()
230 int max_dotclk = to_i915(connector->dev)->max_dotclk_freq; in intel_dvo_mode_valid()
231 int target_clock = mode->clock; in intel_dvo_mode_valid()
233 if (mode->flags & DRM_MODE_FLAG_DBLSCAN) in intel_dvo_mode_valid()
245 target_clock = fixed_mode->clock; in intel_dvo_mode_valid()
251 return intel_dvo->dev.dev_ops->mode_valid(&intel_dvo->dev, mode); in intel_dvo_mode_valid()
259 struct intel_connector *connector = to_intel_connector(conn_state->connector); in intel_dvo_compute_config()
260 struct drm_display_mode *adjusted_mode = &pipe_config->hw.adjusted_mode; in intel_dvo_compute_config()
262 intel_panel_fixed_mode(intel_dvo->attached_connector, adjusted_mode); in intel_dvo_compute_config()
278 if (adjusted_mode->flags & DRM_MODE_FLAG_DBLSCAN) in intel_dvo_compute_config()
279 return -EINVAL; in intel_dvo_compute_config()
281 pipe_config->output_format = INTEL_OUTPUT_FORMAT_RGB; in intel_dvo_compute_config()
291 struct drm_i915_private *dev_priv = 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()
295 enum pipe pipe = crtc->pipe; in intel_dvo_pre_enable()
297 i915_reg_t dvo_reg = intel_dvo->dev.dvo_reg; in intel_dvo_pre_enable()
298 i915_reg_t dvo_srcdim_reg = intel_dvo->dev.dvo_srcdim_reg; in intel_dvo_pre_enable()
308 if (adjusted_mode->flags & DRM_MODE_FLAG_PHSYNC) in intel_dvo_pre_enable()
310 if (adjusted_mode->flags & DRM_MODE_FLAG_PVSYNC) in intel_dvo_pre_enable()
314 …(adjusted_mode->crtc_hdisplay << DVO_SRCDIM_HORIZONTAL_SHIFT) | (adjusted_mode->crtc_vdisplay << D… in intel_dvo_pre_enable()
321 struct drm_i915_private *i915 = to_i915(connector->dev); in intel_dvo_detect()
325 connector->base.id, connector->name); in intel_dvo_detect()
330 return intel_dvo->dev.dev_ops->detect(&intel_dvo->dev); in intel_dvo_detect()
335 struct drm_i915_private *dev_priv = to_i915(connector->dev); in intel_dvo_get_modes()
341 * (TV-out, for example), but for now with just TMDS and LVDS, in intel_dvo_get_modes()
371 if (intel_dvo->dev.dev_ops->destroy) in intel_dvo_enc_destroy()
372 intel_dvo->dev.dev_ops->destroy(&intel_dvo->dev); in intel_dvo_enc_destroy()
409 intel_dvo->attached_connector = intel_connector; in intel_dvo_init()
411 intel_encoder = &intel_dvo->base; in intel_dvo_init()
413 intel_encoder->disable = intel_disable_dvo; in intel_dvo_init()
414 intel_encoder->enable = intel_enable_dvo; in intel_dvo_init()
415 intel_encoder->get_hw_state = intel_dvo_get_hw_state; in intel_dvo_init()
416 intel_encoder->get_config = intel_dvo_get_config; in intel_dvo_init()
417 intel_encoder->compute_config = intel_dvo_compute_config; in intel_dvo_init()
418 intel_encoder->pre_enable = intel_dvo_pre_enable; in intel_dvo_init()
419 intel_connector->get_hw_state = intel_dvo_connector_get_hw_state; in intel_dvo_init()
423 struct drm_connector *connector = &intel_connector->base; in intel_dvo_init()
437 if (intel_gmbus_is_valid_pin(dev_priv, dvo->gpio)) in intel_dvo_init()
438 gpio = dvo->gpio; in intel_dvo_init()
439 else if (dvo->type == INTEL_DVO_CHIP_LVDS) in intel_dvo_init()
451 intel_dvo->dev = *dvo; in intel_dvo_init()
455 * transmitter detection run in bit banging mode for now. in intel_dvo_init()
471 dvoinit = dvo->dev_ops->init(&intel_dvo->dev, i2c); in intel_dvo_init()
483 port = intel_dvo_port(dvo->dvo_reg); in intel_dvo_init()
484 drm_encoder_init(&dev_priv->drm, &intel_encoder->base, in intel_dvo_init()
488 intel_encoder->type = INTEL_OUTPUT_DVO; in intel_dvo_init()
489 intel_encoder->power_domain = POWER_DOMAIN_PORT_OTHER; in intel_dvo_init()
490 intel_encoder->port = port; in intel_dvo_init()
491 intel_encoder->pipe_mask = ~0; in intel_dvo_init()
493 if (dvo->type != INTEL_DVO_CHIP_LVDS) in intel_dvo_init()
494 intel_encoder->cloneable = (1 << INTEL_OUTPUT_ANALOG) | in intel_dvo_init()
497 switch (dvo->type) { in intel_dvo_init()
499 intel_connector->polled = DRM_CONNECTOR_POLL_CONNECT | in intel_dvo_init()
501 drm_connector_init(&dev_priv->drm, connector, in intel_dvo_init()
508 drm_connector_init(&dev_priv->drm, connector, in intel_dvo_init()
517 connector->display_info.subpixel_order = SubPixelHorizontalRGB; in intel_dvo_init()
518 connector->interlace_allowed = false; in intel_dvo_init()
519 connector->doublescan_allowed = false; in intel_dvo_init()
522 if (dvo->type == INTEL_DVO_CHIP_LVDS) { in intel_dvo_init()
536 intel_dvo->panel_wants_dither = true; in intel_dvo_init()