From patchwork Sat Oct 22 07:20:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 7216 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4242:0:0:0:0:0 with SMTP id s2csp1090350wrr; Sat, 22 Oct 2022 00:46:43 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4VtC2BLSEV6ZeemTpaVEzZQQeLrAU5SYDyASo8piXmdpfQycq6boA2svi8aWY1crvw/VMe X-Received: by 2002:a05:6a00:1414:b0:563:ae66:3103 with SMTP id l20-20020a056a00141400b00563ae663103mr22786996pfu.17.1666424802780; Sat, 22 Oct 2022 00:46:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666424802; cv=none; d=google.com; s=arc-20160816; b=tMGC0fcFr0WrMFUbl30A1f0RWUDWtcwJE0GV2J2OWiZdZUs/846pooqtMq7QQ3sSuy 9N3jPGQUcqtVZTVBM9bwtMkL3lI/UkhMP1r1la/sFOUtpaMmoUeT9KFLa6EV+pFvRn5I MchnMLWbu2xpiiL37rQH3ijXZXcdpodL0n0mfViLMcBXmr3VMurbDjiPIRQbMH/p54Su AId9CRzcAyMz5P+92njBvwzQOMZ9u44OaId1amS5TTe6wvQBtzT5qgv5EeILbI2ujx3G zir4y6tB/0EmG/4BNsJl/npKX+peFYsTsM/h6hHZwJQqJn1ucjaTi5jcwm9dpnC9jEl8 XupA== 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=X3aFyGMB7j/oADFaZNI4FxmP60Ldw5BRUmiL3biwm24=; b=KmRxZXTxkfp6deZQ2EUVh5wyquYat5MkNEWHAASAyRKNdYDdnp76pTtzMnvjp+ado2 68ZHkdZ+B/Tb9MiWqtMvttfQIfYCDUkrtusa/QKCGvWtAOVbf81hRXT0FXVwIvko22PW 2KuTz3/Vfh2JaJKXbVD+8ZjbmkR8YF8F6qK6L+3cOYC7R4715grCZsEgD2aWW4/cFtPe F2fNvN6HZS9i2//zBD4H1ntq/D/HbfO00b14lEAgbNDenIZA56L9rw3Vfyqk+8gyqyNq 5Z5fF4MHKrugasNTAwfyBkXHz6waGoM6d2+LLoOF/3UKWzXFmlF8boIe8mdr5R+DWgn/ oYWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=M0EFJcci; 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 x22-20020a63fe56000000b0046eb96a9955si4687520pgj.576.2022.10.22.00.46.30; Sat, 22 Oct 2022 00:46:42 -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=M0EFJcci; 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 S231430AbiJVHqK (ORCPT + 99 others); Sat, 22 Oct 2022 03:46:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45918 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231461AbiJVHoN (ORCPT ); Sat, 22 Oct 2022 03:44:13 -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 E29C024E41E; Sat, 22 Oct 2022 00:42: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 8ACC3B82E11; Sat, 22 Oct 2022 07:41:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 01325C433C1; Sat, 22 Oct 2022 07:41:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666424506; bh=vDh+4og9bBnPj3fOvVgtxmdHkxQfnDXV9tv1ixuoxjo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=M0EFJcciNZPZurLKtKHJLA+wgQbm0zqErRdvc8bR5ro39mP8BZ6BdPSGVv/W0o3ra OHd6wJrvfxISBEg7ywKWTWfhmR7cFkE41Z9erClLbRikchw0GbQUb++OSuulyfPYaj 3GpGXTbZgpwUJh9BccZI6F2BceS8/9oF2ZcrzfKo= 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.19 172/717] drm/i915: Fix watermark calculations for DG2 CCS+CC modifier Date: Sat, 22 Oct 2022 09:20:51 +0200 Message-Id: <20221022072445.967040206@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 X-Spam-Status: No, score=-7.3 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?1747373053949192786?= X-GMAIL-MSGID: =?utf-8?q?1747373053949192786?= 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 @@ -5312,7 +5312,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 || @@ -5320,7 +5321,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;