Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp850956pxk; Thu, 17 Sep 2020 19:02:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzPgOvJfxxpFq40VHjSpL5YwTFyzBDxDtBzDUri2GgV53klMYvpNQPKFlyzNqyc5XzmSa3G X-Received: by 2002:aa7:da10:: with SMTP id r16mr37057907eds.333.1600394575602; Thu, 17 Sep 2020 19:02:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600394575; cv=none; d=google.com; s=arc-20160816; b=XRI5CcCfP+De7/pU+0N00YRK+qVLx8uvlxPF9XPw/xhLGTS8p1TQxd5Kb+cXrIi7m8 8YgB7bKhWyT+JL1MyT3h2Jb8etOpedgIC5KjXvRbt6nyQPXYp3sg7g2kB6aUZT1Hizh9 OL4SAMvmuHgY7zmKCaw7Dp/AJT8iM7SpqCi6qlVqv+yBUHgd9eWpaJX5125s9K0cyd87 rakigmbd12BFRzu7Gj5kTF6Zz8jnQQ2IWqzTIo9nFxZDyNaTWMEyrLOhMRQGkz66sj3P eToEd64qEDAeZfVNddusrGUVv9EKWJQmPjPfoLBFEUFbljN1+eFo8CLs6PBFN29wE5bH sG7g== 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=2yclgIIH+nvso3eSipPyDVLajF2BoA3r4CyeJ0rq2Mo=; b=UqXBbAzRwXraeW41Ck0y4Jq1nAGQSVGpHlvwgg8Da1fIN7oenwEsKYKlWmOGP9+S9q ZYKC1JkkRHf6hyQCWpn6KfBTPntaAjuWrh3htUV99uS3e96CnG3mSNPawl6yjSsfB/+d velX4CDggdsN17gNM35h2ZPTnW5W7QuAiY9xWq1/kbUSGh1YkTmnGn7Mndih4HfpNdKz iyplZ9kKPMtp8DPvzpppQ60HOVpXaFptz0PAfHmAN/21pxOomI4VTN909T2bPQMahBpI riPxsuckxYDGhAkAb7tCe82sBi0BRbdTG1bUxGl7S5uG2MD+PIwuFa0kfaxxkicAqYw6 FTdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Kpnh7fqK; 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 d6si1207585ejp.629.2020.09.17.19.02.32; Thu, 17 Sep 2020 19:02:55 -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=default header.b=Kpnh7fqK; 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 S1726359AbgIRCBX (ORCPT + 99 others); Thu, 17 Sep 2020 22:01:23 -0400 Received: from mail.kernel.org ([198.145.29.99]:45468 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726328AbgIRCBV (ORCPT ); Thu, 17 Sep 2020 22:01:21 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 650DB21973; Fri, 18 Sep 2020 02:01:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600394480; bh=zjJHSH1xDZxPXGtfKqQZF3rpcEEDzstMjOaW85h9Pro=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Kpnh7fqKGBxTg+o9Z6bnsgru9Tl8QcXRT0Cg9Lki09+G+JmfBNG+O483d+3eUJBGr poF68ZM9gJkF+BPeSEhDUzLKhCQ4Y/FEo1cuWog57olH4BgaPA+6mK8VuspQUmZ3Pp ro1G5Kk1Ccj9uV7hef9Po0BQokQXR7hrrbDc91yw= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Wesley Chalmers , Dmytro Laktyushkin , Anthony Koo , Leo Li , Alex Deucher , Sasha Levin , dri-devel@lists.freedesktop.org Subject: [PATCH AUTOSEL 5.4 007/330] drm/amd/display: Do not double-buffer DTO adjustments Date: Thu, 17 Sep 2020 21:55:47 -0400 Message-Id: <20200918020110.2063155-7-sashal@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200918020110.2063155-1-sashal@kernel.org> References: <20200918020110.2063155-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: Wesley Chalmers [ Upstream commit 6bd0a112ec129615d23aa5d8d3dd0be0243989aa ] [WHY] When changing DPP global ref clock, DTO adjustments must take effect immediately, or else underflow may occur. It appears the original decision to double-buffer DTO adjustments was made to prevent underflows that occur when raising DPP ref clock (which is not double-buffered), but that same decision causes similar issues when lowering DPP global ref clock. The better solution is to order the adjustments according to whether clocks are being raised or lowered. Signed-off-by: Wesley Chalmers Reviewed-by: Dmytro Laktyushkin Acked-by: Anthony Koo Acked-by: Leo Li Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- .../gpu/drm/amd/display/dc/dcn20/dcn20_dccg.c | 26 ------------------- 1 file changed, 26 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dccg.c b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dccg.c index 16476ed255363..2064366322755 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dccg.c +++ b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dccg.c @@ -119,32 +119,6 @@ void dccg2_get_dccg_ref_freq(struct dccg *dccg, void dccg2_init(struct dccg *dccg) { - struct dcn_dccg *dccg_dcn = TO_DCN_DCCG(dccg); - - // Fallthrough intentional to program all available dpp_dto's - switch (dccg_dcn->base.ctx->dc->res_pool->pipe_count) { - case 6: - REG_UPDATE(DPPCLK_DTO_CTRL, DPPCLK_DTO_DB_EN[5], 1); - /* Fall through */ - case 5: - REG_UPDATE(DPPCLK_DTO_CTRL, DPPCLK_DTO_DB_EN[4], 1); - /* Fall through */ - case 4: - REG_UPDATE(DPPCLK_DTO_CTRL, DPPCLK_DTO_DB_EN[3], 1); - /* Fall through */ - case 3: - REG_UPDATE(DPPCLK_DTO_CTRL, DPPCLK_DTO_DB_EN[2], 1); - /* Fall through */ - case 2: - REG_UPDATE(DPPCLK_DTO_CTRL, DPPCLK_DTO_DB_EN[1], 1); - /* Fall through */ - case 1: - REG_UPDATE(DPPCLK_DTO_CTRL, DPPCLK_DTO_DB_EN[0], 1); - break; - default: - ASSERT(false); - break; - } } static const struct dccg_funcs dccg2_funcs = { -- 2.25.1