[Intel-gfx] [PATCH 6/7] drm/i915: Update pipe-scaler according to destination size

Nabendu Maiti nabendu.bikash.maiti at intel.com
Tue Aug 30 05:01:00 UTC 2016


Pipe scaler is scaler registers are updated according to provided
destination size from user.

Signed-off-by: Nabendu Maiti <nabendu.bikash.maiti at intel.com>
---
 drivers/gpu/drm/i915/intel_display.c | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 9c7434f..15d185e 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -4710,7 +4710,6 @@ skl_update_scaler(struct intel_crtc_state *crtc_state, bool force_detach,
 int skl_update_scaler_crtc(struct intel_crtc_state *state)
 {
 	struct intel_crtc *intel_crtc = to_intel_crtc(state->base.crtc);
-	const struct drm_display_mode *adjusted_mode = &state->base.adjusted_mode;
 
 	DRM_DEBUG_KMS("Updating scaler for [CRTC:%d:%s] scaler_user index %u.%u\n",
 		      intel_crtc->base.base.id, intel_crtc->base.name,
@@ -4719,7 +4718,7 @@ int skl_update_scaler_crtc(struct intel_crtc_state *state)
 	return skl_update_scaler(state, !state->base.active, SKL_CRTC_INDEX,
 		&state->scaler_state.scaler_id, DRM_ROTATE_0,
 		state->pipe_src_w, state->pipe_src_h,
-		adjusted_mode->crtc_hdisplay, adjusted_mode->crtc_vdisplay);
+		state->pipe_dst_w, state->pipe_dst_h);
 }
 
 /**
@@ -12609,6 +12608,7 @@ static int skylake_pfiter_calculate(struct drm_crtc *crtc,
 				intel_pch_panel_fitting(intel_crtc,
 							pipe_config,
 					pipe_config->pipe_scaling_mode);
+			}
 				pipe_config->pipe_dst_x =
 					(pipe_config->pch_pfit.pos >> 16);
 				pipe_config->pipe_dst_y =
@@ -12617,7 +12617,6 @@ static int skylake_pfiter_calculate(struct drm_crtc *crtc,
 					(pipe_config->pch_pfit.size >> 16);
 				pipe_config->pipe_dst_h =
 					(pipe_config->pch_pfit.size & 0xffff);
-			}
 		}
 	}
 	return ret;
@@ -13096,7 +13095,10 @@ intel_modeset_pipe_config(struct drm_crtc *crtc,
 
 	pipe_config->pipe_dst_w = pipe_config->pipe_src_w;
 	pipe_config->pipe_dst_h = pipe_config->pipe_src_h;
-
+	pipe_config->base.dst_w = pipe_config->pipe_src_w;
+	pipe_config->base.dst_h = pipe_config->pipe_src_h;
+	pipe_config->base.src_w = pipe_config->pipe_src_w;
+	pipe_config->base.src_h = pipe_config->pipe_src_h;
 
 encoder_retry:
 	/* Ensure the port clock defaults are reset when retrying. */
@@ -13106,7 +13108,6 @@ encoder_retry:
 	/* Fill in default crtc timings, allow encoders to overwrite them. */
 	drm_mode_set_crtcinfo(&pipe_config->base.adjusted_mode,
 			      CRTC_STEREO_DOUBLE);
-
 	/* Pass our mode to the connectors and the CRTC to give them a chance to
 	 * adjust it according to limitations or connector properties, and also
 	 * a chance to reject the mode entirely.
@@ -14081,8 +14082,8 @@ static int intel_atomic_check(struct drm_device *dev,
 
 				crtc_state->src_w = adjusted_mode->hdisplay;
 				crtc_state->src_h = adjusted_mode->vdisplay;
-				crtc_state->dst_w = adjusted_mode->hdisplay;
-				crtc_state->dst_h = adjusted_mode->vdisplay;
+				crtc_state->dst_w = crtc_state->src_w;
+				crtc_state->dst_h = crtc_state->src_h;
 				crtc_state->dst_x =  0;
 				crtc_state->dst_y =  0;
 				crtc_state->fitting_mode = 0;
-- 
1.9.1



More information about the Intel-gfx mailing list