Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp4553612rwe; Mon, 17 Apr 2023 14:42:04 -0700 (PDT) X-Google-Smtp-Source: AKy350Z3jTRe7mADWhyCYu3ngTSAGb7l5WAIIupFkwzij+iRWt6FsQpGJFwWmMp4rwSiGsVzM33i X-Received: by 2002:a05:6a20:8410:b0:ec:7696:ee96 with SMTP id c16-20020a056a20841000b000ec7696ee96mr18233523pzd.38.1681767724300; Mon, 17 Apr 2023 14:42:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681767724; cv=none; d=google.com; s=arc-20160816; b=sd1VJo3oU4IAFDHq7C6ochaqUVRfg2WIzHPCVe36tTtqQ55OzK41LbpZygzkqOkBfR Kbl9xaIX387vxCdh5jHoBvDBRtAHOynr+oN50AVTsQgXUkryE1toRvH7YrI/7U11dnMT kbnYU6s8MHN/hMJn8epW/XRt8dezMuAK67WspUflhaWQCxcDapR9aUi6ZljmCsiG0UtF j9xvw1gAr9Uo1dHMIaE/cFQ3j/c6q1kPsmq6IMTUoWcpTgGB6rPUIzZHTk2Adj384WXv e5yHBlU2ORUDO7Fp2Le5cn/9aSXSf57LmJwo2NJBDuRrLta6PluEhH1BSQ+vceviLyoc UvBQ== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=exdfx2AQYI+d3tNi/ZWU6Qg32IUD8RC19Z/dcWtgLqs=; b=z/VdjIxTrNOLwu2Qyz4rCQWcUVNlRlDmNlzA19izdtVrZt3iZP/Q0gRJI1P+DSJivu lXW6Pitfrwwd7/XTBVDDfzrEzOTBONPEEK4KSqQrUp0hyq3K3FzoZD35pZFHWzN2V1Z8 LbRX5bfAVtFq7dRuVVcd/dW7wUfkmuJ5qHxQyYiqo8BelkSbjE6oR81b7eGxapC/wyW0 BIjQdm8qF84qd8sNLP4T1xoGPcp8eIvptBLiQBilXP2MDJ9yXNF4/IdzZN/+rfSc/Qyn ZTJZvxd2dv8eTU8SeFTDpyxsTRgBYFHbKg2y//n399vYpzKc0j+QqmSt7YW2T8vKL2hk oKuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@orange.fr header.s=t20230301 header.b=NdxG2WsG; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d1-20020a63d641000000b004fc2f19bacasi13434599pgj.120.2023.04.17.14.41.50; Mon, 17 Apr 2023 14:42:04 -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=@orange.fr header.s=t20230301 header.b=NdxG2WsG; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230455AbjDQVfP (ORCPT + 99 others); Mon, 17 Apr 2023 17:35:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38702 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229825AbjDQVfN (ORCPT ); Mon, 17 Apr 2023 17:35:13 -0400 Received: from smtp.smtpout.orange.fr (smtp-27.smtpout.orange.fr [80.12.242.27]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E04AE4C28 for ; Mon, 17 Apr 2023 14:35:12 -0700 (PDT) Received: from pop-os.home ([86.243.2.178]) by smtp.orange.fr with ESMTPA id oWVBpmySP7JnhoWVBpp7Yo; Mon, 17 Apr 2023 23:35:11 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=orange.fr; s=t20230301; t=1681767311; bh=exdfx2AQYI+d3tNi/ZWU6Qg32IUD8RC19Z/dcWtgLqs=; h=From:To:Cc:Subject:Date; b=NdxG2WsGN31gVPGEViY7Gfx6CGXCETw38SsVxY6IMCbDTSfxJfXScMtFpUjcrKaKG NVgFyLzcDAenFlcjEu92emWpI0WggHaWsRMRyb1j5k0GqiAzyRgTYoXhNLRHvnRR9C k/uxWrNaiTFNq1C8OBkSyax8cLOpnVn5gXA0002el4r+WuB58lXuybGxlgyZQVdbYU nnjfp7Zw2UQWmUDflTkQ34Dr3CEm02FFBu8uwmhsaHf/kv586EWgib/eHTjbpLtnDF jVSer0ib8ZfQ6hgF0MOUutTWNMqpSOHW6rhUWpXZNwfNO9BecmslqM1kij833b97lQ KUlMW8ZxR2/hw== X-ME-Helo: pop-os.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Mon, 17 Apr 2023 23:35:11 +0200 X-ME-IP: 86.243.2.178 From: Christophe JAILLET To: Harry Wentland , Leo Li , Rodrigo Siqueira , Alex Deucher , =?UTF-8?q?Christian=20K=C3=B6nig?= , "Pan, Xinhui" , David Airlie , Daniel Vetter , Pavle Kotarac , Nevenko Stupar , Aric Cyr Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Subject: [PATCH] drm/amd/display: Fix a test CalculatePrefetchSchedule() Date: Mon, 17 Apr 2023 23:35:08 +0200 Message-Id: <13ab79d7a6c7ec6292c803ce1e52c8ac12af320f.1681767298.git.christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE 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 It is likely Height was expected here, instead of Width. Test the correct variable. Fixes: 17529ea2acfa ("drm/amd/display: Optimizations for DML math") Signed-off-by: Christophe JAILLET --- drivers/gpu/drm/amd/display/dc/dml/dcn21/display_mode_vba_21.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/dml/dcn21/display_mode_vba_21.c b/drivers/gpu/drm/amd/display/dc/dml/dcn21/display_mode_vba_21.c index b7c2844d0cbe..f294f2f8c75b 100644 --- a/drivers/gpu/drm/amd/display/dc/dml/dcn21/display_mode_vba_21.c +++ b/drivers/gpu/drm/amd/display/dc/dml/dcn21/display_mode_vba_21.c @@ -810,7 +810,7 @@ static bool CalculatePrefetchSchedule( *swath_width_chroma_ub = dml_ceil(SwathWidthY / 2 - 1, myPipe->BlockWidth256BytesC) + myPipe->BlockWidth256BytesC; } else { *swath_width_luma_ub = dml_ceil(SwathWidthY - 1, myPipe->BlockHeight256BytesY) + myPipe->BlockHeight256BytesY; - if (myPipe->BlockWidth256BytesC > 0) + if (myPipe->BlockHeight256BytesC > 0) *swath_width_chroma_ub = dml_ceil(SwathWidthY / 2 - 1, myPipe->BlockHeight256BytesC) + myPipe->BlockHeight256BytesC; } -- 2.34.1