Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1920547pxb; Thu, 16 Sep 2021 20:18:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxLllZq9o5jtRKGbC4W+d98RFygF33Gpk7MkAZaevTbRKv7iqq/zhTukrZjpAWwanpHl9MA X-Received: by 2002:a17:906:7147:: with SMTP id z7mr9762538ejj.94.1631848700699; Thu, 16 Sep 2021 20:18:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631848700; cv=none; d=google.com; s=arc-20160816; b=RTkIV0wpxeR+0VgnYnKkwb+sTFVwiAL8I3o8g1uixpyqM/HvLjmoUOM7Bs1J0nAZEH b9m9ju+tXpeRnirCLNkZi90fyBtBK1/+E+n2fNh0jn1nAIRAp7Ie7Ob8AXK6nsDOsgUg a2jOHKcs1r1trh5SLhwT7nMJx4sGhCXgD1psk90wp95Up8rKrlo6+A99k1V5PSPY/WAs qofDWmwE1ZfJtZ3nQAdBxlWgxuwrjjnaMRp9Tr1/eN3CMS9XPhPlIAWN+Or/vOBLlOH7 rg9HK1oNmkKvTj8nUH0UNEJxZi1wwQXmBsFcvFuL1/JgnUoTl6ImnkxW0nAWj8Fv2vNp oU+w== 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=AJWw7PtqDlib//jb4qrK64/DVuGWuq3+cRUSNRg/Hl4=; b=U9aTeaTLsZssxEBBZ+h1YiepyWFsZt8RidNNcZvXknt2GG//Nu/AuoMuJXMCRZyIQ1 eeAKpioVuXhkldQYQOFwU/Dl+eGKZ7WZZol4BGYz4jeKhr1uytyEGVZHCr5OW85FTWD8 EU9K9aUiIgseMNAa+4V7isFiphrmK7BKsNxO/qHRDXe09cVXJv1rpsSPvLhYITaPfMAa vvpBd139fVs2/siiCH0pu8ErZz/KWnn0S8TkL6B2WT3ua0BKK2BUtq5eqClC9BYhHm/1 1mIKraukdBWY7i/kgjrXR3LdVENW4w7hQVoyx8YIeObYpkZxgcfhPLFhkP6rtyAL0hF8 iLNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=2MHXAlhj; 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 z15si6417613ejr.28.2021.09.16.20.17.48; Thu, 16 Sep 2021 20:18:20 -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=2MHXAlhj; 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 S1349329AbhIPRdY (ORCPT + 99 others); Thu, 16 Sep 2021 13:33:24 -0400 Received: from mail.kernel.org ([198.145.29.99]:46938 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348101AbhIPRX6 (ORCPT ); Thu, 16 Sep 2021 13:23:58 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 60DA261BBD; Thu, 16 Sep 2021 16:43:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631810614; bh=fQ418/f7pqUObBNI+0drbdk82ICbaLCrqZ5MotFMp5w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2MHXAlhjbNWa2xkZSFVmIQ2CBUZ81WzSh/Uz/JJMaAvRc1IK0L1Nc/H/8Q2UBHlLI zsKH9j4sVRD3BpOZl5aJxVbkEzKwOX4gTzxwn5aKsltS7vJYhmp9QZVbRwJRg4F0j8 m0YpS++qGonEBrLo7gBEiUf7b3qY1KE16Bdiryug= 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.14 206/432] drm/amd/display: Fix timer_per_pixel unit error Date: Thu, 16 Sep 2021 17:59:15 +0200 Message-Id: <20210916155817.804261680@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210916155810.813340753@linuxfoundation.org> References: <20210916155810.813340753@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 b173fa3653b5..c78933a9d31c 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c +++ b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c @@ -2462,7 +2462,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