From patchwork Sat Oct 22 07:20:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 7268 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4242:0:0:0:0:0 with SMTP id s2csp1091870wrr; Sat, 22 Oct 2022 00:52:05 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6kf+S5LCFmRnXaCkMsvOya2Ca/tsD/xWlKk4oBNll+PBTYEuaGn+B7IoU/GCYxgXqMKk8D X-Received: by 2002:a63:4042:0:b0:43b:ddc8:235 with SMTP id n63-20020a634042000000b0043bddc80235mr19739362pga.498.1666425125363; Sat, 22 Oct 2022 00:52:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666425125; cv=none; d=google.com; s=arc-20160816; b=nhWb4Eta3E9az6nuQx1S7iLMPGqIDbt22ApA8OZFE0U2VysP/a9t8wjpBIuFfSgQ6x JjG5QvjgplTLlk2L3/azlJAoTmoxeY5qfZrPbciRrUn4DTBV4OgyC8vbwWLxxsVPdJ2q aL0NnWkXNK4KIe36IoAli9hxIB5PQxVSz8iSsWiMCTsGfh6TfsGWVN3ok0czDUY5/+EZ lRQNieK3/c2v7/jbvCPlfDyo5UMicxpshVj5NayFGnA7M9VzPl9hI7Mk09W4Lz48QL7y sAPFmkoA+VtPi7N+kZXfTUNfcZGkmt/IsjHuUjj+mBBl+9vUq9qxZdKbP/J/c7xR0sXm q4FA== 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=w0FY3vWom5k6wRs68EOn3mFjR3cFdX6TjpkYt8Qgb5w=; b=pwEPOsilUhy/7+CwCVYZcxt6U0uwnt3lmeLrO5MhrHOZ7ui9JkFvpjm0OF5pltLsRs 1C83eiPsn137UI0sgAUvSEzF1sdEspTL7bavxZbSOcKLtquLDGZD37hVh1/AJrWD/UI6 wRBb47DNJliAbTu2If/p03amq0UymzotMFff3PQ8ZM53n0QWf/wl9A6Q5CULwRNH1QtW S/sL4VTa4v7+gWooudrCgdSRaOxUu20/ToHw8TQCF62u/epAFeCDCbQRChi9k6yLq8XN 3kehl8MkSBWhM6G/liq21Ua2nWZs6Tarl8Es2BLSMhbHYkA7iQjO6nacCcJju3I7+kt5 v39A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Bi3yPnJX; 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 190-20020a6300c7000000b0045ec918ad31si26203827pga.544.2022.10.22.00.51.52; Sat, 22 Oct 2022 00:52:05 -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=Bi3yPnJX; 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 S231886AbiJVHvY (ORCPT + 99 others); Sat, 22 Oct 2022 03:51:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35676 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231836AbiJVHtU (ORCPT ); Sat, 22 Oct 2022 03:49:20 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BC8382B4EAE; Sat, 22 Oct 2022 00:46:05 -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 0D47A60B9D; Sat, 22 Oct 2022 07:43:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 225A8C433C1; Sat, 22 Oct 2022 07:43:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666424581; bh=TdOSGO9Ccl+FvN9iBcVOLWtEUIl7cDbZqMnC7k3x+jw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Bi3yPnJXv1fN8MX9t0ryROMv79NfjMXhwdaRBl7s0F5y2/Hf/YPtSEUgqCqOQ4TJ0 tvXR+blUExaGBxuub8ADuD3YwWxygEjPUqbq1Ryx1RZl7/0aiKzmBX3Oa7L20A8kfC W4G9jmCxDb0UjukkX0Y9Ayb00CE2osZ5VE61bxvc= 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 169/717] drm/i915: Fix watermark calculations for gen12+ MC CCS modifier Date: Sat, 22 Oct 2022 09:20:48 +0200 Message-Id: <20221022072445.427693683@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?1747373392144256969?= X-GMAIL-MSGID: =?utf-8?q?1747373392144256969?= 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 @@ -5308,11 +5308,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;