From patchwork Mon Apr 17 21:35:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe JAILLET X-Patchwork-Id: 84481 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2423847vqo; Mon, 17 Apr 2023 14:56:01 -0700 (PDT) X-Google-Smtp-Source: AKy350Zx7IFe2TBfYPElpi/a4yNdC8U2lnvrvJGfzkoC6EIQ+l27g8voPGinHGNyjMMPiNmBnLwa X-Received: by 2002:a17:90a:c215:b0:247:54c7:1bdd with SMTP id e21-20020a17090ac21500b0024754c71bddmr9469164pjt.22.1681768561534; Mon, 17 Apr 2023 14:56:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681768561; cv=none; d=google.com; s=arc-20160816; b=qDnExqUqm7NM7Kd+WxJzpMvQErZdwTYmm7bWuOe7eHUoAEZIUzLRD4Jn9oNpQ00ABW HZzjCoy1K8ueW4r+Mu541p/gIxVeqX0HjgZd9DUwt2K1a2GjxCdNUb5p6RoMn4bwrJgR 0t0hrN97TAuOh51vcNmN3JpwR2dKxBQc7D+zkC0lv8oiOA1V3UsntuOSjVygYuQTRI72 KXx6iYhp9xRvHr7cRAwDG7LPLDciUgYkiIomLmFz6iEKmBh5MYj0Irk/yBe3Gi/8voTT z9FU76v2fOGdlOsIW5WhmdrQZ52KeyBBBrrpLwHKJ2ocLsAzG7UHnr9CMfOJz85U0Vs0 NIYw== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y12-20020a63e24c000000b00517ba74c173si12668849pgj.506.2023.04.17.14.55.46; Mon, 17 Apr 2023 14:56:01 -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 S229838AbjDQVfP (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_K=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 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1763462151052153972?= X-GMAIL-MSGID: =?utf-8?q?1763462151052153972?= 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; }