From patchwork Wed Oct 19 08:24:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 5111 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp250896wrs; Wed, 19 Oct 2022 03:50:19 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4zSszH0BK77rOz/EZiwK1i0AXQ++rvCx9oQWKP7rbg6yG5cMcEFk5QSghNBQFs+UyzWTHa X-Received: by 2002:a17:907:a46:b0:782:1c1c:8141 with SMTP id be6-20020a1709070a4600b007821c1c8141mr6077739ejc.549.1666176618858; Wed, 19 Oct 2022 03:50:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666176618; cv=none; d=google.com; s=arc-20160816; b=qF3lG9AHiAdMCqlMwxifHvrOT+iS4/9jaNpHR3S/mm2lU4whkrgiwcO3IMQ+rL9ws5 jzDAQXYrC+Twd+wLze/tZWQkKuXJwxVjNRsLQ6du0dBSrJwTW7kbfWNRKKaIwKkJ0sEV gh8ZGk+zeKJFxNs/j2zcBPhXz+l7UxGAmq0/C1tORysN2FvIhd3MJktXpo8Ymw/Hhd0s F/FPAYwjiJL2hQG7ZopWhyVWH6Qys8W2He4Jm0u6pxwq1BwkHFkJXsxtBEGkLOsMfWzd a/zUxEw1kEnpQ5DldLZLNUiL6k3mEw2mCmsZ+ZNe51jZuX2DJLV476Nl4SImHAjO/GRw qstw== 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=cQA17N2pvVjeYoPpZEPdWSpy9WeWydnNAZKfhbHDMug=; b=SbY8lai/0+uqpl8MSYenbNDhkZScX7cJRlVbe/sJsgSgOlwLj9kCO5VK5JkP8AIqtf lUzWgvT0x5N0y/KMDIa+eEHMFG5KmFHTBVjkUpGm9s7XIkr0enVJ6ARdmjzQdvTQwmcZ J0HbfdlaPDrOPlHtuQnVA9X/75heAFz18Tt0Ib04zqri2QEoC2cvYYbvtyUrhCH7PbKZ Lr+dCIKZj2Ksp7OoDOlAYGkG1kHVfum4ItWwsl5bmMQzPRwfwUIhs3b8SLmHvFl92eoW t76YjnKX9IsFGiViF13eyzwceKv6nvBnrYQp4ZOXsgGUQrp1h498/Z74INP/OjKkWMpc gJHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=IynA3pYS; 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 a1-20020a1709065f8100b0078d85777c4fsi11175263eju.700.2022.10.19.03.49.53; Wed, 19 Oct 2022 03:50: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=IynA3pYS; 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 S234144AbiJSKsN (ORCPT + 99 others); Wed, 19 Oct 2022 06:48:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35434 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233068AbiJSKqF (ORCPT ); Wed, 19 Oct 2022 06:46:05 -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 765DE159D70; Wed, 19 Oct 2022 03:21:29 -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 B4C8DB8231C; Wed, 19 Oct 2022 08:46:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 107C2C433C1; Wed, 19 Oct 2022 08:46:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666169180; bh=xwHQWNsYn3Or5OrXrKPv2yIcVls6JsV0g5IlJbwGUS8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IynA3pYSUbjqRuQxpAKKs4coJLLa3EiNUxKLQg003943wuje0ohX70KAwIur/64qm Hltj1HEdd2hlHDN75kjgEoqQOjrkX1AFrgeexqQLhRzpHmedWtwZP7tioKH6Ys8TSE +484mCldzuKm4kYUnGTEiThRJPsp0sJfw4eECH/Y= 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 184/862] drm/i915: Fix watermark calculations for gen12+ RC CCS modifier Date: Wed, 19 Oct 2022 10:24:31 +0200 Message-Id: <20221019083258.084124043@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?1747112814361702624?= X-GMAIL-MSGID: =?utf-8?q?1747112814361702624?= 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 @@ -5308,10 +5308,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;