Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp3861517pxb; Tue, 19 Apr 2022 11:16:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxgKsdXnFGST50HBJ8y9DGd9tob//uRLuAvZyQZLN+EzBDwjygNXTLXmmRNKNTfr/PHIF8Z X-Received: by 2002:aa7:d292:0:b0:41d:7933:1f00 with SMTP id w18-20020aa7d292000000b0041d79331f00mr18730711edq.237.1650392207760; Tue, 19 Apr 2022 11:16:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650392207; cv=none; d=google.com; s=arc-20160816; b=A0v4nGxrsEcSPn7maYkcusnrNBav5hgEwyMtjn++doEmFTdzarOxsgrkVkK5LDDOmH 4FxWbC6g7kWBMalZpvsO6j9kH6G9bKxYv+L7kWiOzePmlt660qlzsDhoECnXeGsn8co/ glF8mAfIKph+ZBGXH38mmmNuwA+no2GAsVCWj9Y5h9mQhomBllR8BliGd1+AQEv7ltUw XceJ1MSRT2LbgMT3UB8TuFO9ypTXWe2WGbmvAc/baNMVk4NzS4rEe9Pkiz9si8VDzNnG tfmMXTF6B1XlthywrLD8WqZG3XoZp8FyXucuI6LYS8Qw8g9Wq4ewBOD6mfdxpuiePLH4 lrUw== 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=Oo6dxcyChUPljh71M3Ln3/eNYlRB4dsCvwgKWrVRit4=; b=Vds2ZHzXKz0H/BUa51vdJRLnA5ID/biFtOglBim3kezb6nEDyuOqUMfZyzL84Nr34d g6p/XeQMThXQinWmHR+de1JtXrTetUxCNlSsoe3qMHi3gw2zkiBja24Py5w5T4otTAyd QfBsnu8ku052XuPhAz8/cZ09/u5oqblwfbPOKEzaoiRWAyU4imzGHHn76PlyJdWSoy7v UphiQMd0PZS/NweirrDD4jB+sxU98E3mgPI2JxhdVjmqHuns8lYrxgBWHMB/7wFQTpeg rZtPyfsz6wB9XsaYFhACDWm27kkCj5lu/2fFZIKCwEJb5K0yNjxqA54GOiIjjzebXmH9 Yreg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=vuR3qDYv; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e6-20020a170906c00600b006efb71315d7si32441ejz.24.2022.04.19.11.16.24; Tue, 19 Apr 2022 11:16:47 -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=vuR3qDYv; 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 S239289AbiDRMfm (ORCPT + 99 others); Mon, 18 Apr 2022 08:35:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38174 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240047AbiDRM3Q (ORCPT ); Mon, 18 Apr 2022 08:29:16 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6960E20BDC; Mon, 18 Apr 2022 05:23:08 -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 ECA4660F0C; Mon, 18 Apr 2022 12:23:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 04DAFC385A8; Mon, 18 Apr 2022 12:23:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1650284587; bh=FFtHTLViO7Kk3k4dRDhJk2ARFMqmxQ2ReCqBcHvNwIw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vuR3qDYveLGD9v7nr+gRJD6QtyuJshU2KmvtTXCLF3ZUMYVE1zsiyR+zvZFjpoqhh 0f0AHGXERA3m5R0RnOQpOLykXR6Y7IQNtHn2juYQLkbEKMxZbxeLNG+xcqdEo3IpJG kGFDMeylCBAAOMZpiLyezM7kKJEKWY7HGZcQO4ec= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Wenjing Liu , Alex Hung , Chris Park , Daniel Wheeler , Alex Deucher , Sasha Levin Subject: [PATCH 5.17 162/219] drm/amd/display: Correct Slice reset calculation Date: Mon, 18 Apr 2022 14:12:11 +0200 Message-Id: <20220418121211.417970399@linuxfoundation.org> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20220418121203.462784814@linuxfoundation.org> References: <20220418121203.462784814@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.7 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,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 From: Chris Park [ Upstream commit 862a876c3a6372f2fa9d0c6510f1976ac94fc857 ] [Why] Once DSC slice cannot fit pixel clock, we incorrectly reset min slices to 0 and allow max slice to operate, even when max slice itself cannot fit the pixel clock properly. [How] Change the sequence such that we correctly determine DSC is not possible when both min slices and max slices cannot fit pixel clock per slice. Reviewed-by: Wenjing Liu Acked-by: Alex Hung Signed-off-by: Chris Park Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/display/dc/dsc/dc_dsc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/dsc/dc_dsc.c b/drivers/gpu/drm/amd/display/dc/dsc/dc_dsc.c index 9c74564cbd8d..8973d3a38f9c 100644 --- a/drivers/gpu/drm/amd/display/dc/dsc/dc_dsc.c +++ b/drivers/gpu/drm/amd/display/dc/dsc/dc_dsc.c @@ -864,11 +864,11 @@ static bool setup_dsc_config( min_slices_h = inc_num_slices(dsc_common_caps.slice_caps, min_slices_h); } + is_dsc_possible = (min_slices_h <= max_slices_h); + if (pic_width % min_slices_h != 0) min_slices_h = 0; // DSC TODO: Maybe try increasing the number of slices first? - is_dsc_possible = (min_slices_h <= max_slices_h); - if (min_slices_h == 0 && max_slices_h == 0) is_dsc_possible = false; -- 2.35.1