From patchwork Sat Oct 22 07:20:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 7231 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4242:0:0:0:0:0 with SMTP id s2csp1090656wrr; Sat, 22 Oct 2022 00:47:59 -0700 (PDT) X-Google-Smtp-Source: AMsMyM756cmjfj5X7S0HTAiKVuJmDkPMteyBn0j9BPuFkSX/uy8yuJAImuG5A3KSqL6FKY0tVFiC X-Received: by 2002:a17:902:e54b:b0:186:5fba:13a5 with SMTP id n11-20020a170902e54b00b001865fba13a5mr14096478plf.173.1666424878884; Sat, 22 Oct 2022 00:47:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666424878; cv=none; d=google.com; s=arc-20160816; b=ansLy4e/DaC43lzqf5Uq9mICR+0MNWdOhj2xJdqNJzkQMzhfOf0tOAZ/RK4W03ugB2 zdiLTI/15uBbbb84q5E33aE7p+pMBElQae+HBCSxhTaXT24zIm1yWNBPRbLO/OYLU33H B/ECTSLQZhlcud0Wbgi4Xar5VC9Yzaiv/M8jaP2YLdup1QuBGVh6/n2Q4JUS7gxI0R6q dCSFUC0rvQvMYQzoUq0LFa2cvluVfHWryi8Rsr8ghO4qNKzQ1Pg987RIT9vCw2DbpcHP LkivTpv5hcbe9eLHM4S5V6gQN0ikTtgnKIrDCmBF54aLKW6A4xysr+R+cnPClT0XEYHm De5w== 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=YoDlSgOYdnKkVbgtp9dY3J0vjArN/7g6Bs0IlRuLaow=; b=IYrHaVt+elsLBskAWbOEhGRyT+kPFSCHFnT/9qIqZoY2sKmi8VapjWsoUP6lC0q4c9 qySWdoDVvcGhRSOIu2fnKbm7uge5Ca3AFQwmX7gkqVe2Ce2oAJzkgBREwSHgz07v1PnG vGRk+iqosZfxRPrDOZSnhVmuEL7QS6k6aau1ck5jVfc/Tt1vLU/BQt3Pxc3CrzRqqiSF REu4xbNaSjzdQSy+oIhRS8bVwvKN91DlUSKO2SssUuJgJJQIdEBry6ted+PNpb+uVwT2 Zbh9KNtz7AE8KM/vcDcWF6G8MuRwFiXOiY6xV2ej07GwjH3WbdqVT7CBhlanpwwOBtAl 0rvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=AC9W0ZDR; 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 f2-20020a655902000000b004599da2b2b6si31016325pgu.716.2022.10.22.00.47.45; Sat, 22 Oct 2022 00:47:58 -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=AC9W0ZDR; 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 S231555AbiJVHrN (ORCPT + 99 others); Sat, 22 Oct 2022 03:47:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47100 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231262AbiJVHpS (ORCPT ); Sat, 22 Oct 2022 03:45:18 -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 145D625CD82; Sat, 22 Oct 2022 00:43:57 -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 36298B82E04; Sat, 22 Oct 2022 07:43:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 86F65C433C1; Sat, 22 Oct 2022 07:42:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666424578; bh=DvEyzZ9sfH9VpHDOP+FLW9z4h1snXVO5eAxm/oX/Vt4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AC9W0ZDRQahtqcW7dxKrGXfp4oenfeHbps1Ln4ADeqDSTUqKtYrRw1qXpEfu4mhzE +xYo1CuhSM7XmmKvqJeAquzb4nU4BiDdSHeLb0PJA16tkOxTrKX4f58YNiuIN2PLo4 HfKISg5ZDdp3imgTM5FvN3lAfQDBr1xTO26kYm70= 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 168/717] drm/i915: Fix watermark calculations for gen12+ RC CCS modifier Date: Sat, 22 Oct 2022 09:20:47 +0200 Message-Id: <20221022072445.244267403@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?1747373133969865384?= X-GMAIL-MSGID: =?utf-8?q?1747373133969865384?= From: Ville Syrjälä commit c56453a00f19ccddee302f5f9fe96b80e0b47fd3 upstream. Take the gen12+ RC 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: b3e57bccd68a ("drm/i915/tgl: Gen-12 render decompression") Reviewed-by: Juha-Pekka Heikkila Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221003111544.8007-2-ville.syrjala@linux.intel.com (cherry picked from commit a89a96a586114f67598c6391c75678b4dba5c2da) 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 @@ -5307,10 +5307,12 @@ skl_compute_wm_params(const struct intel modifier == I915_FORMAT_MOD_4_TILED || modifier == I915_FORMAT_MOD_Yf_TILED || modifier == I915_FORMAT_MOD_Y_TILED_CCS || - modifier == I915_FORMAT_MOD_Yf_TILED_CCS; + modifier == I915_FORMAT_MOD_Yf_TILED_CCS || + modifier == I915_FORMAT_MOD_Y_TILED_GEN12_RC_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_Yf_TILED_CCS || + modifier == I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS; wp->is_planar = intel_format_info_is_yuv_semiplanar(format, modifier); wp->width = width;