From patchwork Wed Oct 19 08:24:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 4725 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp214031wrs; Wed, 19 Oct 2022 02:11:43 -0700 (PDT) X-Google-Smtp-Source: AMsMyM73wO4LIb4wDEzY7GUjRsPYthMsJ6frAXAXY1DMMhvru2Trom7Vq2yek5s3M0KSelNB/0vi X-Received: by 2002:a17:907:3f04:b0:741:4bf4:fe42 with SMTP id hq4-20020a1709073f0400b007414bf4fe42mr5996400ejc.664.1666170703776; Wed, 19 Oct 2022 02:11:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666170703; cv=none; d=google.com; s=arc-20160816; b=Be++PVGWy4KE+D8QH+dyZM3Sr6hlp+xmrmaLN60jLbVChTzb/UwwpubDgde7L4HqWS DQLKIny0dlH+Ebdo+vPs/f5WTny9aB0N9duyX7MRyLj6VhlPX1D4ZJ2IKasmqqlFvTqr egkF/Jh0No6UDrvJXXoQn8MZxd3NdXcTWfSFC7/gB7bYAA5vitGYDNd4/1cnUOgHIzDQ G8WqTaoLNa7rkvF+stO4r6pJ2wv1KxXBkON+u8CXYbS783mm7A8eZxiP0C1sLW7Wf+y0 SmREZDKNP6mpJkyTNFGMiC5Uzd0Lbjtel/700tiTeSwGShJYkx/+3wFKe/sD3y0RfIIr ITWA== 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=gJt92IzzJw/mbg+QFWoNVbNkzpnVfgrIBdv/uEBmunE=; b=dgqYcX5o5HUCmSt13nNUlv7s3h21BdupjH2rYN9qn9XfWSsr9dwFEmmFLH3bN30Dyd lrosUTDsv2Zi/m28iJ9krfS944Z33LY/ELM+KfW1EA0fSOLx9brpQKWRKJq/X5VnYx23 qu2z/Iw/sJKAxXOV+AYNSloHJ5nRGOaHuiWBnFVuLTAKyc9oaUrACcVQzq2ilvC2vQ+m 1CtJesd3gqz4UTfZmaDFaf+6UIeyFyaF1eOiur7AtSIWhVwZKEFfviZh4v0ErFfVE/S0 yaKu9fQkeNudY7B/51f3DbHxrHHPV2rg4fDYfEN62iPu87bxHmEySVlLsB7+yx7PKGQS Cr2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=xcJd+epD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j20-20020a05640211d400b0045d3ed38ae1si12457815edw.16.2022.10.19.02.11.18; Wed, 19 Oct 2022 02:11:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=xcJd+epD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S232503AbiJSJIG (ORCPT + 99 others); Wed, 19 Oct 2022 05:08:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54086 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232304AbiJSJFa (ORCPT ); Wed, 19 Oct 2022 05:05:30 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A9305B274B; Wed, 19 Oct 2022 01:59:16 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id E969661750; Wed, 19 Oct 2022 08:48:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0F3AFC43143; Wed, 19 Oct 2022 08:48:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666169331; bh=5gG5OYn6m9YYIFvq/8qqrUumeeDPEJAt9vcV/QsLf18=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xcJd+epDVYm2QGBxRMOO+JF2x05YHCCY7zGOLDKc6AqoqL4TR/+03WPgO5yH/kMTY vt6xDzmoJdLSJywj2SwfaA2lF/nF5uNIwWDKrXMuO6AjYzdyaOvQyB6g9QvFtvKWEJ U0hoTiVF/d3SONDTQ5m9NwjROryXa6LhcThJZFMM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Daniel Wheeler , Rodrigo Siqueira , Qingqing Zhuo , Alvin Lee , Alex Deucher Subject: [PATCH 6.0 190/862] drm/amd/display: Fix watermark calculation Date: Wed, 19 Oct 2022 10:24:37 +0200 Message-Id: <20221019083258.376837892@linuxfoundation.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221019083249.951566199@linuxfoundation.org> References: <20221019083249.951566199@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747106611532415642?= X-GMAIL-MSGID: =?utf-8?q?1747106611532415642?= From: Alvin Lee commit 9799702360d51a714e888fef4ab5fb9123dfb41f upstream. Watermark calculation was incorrect due to missing brackets. Fixes: 85f4bc0c333c ("drm/amd/display: Add SubVP required code") Tested-by: Daniel Wheeler Reviewed-by: Rodrigo Siqueira Acked-by: Qingqing Zhuo Signed-off-by: Alvin Lee Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org # 6.0 Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c +++ b/drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c @@ -719,7 +719,7 @@ void dc_dmub_setup_subvp_dmub_command(st // Store the original watermark value for this SubVP config so we can lower it when the // MCLK switch starts wm_val_refclk = context->bw_ctx.bw.dcn.watermarks.a.cstate_pstate.pstate_change_ns * - dc->res_pool->ref_clocks.dchub_ref_clock_inKhz / 1000 / 1000; + (dc->res_pool->ref_clocks.dchub_ref_clock_inKhz / 1000) / 1000; cmd.fw_assisted_mclk_switch_v2.config_data.watermark_a_cache = wm_val_refclk < 0xFFFF ? wm_val_refclk : 0xFFFF; }