Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0a478c27 authored by Maarten Lankhorst's avatar Maarten Lankhorst
Browse files

drm/i915: Make encoder->compute_config take the connector state



Some places iterate over connector_state to find the right
connector, pass it along as argument.

Signed-off-by: default avatarMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1470755054-32699-7-git-send-email-maarten.lankhorst@linux.intel.com


Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent fd6bbda9
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -261,7 +261,8 @@ intel_crt_mode_valid(struct drm_connector *connector,
}

static bool intel_crt_compute_config(struct intel_encoder *encoder,
				     struct intel_crtc_state *pipe_config)
				     struct intel_crtc_state *pipe_config,
				     struct drm_connector_state *conn_state)
{
	struct drm_device *dev = encoder->base.dev;

+4 −3
Original line number Diff line number Diff line
@@ -2285,7 +2285,8 @@ void intel_ddi_get_config(struct intel_encoder *encoder,
}

static bool intel_ddi_compute_config(struct intel_encoder *encoder,
				     struct intel_crtc_state *pipe_config)
				     struct intel_crtc_state *pipe_config,
				     struct drm_connector_state *conn_state)
{
	struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
	int type = encoder->type;
@@ -2298,9 +2299,9 @@ static bool intel_ddi_compute_config(struct intel_encoder *encoder,
		pipe_config->cpu_transcoder = TRANSCODER_EDP;

	if (type == INTEL_OUTPUT_HDMI)
		ret = intel_hdmi_compute_config(encoder, pipe_config);
		ret = intel_hdmi_compute_config(encoder, pipe_config, conn_state);
	else
		ret = intel_dp_compute_config(encoder, pipe_config);
		ret = intel_dp_compute_config(encoder, pipe_config, conn_state);

	if (IS_BROXTON(dev_priv) && ret)
		pipe_config->lane_lat_optim_mask =
+1 −1
Original line number Diff line number Diff line
@@ -13042,7 +13042,7 @@ intel_modeset_pipe_config(struct drm_crtc *crtc,

		encoder = to_intel_encoder(connector_state->best_encoder);

		if (!(encoder->compute_config(encoder, pipe_config))) {
		if (!(encoder->compute_config(encoder, pipe_config, connector_state))) {
			DRM_DEBUG_KMS("Encoder config failure\n");
			goto fail;
		}
+2 −1
Original line number Diff line number Diff line
@@ -1463,7 +1463,8 @@ void intel_dp_compute_rate(struct intel_dp *intel_dp, int port_clock,

bool
intel_dp_compute_config(struct intel_encoder *encoder,
			struct intel_crtc_state *pipe_config)
			struct intel_crtc_state *pipe_config,
			struct drm_connector_state *conn_state)
{
	struct drm_device *dev = encoder->base.dev;
	struct drm_i915_private *dev_priv = to_i915(dev);
+2 −2
Original line number Diff line number Diff line
@@ -31,7 +31,8 @@
#include <drm/drm_edid.h>

static bool intel_dp_mst_compute_config(struct intel_encoder *encoder,
					struct intel_crtc_state *pipe_config)
					struct intel_crtc_state *pipe_config,
					struct drm_connector_state *conn_state)
{
	struct intel_dp_mst_encoder *intel_mst = enc_to_mst(&encoder->base);
	struct intel_digital_port *intel_dig_port = intel_mst->primary;
@@ -54,7 +55,6 @@ static bool intel_dp_mst_compute_config(struct intel_encoder *encoder,
	 */
	lane_count = drm_dp_max_lane_count(intel_dp->dpcd);


	pipe_config->lane_count = lane_count;

	pipe_config->pipe_bpp = 24;
Loading