From nobody Fri Oct 17 10:31:39 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 90657C433FE for ; Wed, 19 Oct 2022 12:00:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232206AbiJSMAi (ORCPT ); Wed, 19 Oct 2022 08:00:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44156 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230452AbiJSL7b (ORCPT ); Wed, 19 Oct 2022 07:59:31 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 77B3315789B; Wed, 19 Oct 2022 04:37:50 -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 ams.source.kernel.org (Postfix) with ESMTPS id 34371B822F4; Wed, 19 Oct 2022 08:46:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A3018C43144; Wed, 19 Oct 2022 08:46:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666169189; bh=AiLPool97ac6QJnM7DRsza2LPtxoZixDl189oVIKvvA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uoP5dakS0MGphAo51a650t5GigaCXftZrDh0Vbpj1MdI/raWrxzsuZZHnpt+u9Ucv BWimSPYZCV17/CjfrAdna3bBRUjJD83PTKskTp/wl/ki3f5TFvNIiLglORpwoFFtl0 y+JGhXrdByMwH9Dlfuzi4v2U6rnGYJLNCmkQhbI0= 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 6.0 187/862] drm/i915: Fix watermark calculations for DG2 CCS modifiers Date: Wed, 19 Oct 2022 10:24:34 +0200 Message-Id: <20221019083258.226689974@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 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 ccfa6d35f9233702c924316cdf40c05b6ce88113 upstream. Take the DG2 CCS modifiers into account when calculating the watermarks. Othwerwise we'll calculate the watermarks thinking these tile-4 modifiers are linear. The rc_surface part is actually a nop since that is not used for any glk+ platform. Cc: stable@vger.kernel.org Fixes: 4c3afa72138c ("drm/i915/dg2: Add support for DG2 render and media co= mpression") Reviewed-by: Juha-Pekka Heikkila Signed-off-by: Ville Syrj=C3=A4l=C3=A4 Link: https://patchwork.freedesktop.org/patch/msgid/20221003111544.8007-5-v= ille.syrjala@linux.intel.com (cherry picked from commit f25d9f81a8e09ace4f04106995550bae1f522143) Signed-off-by: Tvrtko Ursulin Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/i915/intel_pm.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) --- a/drivers/gpu/drm/i915/intel_pm.c +++ b/drivers/gpu/drm/i915/intel_pm.c @@ -5311,13 +5311,17 @@ skl_compute_wm_params(const struct intel 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_MC_CCS || - modifier =3D=3D I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC; + modifier =3D=3D I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC || + modifier =3D=3D I915_FORMAT_MOD_4_TILED_DG2_RC_CCS || + modifier =3D=3D I915_FORMAT_MOD_4_TILED_DG2_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_MC_CCS || - modifier =3D=3D I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC; + modifier =3D=3D I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC || + modifier =3D=3D I915_FORMAT_MOD_4_TILED_DG2_RC_CCS || + modifier =3D=3D I915_FORMAT_MOD_4_TILED_DG2_MC_CCS; wp->is_planar =3D intel_format_info_is_yuv_semiplanar(format, modifier); =20 wp->width =3D width;