From patchwork Wed Oct 19 08:24:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 5136 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp252005wrs; Wed, 19 Oct 2022 03:53:18 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7HK1wI2BlP4eVbA5b+W7lYRJwkYyQK/sTtXEglTjgZnVtOs9Aw3huL5yUWM+UqGWtLw7rD X-Received: by 2002:a05:6402:c45:b0:442:c549:8e6b with SMTP id cs5-20020a0564020c4500b00442c5498e6bmr6878136edb.123.1666176798701; Wed, 19 Oct 2022 03:53:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666176798; cv=none; d=google.com; s=arc-20160816; b=n41lXpaCvG/j4MTiyDEgPERD7vQKyHlCJxuisZyq5y7ldqvHQSgM4pE/VLcahdqd/E ahHcYEJutBxAsq1bMsXJpPPreHAaGN8ye8y3+zLlJixjQHz2EINN677KvyOWGPDuDP4/ 5WC3odeJ2YhrsvM4TpNgrxGpB6nU9iDUQ21tWHMkk5GtveUKO1XVys4RGynUBfZHuRG7 swCVdN/WqgAJpGblf6TMHBZ6klJBKYG35H/y/E8ld/lXQ4JfXWTccidp48ESq4isvP/X IkEqc0dDWZL6dkxrAW7C4XoeaBTVA/vJVuJElqENfPgFpERQoOZaH7v6k8gEgKJn7oyl CiJQ== 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=p0J+yYnrCxm9EZhXT1g5tdmVD68IzTcQ1xxDMVpeUZM=; b=BXxNvY24Fljpi9rmQWuEEH7b2wUkiw9obailoLI7RgQdGACIEd7S7WkPUl16bDbCQv qGv0nDF6FfT2GO7jDURA0QI6QBgWlifxgUo93xEvlJ5OBu0QSXGkThwcsWnaskp7Bz1d 4txPqOnNdibC/okXbsn6ZHs8lBvppqJPbn3+plHXBGCMIMk5Oif9f9Zr3lhpIokjuzbn Tr4zOS0xT9Yu7G/Irj9ZeVxecxZk5qo1brzH7hPtxsqXl9qzyJeQzqBySf/EUWVM9Icv 9sOtCvlVUspfMqgom6CdFjr5l+jh2f1jyyKVgJK/FUS9H9FK4cCG7XSspgM1sQ+De2Iq KvWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Hb5NLcPH; 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 md8-20020a170906ae8800b007828388864dsi10889755ejb.692.2022.10.19.03.52.54; Wed, 19 Oct 2022 03:53:18 -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=Hb5NLcPH; 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 S234201AbiJSKu3 (ORCPT + 99 others); Wed, 19 Oct 2022 06:50:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53968 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233331AbiJSKru (ORCPT ); Wed, 19 Oct 2022 06:47:50 -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 E3B881162E3; Wed, 19 Oct 2022 03:21:56 -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 6F291B82318; Wed, 19 Oct 2022 08:46:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BD0B7C433D6; Wed, 19 Oct 2022 08:46:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666169183; bh=PmWEDGHSBbioyrBpd3fr99GqAeaSC72l+k2qhhNiy2U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Hb5NLcPHyV96D6I4zQksXya5SY7QanhzDhwDpD/Z/w7hitOj+PfsHRBnBZFZbPblB PK7MRv4oajKYwXjTUPAOCyL3U3/G9Qyg/Bw5hidoijMWuxL2HlLeWprVZ9oAy12OVr KoVxMoJntMZ8rr6kAQ7Ghn72f+TGOU4aiVzHV14E= 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 6.0 185/862] drm/i915: Fix watermark calculations for gen12+ MC CCS modifier Date: Wed, 19 Oct 2022 10:24:32 +0200 Message-Id: <20221019083258.128341743@linuxfoundation.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221019083249.951566199@linuxfoundation.org> References: <20221019083249.951566199@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 X-Spam-Status: No, score=-7.4 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?1747113002766772884?= X-GMAIL-MSGID: =?utf-8?q?1747113002766772884?= 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 @@ -5309,11 +5309,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;