From patchwork Mon Oct 24 11:27:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 9800 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp554756wru; Mon, 24 Oct 2022 09:57:59 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6X4NBvEssXlKQirvnT/gBAEvH1Y8IMKqrfKjgZ8Ly/V9uegkhLusZPu6BorVIHuKHWuX5U X-Received: by 2002:a17:90b:4b4b:b0:20a:926f:3c2e with SMTP id mi11-20020a17090b4b4b00b0020a926f3c2emr38453037pjb.87.1666630668563; Mon, 24 Oct 2022 09:57:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666630668; cv=none; d=google.com; s=arc-20160816; b=NGtYBM9Ck3ZvEaCD9kJdAYnCas131zxmZhfZjShASCrk5Q3ULt1NfvmREratU8d8pb LqN4rt4Xp4vYuZLTMYHdweh7Ip8kT/jHPz5gznOhJ0z0pOyNnXoGaQTtLgW9JKSO343C PK6SJwkh3B+QekGMyQzyzyBiTVpKnFqzV2oiIEMVSiGihM/itEheBwI8yF+KGV5D0mEG LjIruAiuwoPhjTXAtjHMu+Le384/psbljQWAjZXePuvdTU8esKqCp9NDA7ALctGvXYi8 I09STQkqFEag05oyPrm5wE1gShDxw7b6Kwk4MtknIfuKOCqn8iXzTCl7GGOTjSrKSpBJ 63dQ== 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=FXriU+n9pzirtTJTNKJAynagCjdb8B6eawItGdp0ilw=; b=GdYeQtaZyai4KjGlemlUTLlijE3hE4sl2RYn+8z8w+/jQnoRAZ3qiy6l77fv5EsPmn mf8Iadui8koUt5tXVd6mv6UL6e1WlFFxAFXeB4IY1FJDNNP5XKtI2f6jBGJFGMq0sGMi GJ28UMxsHb1ZjJMg8LqKizhXVH/pZEu231p3Tk/o2KbDfCiTivl9UksbScOv+zWxizii cmVET5u3QueHUJfZiGlPNY/M+ab8KG9yGw5aQXqXY3wNaR7b2mgzEhpYLRek6JTs9oIa JwRHZQT9pGMHwOA3T6Q6fw3zmOge9EuO9DsU7DqE+cOiArsdrLcH4R6Oywx/OH4U7yE2 mmpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=midfbP8m; 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 l19-20020a17090a409300b0020a71053a85si356360pjg.143.2022.10.24.09.57.28; Mon, 24 Oct 2022 09:57:48 -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=midfbP8m; 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 S235054AbiJXQrH (ORCPT + 99 others); Mon, 24 Oct 2022 12:47:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52298 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234936AbiJXQpj (ORCPT ); Mon, 24 Oct 2022 12:45:39 -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 BD21F175A0; Mon, 24 Oct 2022 08:31:17 -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 17315B818F6; Mon, 24 Oct 2022 12:39:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 711D4C433D7; Mon, 24 Oct 2022 12:39:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666615195; bh=oHdiTEUEGe47W3cAi820NXU1aWR8btKkNh43NEcjkew=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=midfbP8mhAPK/LBEv+CQmQEPyY+2+gISgEjPVYe7igXET53WZZt1AbkOqbixa4Cpd F9vgWtLu4klGBkM271GSE4kJli9iIz+aCx6cfRsvTp89O5j8zIvIcnoFxC1AX61SCo Pz2FalpIqPIfrA4Y1ofibosfNt0M76qKBM1qw3d4= 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.15 131/530] drm/i915: Fix watermark calculations for gen12+ MC CCS modifier Date: Mon, 24 Oct 2022 13:27:55 +0200 Message-Id: <20221024113050.984527588@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221024113044.976326639@linuxfoundation.org> References: <20221024113044.976326639@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?1747588920158525170?= X-GMAIL-MSGID: =?utf-8?q?1747588920158525170?= 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 @@ -5403,11 +5403,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;