Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp4186462pxk; Tue, 8 Sep 2020 12:59:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwFy4FoZ45qCMxEJhU+Q7Nsx7t5HkYOAzdBS8noRWUS85RwQ5AfKY2f+Z9/mM+wDVSTJVoX X-Received: by 2002:a50:8f85:: with SMTP id y5mr687629edy.233.1599595144224; Tue, 08 Sep 2020 12:59:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599595144; cv=none; d=google.com; s=arc-20160816; b=hLIi4ddaQfw2L7BufOaSP4jAqguNE4eqzCI+fJCro95XpXtdwQtiAroWQ0Z1u6OSFe jxOXgD5lhtfB6Qf/7YEaGhjnmdfe4y6S8zsZTBwBOtxXTFoXL42gcb3ux1O9hzLREuE9 YpKwO4qn30O+rXqE+9Ab3T36wI7FYGM1Zeq4yczeraBqID4O8me2dTTvNwOdJY6WH5AW NKmoIAbfoyCpX+k86jmEJC1VP6wAfaq3LQwI3KlmqWY7xHPkXVO2KtQl+pDunyqec4P1 jKYFiNda7JWaxwTAxJIvEj+LyUSWuA8jV1fRXWFuGI0QWYd2aw82UHprGh2PUIWV+7Os E9LA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=3eEquM5Sgdu2zikjM0rCRe3Cv5DVXMBXU+6Cu0vIH8o=; b=AdC1Oz/yKadFq++maP+0ubyIcaXtLD7Ih2jgUcx/jyyOQh0n8YJhK0TY+J/akouJXR FIjzus87VPu9H+a5sFgFZlFFj2p6LyDDhr6O9Mv4E5n+b1CBpb5qJ/68zGxWnHZ3P3m5 kWESC88HPF2ys+122y6JQJ5bYWg+A+fxJKTlGMvyLiBgKy3opOmJr3TEWXr3FS/HHFOk nVyLbfv2Immq/jPyd1/a7kkCrJv+Wij6Ne9TeHgsCxqkEpQF+QAVK+0U8a291sJsKIw6 HLUiOLp33uhIzGBdvgfsdcyqmVDuKDTrPXx1eRNK59D4HHb0SE2aE6mbfZa/SYRIY68J 3rsg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=FBRtK5kz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 18si97042edv.184.2020.09.08.12.58.41; Tue, 08 Sep 2020 12:59:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=FBRtK5kz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732573AbgIHT6M (ORCPT + 99 others); Tue, 8 Sep 2020 15:58:12 -0400 Received: from mail.kernel.org ([198.145.29.99]:58856 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730516AbgIHPfq (ORCPT ); Tue, 8 Sep 2020 11:35:46 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8283622464; Tue, 8 Sep 2020 15:34:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599579280; bh=VJ0G36w4AwGdWcGN89VVM6vkew7+G4ceTdRs1y5VBhs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FBRtK5kzt3AK0nZUFeTNxDfQep0hgzaJqQ0Np1Xtmsm5pew4fR/FW6+cWfCltkEAh JZb/sb51Lu4meMdT2JaCd9N78IEd1Crzz4mEvhkL2T0wvoo0bQHuhHVR/ZYafKMtWV +dQhxYEFvCE5HWHDqxNnwBJbgRKXEAH1KSfWo/kM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Kalyan Thota , "Kristian H. Kristensen" , Rob Clark , Sasha Levin Subject: [PATCH 5.8 004/186] drm/msm/dpu: Fix scale params in plane validation Date: Tue, 8 Sep 2020 17:22:26 +0200 Message-Id: <20200908152241.865091294@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200908152241.646390211@linuxfoundation.org> References: <20200908152241.646390211@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Kalyan Thota [ Upstream commit 4c978caf08aa155bdeadd9e2d4b026d4ce97ebd0 ] Plane validation uses an API drm_calc_scale which will return src/dst value as a scale ratio. when viewing the range on a scale the values should fall in as Upscale ratio < Unity scale < Downscale ratio for src/dst formula Fix the min and max scale ratios to suit the API accordingly. Signed-off-by: Kalyan Thota Tested-by: Kristian H. Kristensen Reviewed-by: Kristian H. Kristensen Signed-off-by: Rob Clark Signed-off-by: Sasha Levin --- drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c index 3b9c33e694bf4..994d23bad3870 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c @@ -866,9 +866,9 @@ static int dpu_plane_atomic_check(struct drm_plane *plane, crtc_state = drm_atomic_get_new_crtc_state(state->state, state->crtc); - min_scale = FRAC_16_16(1, pdpu->pipe_sblk->maxdwnscale); + min_scale = FRAC_16_16(1, pdpu->pipe_sblk->maxupscale); ret = drm_atomic_helper_check_plane_state(state, crtc_state, min_scale, - pdpu->pipe_sblk->maxupscale << 16, + pdpu->pipe_sblk->maxdwnscale << 16, true, true); if (ret) { DPU_DEBUG_PLANE(pdpu, "Check plane state failed (%d)\n", ret); -- 2.25.1