From patchwork Wed Oct 19 08:34:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 5131 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp251684wrs; Wed, 19 Oct 2022 03:52:23 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6arO5JPDNsLNNwNuDeUkwpO0Pbt5e3WiWk94BcNuWO1nVshh4ceYLehNjF6tIueuHUjWsW X-Received: by 2002:a05:6402:847:b0:453:943b:bf4 with SMTP id b7-20020a056402084700b00453943b0bf4mr6711296edz.301.1666176743542; Wed, 19 Oct 2022 03:52:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666176743; cv=none; d=google.com; s=arc-20160816; b=qPrVqjnbNKEXskwDTBlzSMN9Dj0B/ZnYet4EH0u6qOmRgFB6QQ0akExiMM6uHcgOoP LTpnOx4cbbd6MKvRJImeyOedTTGNtfDcgY6akXlneTCOOK1S519drk8in4eAIjph1TTy ErO9FHBnXy8DcEdFaLnYqxOKMoEuHCfLMaHSomRxozeDBRZGMEHzNLR/DE+MFm5NXhK9 jqw0BCU3XBX5N1OpoCv2XHAa4C+UL/bikBTL3TMUthIWXGAqz27G8bfIFRc2syzO1aI9 PbdUjTKD3jFPRwWApLbEEWElLl6eT5C1f+zL2er6RuzFylwDYYDWdoZdIOmgcYp0JLwB JxvA== 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=BX0SGS4kaiBFvfOdX/uvNY81Dot8Zj5mJVJVhoTsl8k=; b=Ye7qTq0Pm9tczN0bNVlfZ6sIcrkE6d+8dA/5S79A9QJVZzDlum6N4X2+K24f2Qpv9Y eED3TvlCjQAt/ETFLM7X5KBqykB3nvSQxi/nGPzIFB/fwAWduH3jr9jo3Zmd70i2XJPv 1vs/XJLSpJ92io4q00K50nJSAi9KbPMXKapgNENhFKe+Vv+makdE8ni9aUC3ZO82f84j Lp2WzK9A5ULgXGDPchMlNgEjyZOyhI6iU2TkGyiLXGquAUfpIBDKWT5fc3IUzrg+XZ65 x85MpDIaQ/zXMB444rFWkcaBXprbVUbARijurTWs10qbbxbC7z0gJ5vBQTagO9W4fJVp HGaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=eL3QFvCA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z12-20020a50eb4c000000b004594b742e0asi13022185edp.323.2022.10.19.03.51.58; Wed, 19 Oct 2022 03:52:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=eL3QFvCA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S234531AbiJSKvR (ORCPT + 99 others); Wed, 19 Oct 2022 06:51:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59622 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234518AbiJSKtX (ORCPT ); Wed, 19 Oct 2022 06:49:23 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5083D15B121; Wed, 19 Oct 2022 03:22:12 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 918CFB824C8; Wed, 19 Oct 2022 09:11:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E92A7C433D6; Wed, 19 Oct 2022 09:11:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666170701; bh=0Mkkz5bfFZBlBKXGzFz6TYYw1H49rCJnHuktGD6YMI8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eL3QFvCAZ4pqnJRb6KILamdSAecOxzlXl+QyZ7UlsktJ54dPOX4o0OtHmAufKYgO5 uAPZUfYAo/y066LgCzhuXwPhGxSPjiukEvW0XoLLwFVuyvRGh/ZeiU0LWRy6xfU22a nH9ePbLaZt3jpbOkaEE26Z3TGTyCMs2CA0q0Hbog= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Alvin Lee , Nevenko Stupar , Wayne Lin , George Shen , Daniel Wheeler , Alex Deucher , Sasha Levin Subject: [PATCH 6.0 755/862] drm/amd/display: Fix urgent latency override for DCN32/DCN321 Date: Wed, 19 Oct 2022 10:34:02 +0200 Message-Id: <20221019083323.271631999@linuxfoundation.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221019083249.951566199@linuxfoundation.org> References: <20221019083249.951566199@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747112945178243101?= X-GMAIL-MSGID: =?utf-8?q?1747112945178243101?= From: George Shen [ Upstream commit e7f2f4cd67443ce308480ca461806fcc3456e0ba ] [Why] The urgent latency override is useful when debugging issues relating to underflow. Current overridden variable is not correct and has no effect on DCN3.2 and DCN3.21 DML calculations. [How] For DCN3.2 and DCN3.21, override the correct urgent latency variable when bounding box override is present. Reviewed-by: Alvin Lee Reviewed-by: Nevenko Stupar Acked-by: Wayne Lin Signed-off-by: George Shen Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c | 1 + drivers/gpu/drm/amd/display/dc/dml/dcn321/dcn321_fpu.c | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c b/drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c index e573e706430d..b9d3a4000c3d 100644 --- a/drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c +++ b/drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c @@ -2199,6 +2199,7 @@ void dcn32_update_bw_bounding_box_fpu(struct dc *dc, struct clk_bw_params *bw_pa if ((int)(dcn3_2_soc.urgent_latency_us * 1000) != dc->bb_overrides.urgent_latency_ns && dc->bb_overrides.urgent_latency_ns) { dcn3_2_soc.urgent_latency_us = dc->bb_overrides.urgent_latency_ns / 1000.0; + dcn3_2_soc.urgent_latency_pixel_data_only_us = dc->bb_overrides.urgent_latency_ns / 1000.0; } if ((int)(dcn3_2_soc.dram_clock_change_latency_us * 1000) diff --git a/drivers/gpu/drm/amd/display/dc/dml/dcn321/dcn321_fpu.c b/drivers/gpu/drm/amd/display/dc/dml/dcn321/dcn321_fpu.c index c87091683b5d..b6369758b491 100644 --- a/drivers/gpu/drm/amd/display/dc/dml/dcn321/dcn321_fpu.c +++ b/drivers/gpu/drm/amd/display/dc/dml/dcn321/dcn321_fpu.c @@ -489,6 +489,7 @@ void dcn321_update_bw_bounding_box_fpu(struct dc *dc, struct clk_bw_params *bw_p if ((int)(dcn3_21_soc.urgent_latency_us * 1000) != dc->bb_overrides.urgent_latency_ns && dc->bb_overrides.urgent_latency_ns) { dcn3_21_soc.urgent_latency_us = dc->bb_overrides.urgent_latency_ns / 1000.0; + dcn3_21_soc.urgent_latency_pixel_data_only_us = dc->bb_overrides.urgent_latency_ns / 1000.0; } if ((int)(dcn3_21_soc.dram_clock_change_latency_us * 1000)