Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp873977rwi; Wed, 19 Oct 2022 04:10:14 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4pWoBiRed+X+qPuk2jWc9PxXFPsEF/q22ffSbEgf7Qgv4zDCw99nsWzw/CiIbARC7RVaUL X-Received: by 2002:aa7:c509:0:b0:458:cb1f:b9e1 with SMTP id o9-20020aa7c509000000b00458cb1fb9e1mr6836654edq.369.1666177814607; Wed, 19 Oct 2022 04:10:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666177814; cv=none; d=google.com; s=arc-20160816; b=pza8R8HVIIZPIT0L2oMHJZe335z/8FDXrjlwF42ArQBwrYk/wGYiB12Wu4GYkmVeyl ZHmkqfKfsDLeU7yywJGmZZ3dAfzel/2dMCL76DCbrzojaoGfJEDegEvPbqI6k3xSKncA Nm7cwvFYPuo/T3SMJa5an2pcufHJ9VY2rpcMWMl/JQM0MQRVFEeYeD120F7mUDSv2sIJ IPKe7mzr0QHlQgH8c2JPGmfSo0UJN3fxaZGp3D6jbFe+GMzmm1oRY9iocDI2E/Fv5JEo cFru+SHGJjU4ROCO3BjzpijzLtDkLNKsQ8Hh2vgmI63Xwo0mNo/eMsrXxWejSs9xuLOP peUg== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ne22-20020a1709077b9600b007701a050273si15789867ejc.942.2022.10.19.04.09.47; Wed, 19 Oct 2022 04:10:14 -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?q?Ville=20Syrj=C3=A4l=C3=A4?= , 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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 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;