From patchwork Wed Oct 19 08:24:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 5320 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp285338wrs; Wed, 19 Oct 2022 05:07:37 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6y2PQ9g+vENkHAdaUnXfYu6i/2ORwVNGcNa7Jpv/9bakoReP79pj9U0AC0gqpi0i/py7OB X-Received: by 2002:a17:906:fd84:b0:730:acee:d067 with SMTP id xa4-20020a170906fd8400b00730aceed067mr6558417ejb.206.1666181257715; Wed, 19 Oct 2022 05:07:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666181257; cv=none; d=google.com; s=arc-20160816; b=st9UxUUOPvgpXjvH84U6Qz2VxL8WQMhmhBodZm6zsoGZhnunLyIFBF/9zALsxXCNZ2 TlUy2DfxI+mIy4FnWCfzGaWaz88j5qRoC1NsCrahk0Il9f571iL+5llnXQqSNkzi07Wq PDTb7gof5rpI4v08yx7sSotRq9GY4yJLhcvZaey49D8fTklLg1o5lT9yF3h2rAVshvg/ XY7AK5EOTBmCVpPStW3hCvYualzGwj0MShaeac0QVXnMdUtLOC88OKBLMoAmbN5MfrO8 uQDfGXQZffqYS+e1Vx/Z0XiymnAnPVPjbR3yu2PnpLjAMKiFgkCZgWEdqYboKYxx4/+P bCvQ== 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=CWCFqbO1zwuP0eNKHLcZhMwSilKpIRAF1U0CTv0G83Q=; b=ryjELJgBeqXneyQ2c72ny2qHYnGh8ZxIYnRVimKgbHMr19N8r+kUogRr5cGUK0QbJv Ni/gpsGHIUP9JefpMQ17zwLK7oMXDt711/UznPuX3nmEhiS3YewxpG58x+gGuSA4EidT i4ObuW03pGvdFsexPDpn7ltKlw01Rq3tI12i08DJ58uSu693G1TknPdgZWnBVpe9XtT8 TQzl3YMUIpHY0GW8YxfenLLWK7Oxb2lDd7voQIt6QeIQhIWzlcjZk4kmHHS/CjrQICiq iORaQRCbAkq9mDIeD8WpbRyuuxaIEy7/6CiSHsN3t0M8NzeJQRCCe7Cv6uaZEEElpdsq VjsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=uoP5dakS; 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 qa43-20020a17090786ab00b00782b261ea1asi13510109ejc.67.2022.10.19.05.07.09; Wed, 19 Oct 2022 05:07:37 -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=uoP5dakS; 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 S232185AbiJSMAe (ORCPT + 99 others); Wed, 19 Oct 2022 08:00:34 -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?b?VmlsbGUgU3ly?= =?utf-8?b?asOkbMOk?= , 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 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?1747117678423796662?= X-GMAIL-MSGID: =?utf-8?q?1747117678423796662?= From: Ville Syrjälä 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 compression") Reviewed-by: Juha-Pekka Heikkila Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221003111544.8007-5-ville.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 == I915_FORMAT_MOD_Yf_TILED_CCS || modifier == I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS || modifier == I915_FORMAT_MOD_Y_TILED_GEN12_MC_CCS || - modifier == I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC; + 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; 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 || modifier == I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS || modifier == I915_FORMAT_MOD_Y_TILED_GEN12_MC_CCS || - modifier == I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC; + 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; wp->is_planar = intel_format_info_is_yuv_semiplanar(format, modifier); wp->width = width;