Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3546457pxj; Mon, 24 May 2021 09:05:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw1DCUv64JtvYOk24chUntI3wVtm1LelDk2P4qoP7Uoi0Bcv5xpsZhLGxdcVlj+1u0ytw5M X-Received: by 2002:a17:906:22c6:: with SMTP id q6mr24078854eja.275.1621872354129; Mon, 24 May 2021 09:05:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621872354; cv=none; d=google.com; s=arc-20160816; b=hLRAV2Il19jXYQvZIVNhlLFyKbyxaNamxCOmOCF8wrh8oBFsuxIHX7LigoXQ5ZyWdj U8z1jRuDa5n7kKuAuoYzTf0/dj9rCw7pfG8boTKvVjQawtovv6JKwN/+JebG8yCYi58C Q4LrnPaCSP4Ezj1eAK6GB0NWj4T2HM+Dc2/LoRkUAgbiJir5wRhQdD1pS+rPW07fAwen g3FvEusVnXLoekG890lO9RDt3ws0tgGWwCdCMkH+kZJ+EsqKgL56yQaw5kRn4f2slL2W fOfUvqpKH9tbQAVX662E1v/PH8YS1/+jg0o5G01DwAHRQ37+ZT8uRr5VYIfmfP0g/48h h0tg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=0bx0lOX1prd62aqggzEKbkU/RB4JwlKC+pc1YSy/uI4=; b=j3uYBm5uOSkoLTqtaGJ93nuCM8ftnG5X/y9rpAfu1Pwj8Oie667+bIGcZkfwo7P1uK n1PbkVE9nLXnYT6oxSaGeu3yiwHxvExZbP0gXMVn/pbfg1ZbFlyU5eDR0YQk1Rh9d2Km PpX43LOHXxMKcjAg5smocJ0HQk7u7sI6XEGK052UkwZVDti+ltBp54r35lJdUg1gvYgh x5GT8t7HMuq/YrlM3l84vsF1AHpGGi8lS8B4v4iYlOiE+u+lxbY35ynRX1WG8C1P0PYm FdSE9K3csye5oaN2CCsTwI81uD7vZqFqDGKACuOB4+Epe6vKdn0tuC7Qqn5mme5JjlSS zoYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=zy2yxtUh; 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=pass (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 z7si12184329edq.422.2021.05.24.09.05.25; Mon, 24 May 2021 09:05:54 -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=@linuxfoundation.org header.s=korg header.b=zy2yxtUh; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237776AbhEXQFi (ORCPT + 99 others); Mon, 24 May 2021 12:05:38 -0400 Received: from mail.kernel.org ([198.145.29.99]:40464 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235777AbhEXP7K (ORCPT ); Mon, 24 May 2021 11:59:10 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6F7E161976; Mon, 24 May 2021 15:45:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621871102; bh=wQ3cUDzajtzAgRCgFmhBdmz2T03T9h32BJQe1ALwaCM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=zy2yxtUhxiI1PTThnNo27YQiZlpSuC7wwOz2IRstJnBw6iH2J3hRmp0uqRAFJbnOo UUuBgaoaFOrVYulQA+7RCqzooJyu8ndIoKnTT/LVUA8kZYEGYpGutDr5k1aYnunB3F e4eKk4NdmR4wo5EgpEemvUwj5Lz2A9ErhmXcXLb8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Nikola Cornij , Charlene Liu , Harry Wentland , Stylon Wang , Daniel Wheeler , Alex Deucher Subject: [PATCH 5.12 075/127] drm/amd/display: Use the correct max downscaling value for DCN3.x family Date: Mon, 24 May 2021 17:26:32 +0200 Message-Id: <20210524152337.392160817@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210524152334.857620285@linuxfoundation.org> References: <20210524152334.857620285@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Nikola Cornij commit 84c63d040938f64a7dc195696301166e75231bf5 upstream. [why] As per spec, DCN3.x can do 6:1 downscaling and DCN2.x can do 4:1. The max downscaling limit value for DCN2.x is 250, which means it's calculated as 1000 / 4 = 250. For DCN3.x this then gives 1000 / 6 = 167. [how] Set maximum downscaling limit to 167 for DCN3.x Signed-off-by: Nikola Cornij Reviewed-by: Charlene Liu Reviewed-by: Harry Wentland Acked-by: Stylon Wang Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/amd/display/dc/dcn30/dcn30_resource.c | 7 ++++--- drivers/gpu/drm/amd/display/dc/dcn301/dcn301_resource.c | 7 ++++--- drivers/gpu/drm/amd/display/dc/dcn302/dcn302_resource.c | 7 ++++--- 3 files changed, 12 insertions(+), 9 deletions(-) --- a/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_resource.c +++ b/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_resource.c @@ -826,10 +826,11 @@ static const struct dc_plane_cap plane_c .fp16 = 16000 }, + /* 6:1 downscaling ratio: 1000/6 = 166.666 */ .max_downscale_factor = { - .argb8888 = 600, - .nv12 = 600, - .fp16 = 600 + .argb8888 = 167, + .nv12 = 167, + .fp16 = 167 } }; --- a/drivers/gpu/drm/amd/display/dc/dcn301/dcn301_resource.c +++ b/drivers/gpu/drm/amd/display/dc/dcn301/dcn301_resource.c @@ -843,10 +843,11 @@ static const struct dc_plane_cap plane_c .fp16 = 16000 }, + /* 6:1 downscaling ratio: 1000/6 = 166.666 */ .max_downscale_factor = { - .argb8888 = 600, - .nv12 = 600, - .fp16 = 600 + .argb8888 = 167, + .nv12 = 167, + .fp16 = 167 }, 64, 64 --- a/drivers/gpu/drm/amd/display/dc/dcn302/dcn302_resource.c +++ b/drivers/gpu/drm/amd/display/dc/dcn302/dcn302_resource.c @@ -282,10 +282,11 @@ static const struct dc_plane_cap plane_c .nv12 = 16000, .fp16 = 16000 }, + /* 6:1 downscaling ratio: 1000/6 = 166.666 */ .max_downscale_factor = { - .argb8888 = 600, - .nv12 = 600, - .fp16 = 600 + .argb8888 = 167, + .nv12 = 167, + .fp16 = 167 }, 16, 16