Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1810120pxb; Thu, 16 Sep 2021 16:33:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw/LsSvdUxdtCg47sec3P9t8rie02Ko6ebnrTzUthii3sEHcnWPokk8vbChpITcq8Y4VoYN X-Received: by 2002:a02:5b83:: with SMTP id g125mr6244268jab.146.1631835234583; Thu, 16 Sep 2021 16:33:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631835234; cv=none; d=google.com; s=arc-20160816; b=kKb1mGnEFvdsv5J4HFqz5hSBY8VK3f2DW4xi/hrKCGv7zKe0eP/qlVECMDzA6Qlfhc OLc+vqUNvUXOkJ5Y93B5rbqvY92AI2LUKosGxJFO02Y5DJ3/DZU6Wk29aZhbZ2oDHCj5 YZqUVluHxmPBTUCsfHYIpRd8cElgcjR7L5fnP9ombqhAYzQwiMcLsr/7wkiXVDWl5CeT pRM7sdFXIXlvCfyhgza5jxdpQoVgWs6iwnE1/8ZuGgx1Hyk38SyK34ODe5SMuOcuKxtU noI9oWXgFUJhKKM+ErPi9NcjhdmlZVJAuDOT0qnGskaVhpedcDbORnNjYeudw+92MwKu Uo+A== 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=kJc2LBlcLLqb18guwGJLnY+EUaGmwZsBk15BA2pqmcA=; b=twCshHiUqZsa6jVHZxWMp5e5/qZxcVfjeEuKF+E3SxuWwTxF8FDxxgIFGpWlyraooh UfmsOls/M6lhdmpZzwaiF5OhoFxVcMXad4GzTpQwGpVJMKFO/K7Z0f8o1dpxpQ4OtHC6 uT6aqjpYwwkfwJKmOH2iHW8y41EJADYesWaxcFiHuoIE1BAruL+uiOIToY/RzJ0ZrhA5 8mmd2mjlMthjgXESPLs7G0Ge927ez4qYZVBJEAT32/FHkIRyIXGztAyRJGp9qKD+wJxQ 9xzcxJpCbNCyCzFrMD6aKENe0o2kYexavv2Cx7GqEvpjadazT/m5+9Kgs4M9Sx5eSgFL fBoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=mgbJzWWy; 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 v9si3750270ile.167.2021.09.16.16.33.42; Thu, 16 Sep 2021 16:33:54 -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=mgbJzWWy; 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 S238769AbhIPQvM (ORCPT + 99 others); Thu, 16 Sep 2021 12:51:12 -0400 Received: from mail.kernel.org ([198.145.29.99]:57530 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344720AbhIPQqi (ORCPT ); Thu, 16 Sep 2021 12:46:38 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5B16F6120F; Thu, 16 Sep 2021 16:26:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631809601; bh=5S9rxJwANp0e3k9J5kE6LC6lNjzHJmACQK9MxwK4GO8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mgbJzWWyVahbwvtsC/83/E6m8c6sp4p9uqRMCDHSGYOFhZr87iheq0KzDGVOhcK1+ tWzt8W0NGJU61FgTt4HB4ACXRcfd2QplU9MKNJ/4Uox5ZcG1VShYNolrqjziJcrOE2 fegdazNpK9EdDy4j+2FjJ9+AUNgD1r/t4ismfYSA= 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.13 182/380] drm/amd/display: Fix timer_per_pixel unit error Date: Thu, 16 Sep 2021 17:58:59 +0200 Message-Id: <20210916155810.267159884@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210916155803.966362085@linuxfoundation.org> References: <20210916155803.966362085@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 81f583733fa8..12e92f620483 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c +++ b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c @@ -2461,7 +2461,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