Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp651286pxv; Thu, 15 Jul 2021 12:30:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx1DD4+wtCeLF8WwwEO14yHAxIrEmlMz3knfNZJ0KZgfVQ781VSPoxhPM5aJ3lxDwEHdIP/ X-Received: by 2002:a17:906:33d0:: with SMTP id w16mr7224309eja.376.1626377399995; Thu, 15 Jul 2021 12:29:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626377399; cv=none; d=google.com; s=arc-20160816; b=Ni4nXYLWAGlRwZ68yC3MUl5zf6EiEV3TvbKEOrpxxQZTEEsFHgiY19Wsx3hgeNMPkb milPIWMtESpJNMLGrunkpFSN4A80c1Ze4MNkrXVkotqd9lYCIA9SUDGkmtIAJ6wbOrl2 8SnjhyPBLdTDKwITgvAh76P3Dm9RI+oOdbnt1JWjCZLWibvpJ1RXMRzFO38umUqndp/u g6lds04Q0ESBu4VTgE8tWEuxlQa/Xfbf+alYY8zI/5s65ClD4gvWMg3b6yZ4P+dgdSOz MlfEsZW6SDj2lMJr4vWpFjMBQY0CD1saWhsHeDP97t7kjLjliHNPik3cz5NOpEZk0Kqn K6rw== 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=tNIbS5DcCzfLK0oD3Z0kVWJ+AGT/pMUn5axI6gdI2kE=; b=CTnjwV+RROoOIvwOY2ieQBAP3+0Pu16R9wEdoO+ChVzWBoJYJ8bn7DOjoQZ5Mj6rsi uq8UkpHLu5bPgVSYC+qW+JoeGzH4Ky74EN/BW3ySSr1Sfvx3WE6bFpySJUSK7l9Dp+Y0 /24Xv4XmqoNprCkBcU7vuxz2FAfPrvSSrs2ufgr/+duzzIOAgshXgAbO3ZDC22y2t6cS NndhhcwGHhyKDDD1aosBUvxs9GV5+vVz0wgyKW935FrIvmKsk9tI6Si4h/g+oocDLzgd 6yWrMZbEqsgt8rD9g9imSyC8UGQa4NqAOx7ZK0Ega3pU1pEzLc978zclZzxkg112QRHC dq3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=O5dGDQ36; 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 a21si8404541edy.79.2021.07.15.12.29.37; Thu, 15 Jul 2021 12:29:59 -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=O5dGDQ36; 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 S1343839AbhGOTYw (ORCPT + 99 others); Thu, 15 Jul 2021 15:24:52 -0400 Received: from mail.kernel.org ([198.145.29.99]:46430 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242458AbhGOTHy (ORCPT ); Thu, 15 Jul 2021 15:07:54 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id DDE65613D8; Thu, 15 Jul 2021 19:03:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626375834; bh=0TEEtHfReXo4F18sk6Sba1Yo0FUOojEbgub7tLSmUa8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=O5dGDQ36b2cz5I9iewaORD4o1rVG+YnUeebcgDMO+DroYJO0TI99ap5C66SbiHkWg 6qEiJmdx3af4nQf7J5XfYXYCumgm4Re7LqEq6oQ20Wtj/Vo2r6hd7HU3Cdw+0Gdmgv CxzN3ghzDw1xGFOpnQPd4KM1qkDcF3Ax1iczKrq8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dmytro Laktyushkin , Aric Cyr , Stylon Wang , Daniel Wheeler , Alex Deucher , Sasha Levin Subject: [PATCH 5.13 014/266] drm/amd/display: fix use_max_lb flag for 420 pixel formats Date: Thu, 15 Jul 2021 20:36:09 +0200 Message-Id: <20210715182616.372200439@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210715182613.933608881@linuxfoundation.org> References: <20210715182613.933608881@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: Dmytro Laktyushkin [ Upstream commit 8809a7a4afe90ad9ffb42f72154d27e7c47551ae ] Right now the flag simply selects memory config 0 when flag is true however 420 modes benefit more from memory config 3. Signed-off-by: Dmytro Laktyushkin Reviewed-by: Aric Cyr Acked-by: Stylon Wang Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp_dscl.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp_dscl.c b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp_dscl.c index efa86d5c6847..98ab4b776924 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp_dscl.c +++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp_dscl.c @@ -496,10 +496,13 @@ static enum lb_memory_config dpp1_dscl_find_lb_memory_config(struct dcn10_dpp *d int vtaps_c = scl_data->taps.v_taps_c; int ceil_vratio = dc_fixpt_ceil(scl_data->ratios.vert); int ceil_vratio_c = dc_fixpt_ceil(scl_data->ratios.vert_c); - enum lb_memory_config mem_cfg = LB_MEMORY_CONFIG_0; - if (dpp->base.ctx->dc->debug.use_max_lb) - return mem_cfg; + if (dpp->base.ctx->dc->debug.use_max_lb) { + if (scl_data->format == PIXEL_FORMAT_420BPP8 + || scl_data->format == PIXEL_FORMAT_420BPP10) + return LB_MEMORY_CONFIG_3; + return LB_MEMORY_CONFIG_0; + } dpp->base.caps->dscl_calc_lb_num_partitions( scl_data, LB_MEMORY_CONFIG_1, &num_part_y, &num_part_c); -- 2.30.2