static bool intel_dsi_compute_config(struct intel_encoder *encoder,
				     struct intel_crtc_config *config)
{
	struct intel_dsi *intel_dsi = container_of(encoder, struct intel_dsi,
						   base);
	struct intel_connector *intel_connector = intel_dsi->attached_connector;
	struct drm_display_mode *fixed_mode = intel_connector->panel.fixed_mode;
	struct drm_display_mode *adjusted_mode = &config->adjusted_mode;
	struct drm_display_mode *mode = &config->requested_mode;
	struct intel_crtc *intel_crtc = encoder->new_crtc;
	struct drm_device *dev = encoder->base.dev;

	DRM_DEBUG_KMS("\n");

	if (fixed_mode)
		intel_fixed_panel_mode(fixed_mode, adjusted_mode);

	if (IS_VALLEYVIEW(dev)) {
		intel_gmch_panel_fitting(intel_crtc, config,
			intel_connector->panel.fitting_mode);
	}

	if (intel_dsi->dev.dev_ops->mode_fixup)
		return intel_dsi->dev.dev_ops->mode_fixup(&intel_dsi->dev,
							  mode, adjusted_mode);

	return true;
}
static bool intel_dsi_compute_config(struct intel_encoder *encoder,
				     struct intel_crtc_config *config)
{
	struct intel_dsi *intel_dsi = container_of(encoder, struct intel_dsi,
						   base);
	struct intel_connector *intel_connector = intel_dsi->attached_connector;
	struct drm_display_mode *fixed_mode = intel_connector->panel.fixed_mode;
	struct drm_display_mode *adjusted_mode = &config->adjusted_mode;
	struct drm_display_mode *mode = &config->requested_mode;
	struct intel_crtc *intel_crtc = encoder->new_crtc;
	struct drm_device *dev = encoder->base.dev;
	struct drm_i915_private *dev_priv = dev->dev_private;

	DRM_DEBUG_KMS("\n");

	if (fixed_mode)
		intel_fixed_panel_mode(fixed_mode, adjusted_mode);

	/* Panel native resolution and desired mode can be different in
	these two cases:
	1. Generic driver specifies scaling reqd flag.
	2. Static driver for Panasonic panel with BYT_CR

	Fixme: Remove static driver's panel ID check as we are planning to
	enable generic driver by default */
	if ((dev_priv->scaling_reqd) ||
		(BYT_CR_CONFIG && (i915_mipi_panel_id ==
		MIPI_DSI_PANASONIC_VXX09F006A00_PANEL_ID)))  {
		intel_connector->panel.fitting_mode = AUTOSCALE;
		DRM_DEBUG_DRIVER("Enabling panel fitter as scaling required flag set\n");
	}

	if (IS_VALLEYVIEW(dev)) {
		intel_gmch_panel_fitting(intel_crtc, config,
			intel_connector->panel.fitting_mode);
	}

	if (intel_dsi->dev.dev_ops->mode_fixup)
		return intel_dsi->dev.dev_ops->mode_fixup(&intel_dsi->dev,
							  mode, adjusted_mode);

	config->dither = config->pipe_bpp == 18 ? 1 : 0;

	return true;

}
示例#3
0
static bool intel_dsi_compute_config(struct intel_encoder *encoder,
				     struct intel_crtc_config *config)
{
	struct intel_dsi *intel_dsi = container_of(encoder, struct intel_dsi,
						   base);
	struct intel_connector *intel_connector = intel_dsi->attached_connector;
	struct drm_display_mode *fixed_mode = intel_connector->panel.fixed_mode;
	struct drm_display_mode *adjusted_mode = &config->adjusted_mode;
	struct drm_display_mode *mode = &config->requested_mode;

	DRM_DEBUG_KMS("\n");

	if (fixed_mode)
		intel_fixed_panel_mode(fixed_mode, adjusted_mode);

	if (intel_dsi->dev.dev_ops->mode_fixup)
		return intel_dsi->dev.dev_ops->mode_fixup(&intel_dsi->dev,
							  mode, adjusted_mode);

	return true;
}