Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp444852pxb; Thu, 9 Sep 2021 04:45:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxHlrC3D65XbfNP6PiRrz4l2xzEvSpFWeInaGDy6XJ4CRpT/3oujeGnGaQkurY0VQpN81SL X-Received: by 2002:a05:6602:130c:: with SMTP id h12mr2274259iov.132.1631187934184; Thu, 09 Sep 2021 04:45:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631187934; cv=none; d=google.com; s=arc-20160816; b=DskB//AW/eyIzOdvFgVKF87S13nNmxTPZlDSqQQYwOyFtnioPBSBwvOtI0CjYHRDuh o6jNWcL7DBo91iGgawvY64eB/DdodMLf8nbQoRSPA0CAKxeVEWaGJ7w9UBrhaJ/Ff6dI H43PLBs2BpMsGZxubp3SPaJDhyDy+yWs8NL/xZDoncTfr9Em31Ev4eOPD7lppe1BW4f6 CKUt/WLt0EMyfUMSFgeHXI+S6cEqN2ZYMV4FNyzPylehnMIJs99AaL5yxNwYedrNxJUL P8fwdzYJFCnwdjA4H7kV7TFBMudkgI08GIb6HA2Tu7GXxbwqldwCMeZ7cBGubhhJZQBx w/YA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=AJWw7PtqDlib//jb4qrK64/DVuGWuq3+cRUSNRg/Hl4=; b=B1Qm3BcA2PZXUTQ2gffJWb7/rTSi0TxkUiOiygtBM979iJ23S+YGESsNq4GMJFZRPs nCeONb6fKV4a97uDDwNRVWpBuylKN/H0fLoQi4ZL3C/vCBDvS7jLUD2Ul1prho/s8v4W axetC4aenFEhHTkASL+OXtQTDY9kCGHUWRUFFuFsBFzQILXpG1UntPGIEJ97h9ChBFwP yQsivkKKmI9uHJc9JL2MRQukxS8txEMhy15YE4R8YfV3270S4/hUy3cpg3CXvD19Yg2Z xYl2EeBgL0wTgVc/EcWjGMRpHk5NGCbBnPvn9DIF/BdXOqU58RMenCNylGsVXl8GuBZT WI7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=OF0Rhlno; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d14si1398233jaf.71.2021.09.09.04.45.22; Thu, 09 Sep 2021 04:45:34 -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=@kernel.org header.s=k20201202 header.b=OF0Rhlno; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236440AbhIILpt (ORCPT + 99 others); Thu, 9 Sep 2021 07:45:49 -0400 Received: from mail.kernel.org ([198.145.29.99]:46708 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238796AbhIILns (ORCPT ); Thu, 9 Sep 2021 07:43:48 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id B93D76124E; Thu, 9 Sep 2021 11:42:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1631187732; bh=fQ418/f7pqUObBNI+0drbdk82ICbaLCrqZ5MotFMp5w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OF0RhlnoJvxaWpZhWClvI05aGUmrpg3pEoeG8w+iq7855liLxchDFbJt/2atwWQ7f NZNxgFBUYSkgyNIZT3UlTQUvP2PcQARAV7qssOpjOa7HDXBOK1I8J0XKkGKH1czcei 2skS3oWXAHto7vZ51f7Wq7PJpEC6ag+YppI6/eB40npkSBwfRmzCxrw5QgPW99AkRQ ZeA0d4Tao8UZUOeqQNKkJjNlEto3I/y35KlxYBmIkmyti8cgqNF7IgtK1azI20J1Tp 2EsxEjvgClxPHfxgk9j2vJ9auwyEAr7aNJCugcUpzehCft6rIQX8OX+767egjbxtvg 37WC0RCBPC+iQ== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Oliver Logush , Rodrigo Siqueira , Alex Deucher , Sasha Levin , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Subject: [PATCH AUTOSEL 5.14 052/252] drm/amd/display: Fix timer_per_pixel unit error Date: Thu, 9 Sep 2021 07:37:46 -0400 Message-Id: <20210909114106.141462-52-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210909114106.141462-1-sashal@kernel.org> References: <20210909114106.141462-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore 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