From nobody Fri Dec 19 18:42:02 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 585B1C04A95 for ; Sat, 22 Oct 2022 07:51:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231889AbiJVHv0 (ORCPT ); Sat, 22 Oct 2022 03:51:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35676 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231836AbiJVHtU (ORCPT ); Sat, 22 Oct 2022 03:49:20 -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 BC8382B4EAE; Sat, 22 Oct 2022 00:46:05 -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 0D47A60B9D; Sat, 22 Oct 2022 07:43:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 225A8C433C1; Sat, 22 Oct 2022 07:43:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666424581; bh=TdOSGO9Ccl+FvN9iBcVOLWtEUIl7cDbZqMnC7k3x+jw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Bi3yPnJXv1fN8MX9t0ryROMv79NfjMXhwdaRBl7s0F5y2/Hf/YPtSEUgqCqOQ4TJ0 tvXR+blUExaGBxuub8ADuD3YwWxygEjPUqbq1Ryx1RZl7/0aiKzmBX3Oa7L20A8kfC W4G9jmCxDb0UjukkX0Y9Ayb00CE2osZ5VE61bxvc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Juha-Pekka Heikkila , =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= , Tvrtko Ursulin Subject: [PATCH 5.19 169/717] drm/i915: Fix watermark calculations for gen12+ MC CCS modifier Date: Sat, 22 Oct 2022 09:20:48 +0200 Message-Id: <20221022072445.427693683@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221022072415.034382448@linuxfoundation.org> References: <20221022072415.034382448@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ville Syrj=C3=A4l=C3=A4 commit 484b2b9281000274ef7c5cb0a9ebc5da6f5c281c upstream. Take the gen12+ MC CCS modifier into account when calculating the watermarks. Othwerwise we'll calculate the watermarks thinking this Y-tiled modifier is linear. The rc_surface part is actually a nop since that is not used for any glk+ platform. v2: Split RC CCS vs. MC CCS to separate patches Cc: stable@vger.kernel.org Fixes: 2dfbf9d2873a ("drm/i915/tgl: Gen-12 display can decompress surfaces = compressed by the media engine") Reviewed-by: Juha-Pekka Heikkila Signed-off-by: Ville Syrj=C3=A4l=C3=A4 Link: https://patchwork.freedesktop.org/patch/msgid/20221003111544.8007-3-v= ille.syrjala@linux.intel.com (cherry picked from commit 91c9651425fe955b1387f3637607dda005f3f710) 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 @@ -5308,11 +5308,13 @@ skl_compute_wm_params(const struct intel modifier =3D=3D I915_FORMAT_MOD_Yf_TILED || modifier =3D=3D I915_FORMAT_MOD_Y_TILED_CCS || modifier =3D=3D I915_FORMAT_MOD_Yf_TILED_CCS || - modifier =3D=3D I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS; + modifier =3D=3D I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS || + modifier =3D=3D I915_FORMAT_MOD_Y_TILED_GEN12_MC_CCS; wp->x_tiled =3D modifier =3D=3D I915_FORMAT_MOD_X_TILED; wp->rc_surface =3D modifier =3D=3D I915_FORMAT_MOD_Y_TILED_CCS || modifier =3D=3D I915_FORMAT_MOD_Yf_TILED_CCS || - modifier =3D=3D I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS; + modifier =3D=3D I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS || + modifier =3D=3D I915_FORMAT_MOD_Y_TILED_GEN12_MC_CCS; wp->is_planar =3D intel_format_info_is_yuv_semiplanar(format, modifier); =20 wp->width =3D width;