Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1535090pxb; Thu, 16 Sep 2021 09:25:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxPltOb1sUZTIe3MtECSQ4THLJmjD5U/NNoa9u+1OSYIkAADPo3zLPe0/jBuGodlDTE7OGy X-Received: by 2002:a17:906:3fd7:: with SMTP id k23mr7020321ejj.176.1631809504889; Thu, 16 Sep 2021 09:25:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631809504; cv=none; d=google.com; s=arc-20160816; b=rNJGHIy1jqezDR6rdyeE/5qEfInRkq/ThpyCj3g52WW8BjRhy8xfp5PSRA5Akb0we+ rRttgPOW7tGdRT62v7FfPtRB53BiHvj0YlVhfm7FVH9CWyKOddEiOAK+ybvf3LBSvgFi CemQTI7KxLMcD9piVxVaXUc/viyHEd8Uqny2gtMRTK7R8nRTj7YCHIsjWsDtHKQGb9G1 LH8oGDRVeaO1d78NGxLN0FlP0yLw6utxhrD5e5ExqsTunjx2dcWX7bJk3akFHjGH7O3y PB8Jq64Z7xncsh0DCCXOHD/IySTv5ErzfGH5R2l6J0HHooYiXxroPdR8dvqOUJm5y2Ss 0oTw== 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=p9Qc+oY0Vh83wMMfVe5t+qJepJ6mKajWgCBDCg4cpgM=; b=TNWk2LICWvpPxD8Cod4gvr5YgkLNOWdvTu50WJdVaH7Zg4f9AGij0iHsQdC2xocdh7 kCmJqZ2jLtezEvPmEjLshWuX1ZYdMnMQ94LoqHQ5VhBPKY35eNPED1K9lPtHKuqXyUzs usstx8AfwntsESWPYhXZm++dP+iMggokjqi1U1H3scE3Y2wMOO1+HimWxIKbbkZ8M15G 3ZpT3VPgXiCHJYqXtH4dZCcvCo380vK5gysZMow7wkcMu8dTvT06fX3hJm9/gk3NRsqp 2k4S6jY1lZsJPdoeyEaBhqjCKi2f7y7KCGm1Wp01WXV18OVJ0Le8/goy7Uwf9Dkb1Gig GCcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=FtWxp0hw; 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 x26si3938902edv.472.2021.09.16.09.24.38; Thu, 16 Sep 2021 09:25: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=@linuxfoundation.org header.s=korg header.b=FtWxp0hw; 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 S236946AbhIPQXr (ORCPT + 99 others); Thu, 16 Sep 2021 12:23:47 -0400 Received: from mail.kernel.org ([198.145.29.99]:54936 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240622AbhIPQOS (ORCPT ); Thu, 16 Sep 2021 12:14:18 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 05E34613A1; Thu, 16 Sep 2021 16:10:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631808614; bh=GDHq+i1T9MXWFzZU0DWjRGNi+dlsg4XppN021cgzqSI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FtWxp0hwN3ZfaAnulUmXpnJEZV8fsOYvF+nyoKSBqplEY9gTEdjGg6rmxwBf6CaCm 5GEUOzb/A+G9+Z39HrNcQcez1f1WM9QT0gNiI9CguTB8m+I6+s001UlQt5+dsg7GAd F9WiT7vDH1EaXTGls2BOHKavNTSzd5CLGekSCuEo= 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.10 141/306] drm/amd/display: Fix timer_per_pixel unit error Date: Thu, 16 Sep 2021 17:58:06 +0200 Message-Id: <20210916155758.855246092@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210916155753.903069397@linuxfoundation.org> References: <20210916155753.903069397@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 cfe85ba1018e..5dbc290bcbe8 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c +++ b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c @@ -2455,7 +2455,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