From patchwork Sat Oct 22 07:20:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 7281 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4242:0:0:0:0:0 with SMTP id s2csp1092186wrr; Sat, 22 Oct 2022 00:53:17 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7SrIA4WtMT9o0UdBpYs/Qs+xbeQT3w8Uw0wS0vstpz42qBiDfqs3AYOV2i1Hase62j7E/Q X-Received: by 2002:a17:90b:4f8e:b0:20c:c3a8:38b with SMTP id qe14-20020a17090b4f8e00b0020cc3a8038bmr27236523pjb.10.1666425197312; Sat, 22 Oct 2022 00:53:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666425197; cv=none; d=google.com; s=arc-20160816; b=Aevh+oomjOz5UTarG8m5ToETZyk7e71e6l3wPzrSTGjluZtz+6hgNPrGiqRFAqv0XM DEQQ1geRvCtc9RceqdNuHBOLsgZDdQcahz8EtX4WT3Ojke1ZqQAP/PgY2ZqfvoDsaSaT 1b9+hKHklRoi91vbUNYTyHgh5C2gh6rsT3CifhYayNFNdSDod4xYlCtpeCnb6OEOSw7L fxt0rQPiWH42K5DYxT94u/ZidjAH4oi9X2ISxMe5zdn7IohZHtegSHXL7a6GleWG4I/r AVLYqJyHIGC4yL2i/y6Z0xbpIuQT+tLjBGA2mVEim5W1m3YP/m87w2Oxo2SBpsVrfaYi uHhQ== 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=8Q5BEf2U9duu+/iD2L1OpROessPTyAyvDiV+pnQhCII=; b=wf5E23zd24DZBU0ZvMXOLFraDfFsTUMh1WEeUJm2+T5ONDDZZ1VX/ZgyhS883IZOC4 nccUwGwmGhSFGY0fjmS+w/icGKR2jzEaDp7bIiBzl7FVh/pn+lvQqbad+/zw54I34gMn kLCOYo9rbINdfqDR4TsyTRQiFLYTcaHfN8GtuiNC0OFG74xrb8qAjLaLffmm6HBawkVw aFY3eIisWtjWqnHxNrtuoYIF5k90ooK6fIDzIWHq29lb3LwFgrx1igWEiTt8bBRqqouU SEnnREtRWcboI4om6zqEg55MsB88xPM+N8l4c6QdqCxF/eBcu/PdQd3EaGhjbTtUvTj5 Td4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=P1T9xaAm; 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 v64-20020a632f43000000b0046b041e1408si26873193pgv.744.2022.10.22.00.53.05; Sat, 22 Oct 2022 00:53:17 -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=P1T9xaAm; 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 S231842AbiJVHwp (ORCPT + 99 others); Sat, 22 Oct 2022 03:52:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49560 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231362AbiJVHtm (ORCPT ); Sat, 22 Oct 2022 03:49:42 -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 EEC5AA3BAF; Sat, 22 Oct 2022 00:46:07 -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 AD7B460AD7; Sat, 22 Oct 2022 07:43:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C0C90C433C1; Sat, 22 Oct 2022 07:43:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666424584; bh=3PR6sUObPij7sEd4A9yXYTD7viHJGZI8dn9CQg8XTVw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=P1T9xaAmWYKQT6mNc3MjKSvmfXEJcbBKiMA2bGnsMsjBNXzrFzJhMfwxF0DGs2il2 lTPcJEjNdDwJB6GkRwkJs9lcEcChA2CmHZ9use8Jw0tH1WapR5RRI20jf2foZgpwWr xr13ziZDrUb2fWD8XKc38ycOEWZzQVe0v2nHwGGE= 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 170/717] drm/i915: Fix watermark calculations for gen12+ CCS+CC modifier Date: Sat, 22 Oct 2022 09:20:49 +0200 Message-Id: <20221022072445.587997579@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?1747373467675787874?= X-GMAIL-MSGID: =?utf-8?q?1747373467675787874?= From: Ville Syrjälä commit 070a2855900de17b1e11a0dc35af9794e80f1a28 upstream. Take the gen12+ CCS+CC 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. Cc: stable@vger.kernel.org Fixes: d1e2775e9b96 ("drm/i915/tgl: Add Clear Color support for TGL Render Decompression") Reviewed-by: Juha-Pekka Heikkila Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221003111544.8007-4-ville.syrjala@linux.intel.com (cherry picked from commit a627455bbe50a111475d7a42beb58fa64bd96c83) 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,12 +5309,14 @@ skl_compute_wm_params(const struct intel 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_MC_CCS; + modifier == I915_FORMAT_MOD_Y_TILED_GEN12_MC_CCS || + modifier == I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC; 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_MC_CCS; + modifier == I915_FORMAT_MOD_Y_TILED_GEN12_MC_CCS || + modifier == I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC; wp->is_planar = intel_format_info_is_yuv_semiplanar(format, modifier); wp->width = width;