From patchwork Mon Oct 24 11:28:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 9076 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp445405wru; Mon, 24 Oct 2022 06:12:33 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5hE59Nrt2jaet5SaSyjwuhoSaSY/G3zE7pCmUVtKqgd7KrfDy/BnycFEOQzI1jR7A8BQOn X-Received: by 2002:aa7:8011:0:b0:567:70cc:5b78 with SMTP id j17-20020aa78011000000b0056770cc5b78mr29445293pfi.29.1666617152861; Mon, 24 Oct 2022 06:12:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666617152; cv=none; d=google.com; s=arc-20160816; b=dxDikkLmkuaPpJvdwGkx+bAApsmDbtt/NX22ZLlFFnKUu1/1FMAbNNVhzyqkbuB8u4 wSyF+D3h/p9T6zqW3okCCrvvTCyDBwviFv4k2QrHS/API3NbX8UyFVHdDxmxRKglb40P dRa6ttcdYcccucl8BpHaDK3AN+WjIVsRk7++XTWDzTnmZ1a14i7d4sESYdr/Dti3AD4S ytD3q7sFZkg/8P/Q/Ta+heEuLkjL/majkvaSktWFqb3Rv1hWed/oUvdpazBnm2ot0Xe9 8sDpNmCwhySgoBW4+DW7iXOzk6tpHAMxXxKeAJrbRgYlIjG1fM9Q6L9cDtj1Y/6ah1Kk QV/Q== 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=YcB3eGJe9e9p4paCQ7+AF3kP6H31XypoMrWouUy/IFw=; b=VJ/1qqPh7orSVq/pQ0kQ5BB7XKWqG8omaO63Bn4svMBfvm03WNF8KtlNskTS6P2l6H zzEFVTsS5OkEGphu2UgEQ070Hahuo06Gz/X43oWfvNAet7ORuM29rPGEaXE7JJO1+Saa LzupFPsZhE9SkvG25fkt4tRmP+iTq3Atv1QVkDOKUtl2Uim9BKwCTHcGlhWFmo+3Zrd6 bTYLoMVAS90tDBgSnzvoGg5VyVWzDK/b77hhUYIe5kyDdma0X/h26PBQxkbl8DTIo2E0 Y9NlugzQTp5g1gSihMoUeq/QEr60lTy8c8sWHrin5yjBuBEq0C7w9AsChve1i2yPXyMv htgg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=KyToFdnp; 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 u6-20020a170902a60600b0017efeb31274si31602835plq.507.2022.10.24.06.12.19; Mon, 24 Oct 2022 06:12:32 -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=KyToFdnp; 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 S235638AbiJXNL5 (ORCPT + 99 others); Mon, 24 Oct 2022 09:11:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54466 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235771AbiJXNJf (ORCPT ); Mon, 24 Oct 2022 09:09:35 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0DF2D9E6A5; Mon, 24 Oct 2022 05:23:04 -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 4F6546127C; Mon, 24 Oct 2022 12:21:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 60EBEC433D7; Mon, 24 Oct 2022 12:21:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666614063; bh=+8exnQkO5cPkK3GBupL+S7+UcQ06cZXA82c60+9X4Yk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KyToFdnph6cTVfpLIYAMdeTFDk+Cj4XfLob6oXjhnrxu2l4UiIejrxd45WDxmXKVO b4xqmKqeLgPEx2Ujxsbu7p4nKs3tofnRxi6JpgJXllAK/cZ8v0/N3FHz9D6bp1WGhq hFdJ4wyUNw5c6s1LzilVzPsEGD6bTrQAjJRXf9UU= 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 5.10 088/390] drm/i915: Fix watermark calculations for gen12+ RC CCS modifier Date: Mon, 24 Oct 2022 13:28:05 +0200 Message-Id: <20221024113026.377332060@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221024113022.510008560@linuxfoundation.org> References: <20221024113022.510008560@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 X-Spam-Status: No, score=-7.6 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?1747574747710972272?= X-GMAIL-MSGID: =?utf-8?q?1747574747710972272?= From: Ville Syrjälä commit c56453a00f19ccddee302f5f9fe96b80e0b47fd3 upstream. Take the gen12+ RC 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: b3e57bccd68a ("drm/i915/tgl: Gen-12 render decompression") Reviewed-by: Juha-Pekka Heikkila Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221003111544.8007-2-ville.syrjala@linux.intel.com (cherry picked from commit a89a96a586114f67598c6391c75678b4dba5c2da) 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 @@ -5145,10 +5145,12 @@ skl_compute_wm_params(const struct intel wp->y_tiled = modifier == I915_FORMAT_MOD_Y_TILED || modifier == I915_FORMAT_MOD_Yf_TILED || modifier == I915_FORMAT_MOD_Y_TILED_CCS || - modifier == I915_FORMAT_MOD_Yf_TILED_CCS; + modifier == I915_FORMAT_MOD_Yf_TILED_CCS || + modifier == I915_FORMAT_MOD_Y_TILED_GEN12_RC_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_Yf_TILED_CCS || + modifier == I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS; wp->is_planar = intel_format_info_is_yuv_semiplanar(format, modifier); wp->width = width;