Received: by 10.223.185.116 with SMTP id b49csp311867wrg; Thu, 22 Feb 2018 22:24:53 -0800 (PST) X-Google-Smtp-Source: AH8x227/JG7yvFVuRHyNPZ0oa4pTXuIf5dSvmnJWKcI9NUAlJiACptMX6ysZI24um+AziaALDnEb X-Received: by 10.99.121.203 with SMTP id u194mr606659pgc.232.1519367093311; Thu, 22 Feb 2018 22:24:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519367093; cv=none; d=google.com; s=arc-20160816; b=LmzsksyLRNjw+anO8fWvi7oNpwg5bZKsv7dVQRomuESnzMr4z+fw4OmLQF12f2fz+Z aEK9DUgu9dEgvofW/sMtir6sMlcvaUJtjuSo6GYGrLR8uA1cHsg4Z0MyIOCCxhjYmmWJ GHNrpqdUDvgTHuf8v5RP4PuHuxgde0SKRfHGz+/9rGZ8HYXk1nauLSaHWoaOy0VRTo8k DV234y3kyTD2+1xvmnCqHSDMRkqkp90C4CrsxlteGbQrDjp6j0dpZ2SjZog0iedZzdT1 i5EemVRM8hlq5Qk4xmcVLHTjfdW931N/qU4G9PtXWwh73oSkehMB9qdAed+vQkuhFM0c NJsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=36A8aNnKRT68fgnBe6xFiXXJJr9tF7UiW7jozj8Z+sc=; b=hbEY0GhGrYt594nNDX9JDFZBoT8B5iAdWZz9yhQsgQLDqjde7uXdUHA2NtkKuR1nrv owE+b1P2OLKp/MadDLSw6hzjyk4zGnz6N1i6QVgj41LjdkKtiTmFno6QlMEOuxoHlLhQ lPbGtnE8cqfgEw0h6fFrdDZko2Wk191G3GnIHSGnWMxDbiIvUNxcdxbqu2KU5VjeqTtc QIkYqu1jwGiGKWSG855CznQzvnTxDfD85+7bIMONwZK7m53uH9QTHk+MzpC29vg5Aauj Ndpr9yDqHumxR5JfrZGIZsbvRk28AnowAws7v4t08ObhWio/MC3PJqw/CSGFUZvTLdwz t60Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s189si1112488pgb.95.2018.02.22.22.24.25; Thu, 22 Feb 2018 22:24:53 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751413AbeBWGXS (ORCPT + 99 others); Fri, 23 Feb 2018 01:23:18 -0500 Received: from regular1.263xmail.com ([211.150.99.135]:57087 "EHLO regular1.263xmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751350AbeBWGXR (ORCPT ); Fri, 23 Feb 2018 01:23:17 -0500 Received: from jeffy.chen?rock-chips.com (unknown [192.168.167.110]) by regular1.263xmail.com (Postfix) with ESMTP id 198FD1DE30; Fri, 23 Feb 2018 14:22:59 +0800 (CST) X-263anti-spam: KSV:0; X-MAIL-GRAY: 0 X-MAIL-DELIVERY: 1 X-KSVirus-check: 0 X-ABS-CHECKED: 4 Received: from localhost (localhost [127.0.0.1]) by smtp.263.net (Postfix) with ESMTPA id 619A8308; Fri, 23 Feb 2018 14:22:54 +0800 (CST) X-RL-SENDER: jeffy.chen@rock-chips.com X-FST-TO: linux-kernel@vger.kernel.org X-SENDER-IP: 103.29.142.67 X-LOGIN-NAME: jeffy.chen@rock-chips.com X-UNIQUE-TAG: X-ATTACHMENT-NUM: 0 X-SENDER: cjf@rock-chips.com X-DNS-TYPE: 0 Received: from localhost (unknown [103.29.142.67]) by smtp.263.net (Postfix) whith ESMTP id 205914568EK; Fri, 23 Feb 2018 14:22:58 +0800 (CST) From: Jeffy Chen To: linux-kernel@vger.kernel.org Cc: seanpaul@chromium.org, dcastagna@google.com, hoegsberg@google.com, heiko@sntech.de, tfiga@chromium.org, Jeffy Chen , Sandy Huang , dri-devel@lists.freedesktop.org, linux-rockchip@lists.infradead.org, David Airlie , linux-arm-kernel@lists.infradead.org Subject: [PATCH] drm/rockchip: vop: Init vskiplines in scl_vop_cal_scale() Date: Fri, 23 Feb 2018 14:22:50 +0800 Message-Id: <20180223062250.10470-1-jeffy.chen@rock-chips.com> X-Mailer: git-send-email 2.11.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Currently we are calling scl_vop_cal_scale() to get vskiplines for yrgb and cbcr. So the cbcr's vskiplines might be an unexpected value if the second scl_vop_cal_scale() didn't update it. Init vskiplines in scl_vop_cal_scale() to avoid that. Signed-off-by: Jeffy Chen --- drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c index 7715853ef90a..9b03c51903ab 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c @@ -259,6 +259,9 @@ static uint16_t scl_vop_cal_scale(enum scale_mode mode, uint32_t src, { uint16_t val = 1 << SCL_FT_DEFAULT_FIXPOINT_SHIFT; + if (vskiplines) + *vskiplines = 0; + if (is_horizontal) { if (mode == SCALE_UP) val = GET_SCL_FT_BIC(src, dst); @@ -299,7 +302,7 @@ static void scl_vop_cal_scl_fac(struct vop *vop, const struct vop_win_data *win, uint16_t vsu_mode; uint16_t lb_mode; uint32_t val; - int vskiplines = 0; + int vskiplines; if (dst_w > 3840) { DRM_DEV_ERROR(vop->dev, "Maximum dst width (3840) exceeded\n"); -- 2.11.0