From patchwork Mon Oct 24 11:28:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 9660 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp534508wru; Mon, 24 Oct 2022 09:11:13 -0700 (PDT) X-Google-Smtp-Source: AMsMyM72z71FuwXFJ/QMPeHH85DfZzvvLF5mkzOUSp/+r9NChLIshkaC9YIuS3poED3c5iGWxPto X-Received: by 2002:a17:902:e886:b0:186:6eea:cd35 with SMTP id w6-20020a170902e88600b001866eeacd35mr21817059plg.116.1666627872910; Mon, 24 Oct 2022 09:11:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666627872; cv=none; d=google.com; s=arc-20160816; b=QpmjiF5EgwkVLHd2syacyep00nCfpnit5gHEeYWuvzx5BTI+0ZnL1lRMzClEo2vDEw YYjeM/t9yy1QZ/6uwrNy74/ge9PBcPogGoNb2x/xexuVJ+WIhdamcHlZSkc2f0SiS/h2 ADRxj1NgaDKiSHTLFzuQP7qNJikcUkQjSGuKfxa+VPaedz9mE0dR/iMARhyQw/PvsieS U4sNFPIN6KqfhZ13QJT37hb4BFxLvOqi5nON+V9+T/hQC6oPaA1kkgJ3w0FrCIKqZHTX noe4MyYKGaCD2zIcg7oaJtkFDKpcGkvHNjDqo7BAXBopFyT9xS/5YCHSOWHVGKnGh9KM bE0A== 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=m94lW5Ts1A9msfu4A4wHJdGCGk82VyzjcsaQsTtydg4=; b=y/T+rDkXGjA/JnrbUvWeKH4QclrLSH5aTQnSkG+PSGDyC7dyuUicY1z97vslR4BDJh 2P0SVYG514uYWWnF4rdf59iwHiehPqe/SZsX9ptWXqanetjy0fyDcgOjDkLTP6W1X3Ax jbi7ruOPp/nT8lhClbTVJxcv+FuArwK63VtRlpvrKFo0yGSBWYcWAoMP3XIBKN89dY8Y Vct3ngn0EsdG9AI7WD2rBKirwncKlpb8qWPp0tCO3yGBip80XbPYOrj5NtlezA0I8LwC txdiW4hY0wKWu0KZ2v68Bhhqwcn/YQXYnAp869q8Drxtg9YvqGp+LL0GJ68GJ7eoBQQz 31Cw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="gJFjr5/G"; 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 b1-20020a056a000a8100b0052ee88f59c4si37165966pfl.372.2022.10.24.09.10.58; Mon, 24 Oct 2022 09:11:12 -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="gJFjr5/G"; 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 S233672AbiJXQJH (ORCPT + 99 others); Mon, 24 Oct 2022 12:09:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40792 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233646AbiJXQEv (ORCPT ); Mon, 24 Oct 2022 12:04:51 -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 5A8EA2CE04; Mon, 24 Oct 2022 07:57:34 -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 B160AB8162A; Mon, 24 Oct 2022 12:21:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0CE4AC433D7; Mon, 24 Oct 2022 12:21:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666614066; bh=r5FDIp291EgvdDjpw1Sd2GAdYsqzp0QZFybu9zO3DO4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gJFjr5/GRbIxFIY5+NJZtgCAk7fxvNOPYrf0QsMoXEJSy3RT3NgWOncHEZUs2zu8V Q0oluqB/JjX1BH+0fKYYz3tD59RqMAoaK/y9BIb1pa0/BcOTGblsL8ztotu/wkCFQj EuRCCKH0ov1Dox+kUHRUASKItA7hI2NUoWE0//Co= 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 089/390] drm/i915: Fix watermark calculations for gen12+ MC CCS modifier Date: Mon, 24 Oct 2022 13:28:06 +0200 Message-Id: <20221024113026.417641197@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?1747585988552158195?= X-GMAIL-MSGID: =?utf-8?q?1747585988552158195?= From: Ville Syrjälä 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älä Link: https://patchwork.freedesktop.org/patch/msgid/20221003111544.8007-3-ville.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 @@ -5146,11 +5146,13 @@ skl_compute_wm_params(const struct intel modifier == I915_FORMAT_MOD_Yf_TILED || 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_RC_CCS || + modifier == I915_FORMAT_MOD_Y_TILED_GEN12_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_RC_CCS || + modifier == I915_FORMAT_MOD_Y_TILED_GEN12_MC_CCS; wp->is_planar = intel_format_info_is_yuv_semiplanar(format, modifier); wp->width = width;