From patchwork Tue Aug 30 05:01:00 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nabendu Maiti X-Patchwork-Id: 9304825 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8C03A607F0 for ; Tue, 30 Aug 2016 04:49:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7794528AB5 for ; Tue, 30 Aug 2016 04:49:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6C53C28AC0; Tue, 30 Aug 2016 04:49:20 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 2122028AB5 for ; Tue, 30 Aug 2016 04:49:20 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5CC2D6E5D9; Tue, 30 Aug 2016 04:49:19 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6D7E36E5A4 for ; Tue, 30 Aug 2016 04:49:17 +0000 (UTC) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga102.fm.intel.com with ESMTP; 29 Aug 2016 21:49:17 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos; i="5.30,254,1470726000"; d="scan'208"; a="1043215702" Received: from dispdev.iind.intel.com ([10.223.25.80]) by orsmga002.jf.intel.com with ESMTP; 29 Aug 2016 21:49:16 -0700 From: Nabendu Maiti To: intel-gfx@lists.freedesktop.org Date: Tue, 30 Aug 2016 10:31:00 +0530 Message-Id: <1472533261-30306-7-git-send-email-nabendu.bikash.maiti@intel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1472533261-30306-1-git-send-email-nabendu.bikash.maiti@intel.com> References: <1472533261-30306-1-git-send-email-nabendu.bikash.maiti@intel.com> Subject: [Intel-gfx] [PATCH 6/7] drm/i915: Update pipe-scaler according to destination size X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP Pipe scaler is scaler registers are updated according to provided destination size from user. Signed-off-by: Nabendu Maiti --- 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;