Received: by 10.223.185.116 with SMTP id b49csp743512wrg; Fri, 23 Feb 2018 06:10:39 -0800 (PST) X-Google-Smtp-Source: AH8x22527azvQkBHRNWaXVJ95UWmN872G3MMC+PZkvjSuqDsJqEiblrsoW7HYIgdTVK0NlR3Zcpv X-Received: by 10.101.85.67 with SMTP id t3mr1581969pgr.310.1519395038952; Fri, 23 Feb 2018 06:10:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519395038; cv=none; d=google.com; s=arc-20160816; b=0DuVcpu+C8p9HJdpek5+r4oDNlODkdhTPuZsJbWLQnaCGMb7CQc0NHWrpSL++rEZvZ iPNmi5qJQVWpKN5QYpOz5ojg2fRDjRNQFR8VqIHRj5kTDYsjsqr0OsaSLkkFaEXM3hs5 ump36walgWRYOtDTPIoTPVrvlM4Yhq3YHJuIkkSNsfeleJ2nDjFaKXZhoGCCBzz7f2Pg kJ/JrLO/LHQ3hZzWUWuN4huY1uAP5UM+OnE48fTYVVb4x93tACHd7YD99IuDXqCy08ky Ys4h9TZ/eGyJAC+ip/idYpd+OgJE/2GLHZ+gV5k60q7m+3/aSslY7PK1rTL7Pr+pOEl6 01OA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=KGOVHQHGS35Up6nfv53wssMJKsJKKIM0uZlIduTzXfQ=; b=oZWkKVxukC0py0JBgbqjnBtr3Hb1rtRWts6HvD9RGyHThJsbjb0ePZBjN+TWU7E2ZE IxSxcQmyEgPVvtzCLTFpQXD6YuShDH/64jK1FqqdSvZGKrcI3QXC3WRx28TlOl7W60Cj 3ouutkuO9U3lMnvcB7EJzPzGoqJOA8PSUxlwtYEBp4EOB+9GqSXTfrNKFvnRbieTEHn+ S5oyIhjDzSRML6OjvX6mdufbeWFj9EYrVon1oHYikcOtQodfJ8jcHBptpGc5Del1Fuok kcOlR5YfCrlaspbQFAMo5yYh4IkE/HqO2WfAOUdzsiS4XLkhHKi/ZCgCvPCIkkR5H23D A6SA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=TYEfgPaf; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y40-v6si1811293pla.769.2018.02.23.06.10.23; Fri, 23 Feb 2018 06:10:38 -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; dkim=pass header.i=@chromium.org header.s=google header.b=TYEfgPaf; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751406AbeBWOJm (ORCPT + 99 others); Fri, 23 Feb 2018 09:09:42 -0500 Received: from mail-yw0-f193.google.com ([209.85.161.193]:47062 "EHLO mail-yw0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750827AbeBWOJk (ORCPT ); Fri, 23 Feb 2018 09:09:40 -0500 Received: by mail-yw0-f193.google.com with SMTP id q69so2804893ywh.13 for ; Fri, 23 Feb 2018 06:09:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=KGOVHQHGS35Up6nfv53wssMJKsJKKIM0uZlIduTzXfQ=; b=TYEfgPafcHJRbfuHconYBqBRzvnJp+rscB/53aCU/50jHHBO2P2JXkI9cCrXRGTEMI 4VCmpOybOBB1k1TSqJxTCoGw3EUF8cwqS/FpDAFPg8WYhCH2Lm/jFgjqCD5zMpEIzUYS pEZrtT23ATTpidoGWAZ61HBbzW7oE9bV4IUWU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=KGOVHQHGS35Up6nfv53wssMJKsJKKIM0uZlIduTzXfQ=; b=Q/tDHkt9oc0hlab2G6GUCp00cmLIxwZgsEG0apYCyhaixafLB1OY/r1EeokRzNVmAS tgLkO2TaBa/rcIKWgqKoa/h2xKEnl5PSJS3/KHL+WHa92DbAbDep1rkx3PRdI49HrADE +2Aob+gmmwxGm6egzZzi/96KtOACEdr5nSu0hcOpS5ZK95H6Il4swUFD/XiKY4BNhE8u HoxnmbumwWyGf1rEtjPrKeQGfu0Sb+7OjLXqHDYZVFUjB6ocWbOkmS/j3z1MjwqDFQGB Euls3sfXZiO5AnvGwa2191yfF/rlwSYlUQzYqVvlAeTsLQfg3QYP40vWg08w5amPA1MZ SgBQ== X-Gm-Message-State: APf1xPDUfWy52Fo9HXR01bcqfw9idBOf5C9PYLjZmLDKJNvzP0UO1V0r C5PUOv4uTKsoJ5ohqK0WEn14sw== X-Received: by 10.129.103.135 with SMTP id b129mr1059687ywc.350.1519394980233; Fri, 23 Feb 2018 06:09:40 -0800 (PST) Received: from localhost ([2620:0:1013:11:d3af:69ac:1964:28e8]) by smtp.gmail.com with ESMTPSA id b123sm947599ywf.84.2018.02.23.06.09.39 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 23 Feb 2018 06:09:39 -0800 (PST) Date: Fri, 23 Feb 2018 09:09:39 -0500 From: Sean Paul To: Jeffy Chen Cc: linux-kernel@vger.kernel.org, seanpaul@chromium.org, dcastagna@google.com, hoegsberg@google.com, heiko@sntech.de, tfiga@chromium.org, Sandy Huang , dri-devel@lists.freedesktop.org, linux-rockchip@lists.infradead.org, David Airlie , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH] drm/rockchip: vop: Init vskiplines in scl_vop_cal_scale() Message-ID: <20180223140939.GI223881@art_vandelay> References: <20180223062250.10470-1-jeffy.chen@rock-chips.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180223062250.10470-1-jeffy.chen@rock-chips.com> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 23, 2018 at 02:22:50PM +0800, Jeffy Chen wrote: > 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 Reviewed-by: Sean Paul > --- > > 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 > > -- Sean Paul, Software Engineer, Google / Chromium OS