Received: by 2002:a05:6520:4d:b0:139:a872:a4c9 with SMTP id i13csp2568737lkm; Mon, 20 Sep 2021 18:57:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzVO3MD7fmuvBTeDFINxJw64R7d9Dd4auf9Gdjk2XIrSui4At0g5DAtUAwEmtrC3vfr8pEm X-Received: by 2002:a05:6402:3459:: with SMTP id l25mr32218374edc.55.1632189439826; Mon, 20 Sep 2021 18:57:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632189439; cv=none; d=google.com; s=arc-20160816; b=hlmZE6F8tuVhraI8mmGKY8FtuL5cIejGIPg0TvmrOoT52jlNie1ODxhJfkz3Tukhnd uXi+U80kakApwH1rCxtrW9CzPP8jSWEvh72IM11tu54dPzyQuu4XP5MBmQ+k2XPB9dlG YrnleV7gexSlUFDzr/1lU61MgW9kMIyTywpigDuIovzcNX/CngoYw3/Gax5kRHklKpp8 oZTmBOy1fMMlt9wtNNkWI9zt31LlZMxw7rHnNSUpskbgCdPAqr7abZJpTuEFecRIGsH3 J17FxKPK59VkrE/8QWJ4IsJxTmy8E7z+/HZ0LszZzal+LI9jCVDgUYoyNo9jJT7CRj+v pl4A== 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=F/P7qn5FslMhnbnQ8CuW0NnyR8bmzbRBF80GPdiuSsM=; b=mUUYNky0YZJk2lDksQ+PFcbzfSrqrfIt7BkAE6u/yR89Jjam9nH4x8nsZXfJmR8+K8 lBxVjSHenpLqz93Cni1afKchOVfC3ccClhA70n1zQqJyssUfuXMfVO3tNnGprbKAAF4w YG2kd6bojHZndBNNpS+5YP4GbtAvhRrIwMgW7XoxVu2JC1MnttGLscqiO8OeyQg58OsE DPRNixJOSX9EcXPrHQtuouzahPbRSY3aTJSvmolB27wqI6m5jQ34QCyC1Rl0YEP89uj8 UaKhpQCO5DTqmKJCBG5LXh9rZhnb7wRsOMymUg9KA9TjksSaa8TlttoPTyhdbCDqxiOk Xn+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=wPHSdSlM; 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 kl25si17049446ejc.370.2021.09.20.18.56.50; Mon, 20 Sep 2021 18:57:19 -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=wPHSdSlM; 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 S1377798AbhITSU6 (ORCPT + 99 others); Mon, 20 Sep 2021 14:20:58 -0400 Received: from mail.kernel.org ([198.145.29.99]:34730 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350782AbhITSHZ (ORCPT ); Mon, 20 Sep 2021 14:07:25 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4972763252; Mon, 20 Sep 2021 17:18:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1632158301; bh=gAQDgdF+VfAYYWMmqd7ls1HckRlxPjXt21JAmq2sVr8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wPHSdSlMOOyQ7p6OLJU4678arswf2LzVaHGRwGoQ/mVupMkC7XGbBFZZ7gEKnlA2B mrUQCVxXBAFxTo9Ofqf/T3U6kX0+A6rkhFauwWnK1TFB1TLamKNn9aVcQt36ttTeyx P4jJv2SYgdbzpyjWXcOnKrI8+b38C2y7pGFbMgDs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Rodrigo Siqueira , Oliver Logush , Alex Deucher , Sasha Levin Subject: [PATCH 5.4 094/260] drm/amd/display: Fix timer_per_pixel unit error Date: Mon, 20 Sep 2021 18:41:52 +0200 Message-Id: <20210920163934.333582201@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210920163931.123590023@linuxfoundation.org> References: <20210920163931.123590023@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: Oliver Logush [ Upstream commit 23e55639b87fb16a9f0f66032ecb57060df6c46c ] [why] The units of the time_per_pixel variable were incorrect, this had to be changed for the code to properly function. [how] The change was very straightforward, only required one line of code to be changed where the calculation was done. Acked-by: Rodrigo Siqueira Signed-off-by: Oliver Logush Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c index 2b1175bb2dae..d2ea4c003d44 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c +++ b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c @@ -2232,7 +2232,7 @@ void dcn20_set_mcif_arb_params( wb_arb_params->cli_watermark[k] = get_wm_writeback_urgent(&context->bw_ctx.dml, pipes, pipe_cnt) * 1000; wb_arb_params->pstate_watermark[k] = get_wm_writeback_dram_clock_change(&context->bw_ctx.dml, pipes, pipe_cnt) * 1000; } - wb_arb_params->time_per_pixel = 16.0 / context->res_ctx.pipe_ctx[i].stream->phy_pix_clk; /* 4 bit fraction, ms */ + wb_arb_params->time_per_pixel = 16.0 * 1000 / (context->res_ctx.pipe_ctx[i].stream->phy_pix_clk / 1000); /* 4 bit fraction, ms */ wb_arb_params->slice_lines = 32; wb_arb_params->arbitration_slice = 2; wb_arb_params->max_scaled_time = dcn20_calc_max_scaled_time(wb_arb_params->time_per_pixel, -- 2.30.2