From patchwork Wed Oct 19 08:24:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 4588 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp206047wrs; Wed, 19 Oct 2022 01:51:21 -0700 (PDT) X-Google-Smtp-Source: AMsMyM70Tt0lu2GE3g7h2uF04F1AztPhzKQStE8ymGW9TcWG0ge8ROCwbd7hfQONzeUSIwRSDs5r X-Received: by 2002:a17:903:2686:b0:17e:f177:3ec with SMTP id jf6-20020a170903268600b0017ef17703ecmr7456217plb.71.1666169481266; Wed, 19 Oct 2022 01:51:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666169481; cv=none; d=google.com; s=arc-20160816; b=kcl55vJ8OeXKCoCkro3frsG+ovLAY84FoaGamij/OtxGxzI7ng6kmHst00yybVehMm Xb+oLxE/ClfgowIwe923VyJsfX5VJ1bTHePeJe6b4X0UDEqlI9Y4QIvniWiFdjqjpGnZ qxMTfnqgjLOG+yxg+FI/JtM8UylLNhcaK+qhcl99e9FrDVcJXx2aI8ns4aadvBs6jKfG 07b4HUkDYZEjfySrjzbtTHmEJCmzduYO9diFE8dETHQCh1JlAUenLAMKW4CqL9y81ggC w8Wo+4iupXLU7ZVpkKqL1CDTvHCN7QkXZxufv94xpERTq7MVj79PrDXQ7+LMUJrWz4UY PJmQ== 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=9AXzW+bIodoPMhLJ/QZzfTRH4yrUS7iuzRjh7GuVvH0=; b=ze84xkkJxOQel7IpyT1awZY+dzWX4BRPNY9IIj1IBf1FuuWmf1e95Vqi6TxgnDNnq3 PZZt49mNVEdxTjXCah1+9uREZ3KAdJ3lCkzI2w9ukbmxZ+0BZenzgHAA7YLCUZXawCsu wJ5EGF7lLgMcmBpUCKSlsLIN3Hxvn8O4cIuXGNHBQIouVVkTd7fpqROKwpCNZuIxgx6F N93bALS38BQrHVAIUn4Jujc/CoAA1vMRWvnXJgDfMo9nLqN8dyf1BcofFYPgBI18+eGY izjLTKFmh3dQt9U6nEbX2AuPiZR5u5qjI5hoO/G3AXGQMpdvbP23BTtr7UJbONGJ8a3l Nd4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=0RGhvzHB; 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 b22-20020a63cf56000000b0046aff3cb64dsi17396930pgj.410.2022.10.19.01.51.08; Wed, 19 Oct 2022 01:51:21 -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=0RGhvzHB; 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 S231542AbiJSIuw (ORCPT + 99 others); Wed, 19 Oct 2022 04:50:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59928 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231604AbiJSIss (ORCPT ); Wed, 19 Oct 2022 04:48:48 -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 D0856900FE; Wed, 19 Oct 2022 01:46:36 -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 8317361830; Wed, 19 Oct 2022 08:46:32 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9B759C433D6; Wed, 19 Oct 2022 08:46:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666169192; bh=sNHKf57xcO6JHt0hLxrL3agbC2C9zRzCaCSiO+r2D84=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0RGhvzHBGJHO8LY4GvfO28dAo8Zb22uX4VpDMQ6tILdlQKdVegacUZ9gJEclZHW/n driAjJZS+iwV3/PIARjs4V3YSlt3fbN5PUUE+Tk/eT0TtTlwmnnxPQK1spYXEdqcjs gwJdcl2z6gozgNlKpulLJTeUgtuBfPssWjv8mEEs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Juha-Pekka Heikkila , =?utf-8?b?VmlsbGUgU3ly?= =?utf-8?b?asOkbMOk?= , Tvrtko Ursulin Subject: [PATCH 6.0 188/862] drm/i915: Fix watermark calculations for DG2 CCS+CC modifier Date: Wed, 19 Oct 2022 10:24:35 +0200 Message-Id: <20221019083258.276391136@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?1747105330399499275?= X-GMAIL-MSGID: =?utf-8?q?1747105330399499275?= From: Ville Syrjälä commit b2e3a1af8cce4117de06ff1a4eab0749753ede27 upstream. Take the DG2 CCS+CC modifier into account when calculating the watermarks. Othwerwise we'll calculate the watermarks thinking this tile-4 modifier is linear. The rc_surface part is actually a nop since that is not used for any glk+ platform. Cc: stable@vger.kernel.org Fixes: 680025dcc400 ("drm/i915/dg2: Add support for DG2 clear color compression") Reviewed-by: Juha-Pekka Heikkila Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221003111544.8007-6-ville.syrjala@linux.intel.com (cherry picked from commit 334810f82024815283a6e7febd3d2de1fed6c232) Signed-off-by: Tvrtko Ursulin Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/i915/intel_pm.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) --- a/drivers/gpu/drm/i915/intel_pm.c +++ b/drivers/gpu/drm/i915/intel_pm.c @@ -5313,7 +5313,8 @@ skl_compute_wm_params(const struct intel modifier == I915_FORMAT_MOD_Y_TILED_GEN12_MC_CCS || modifier == I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC || modifier == I915_FORMAT_MOD_4_TILED_DG2_RC_CCS || - modifier == I915_FORMAT_MOD_4_TILED_DG2_MC_CCS; + modifier == I915_FORMAT_MOD_4_TILED_DG2_MC_CCS || + modifier == I915_FORMAT_MOD_4_TILED_DG2_RC_CCS_CC; wp->x_tiled = modifier == I915_FORMAT_MOD_X_TILED; wp->rc_surface = modifier == I915_FORMAT_MOD_Y_TILED_CCS || modifier == I915_FORMAT_MOD_Yf_TILED_CCS || @@ -5321,7 +5322,8 @@ skl_compute_wm_params(const struct intel modifier == I915_FORMAT_MOD_Y_TILED_GEN12_MC_CCS || modifier == I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC || modifier == I915_FORMAT_MOD_4_TILED_DG2_RC_CCS || - modifier == I915_FORMAT_MOD_4_TILED_DG2_MC_CCS; + modifier == I915_FORMAT_MOD_4_TILED_DG2_MC_CCS || + modifier == I915_FORMAT_MOD_4_TILED_DG2_RC_CCS_CC; wp->is_planar = intel_format_info_is_yuv_semiplanar(format, modifier); wp->width = width;