Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp887263rwi; Wed, 19 Oct 2022 04:20:06 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4VM4YJArfoYNQQDbzim0pcF+c1xjFtuNOqtpLqwPMu7RAAK32i3Koo/wzmtj2b247Y1GUr X-Received: by 2002:aa7:9057:0:b0:565:d7dd:a453 with SMTP id n23-20020aa79057000000b00565d7dda453mr7791131pfo.33.1666178405942; Wed, 19 Oct 2022 04:20:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666178405; cv=none; d=google.com; s=arc-20160816; b=mMMbE/K2UyTbQ2/P4BSh9GcsE63xGvolbbSB6OLCjadzjq/f2nndGgN/DsCsspQTui Kg4WmhRoXtO7VwoxoaybXAoAxBPHg6CqyBizDycUjFlUNoDrX5OKxmtvucopGllgCAZG //5p/eo5MeIotzTfHigbx/3xnXCfL9Do2VcGuW8Csvi1kMx6/ZW6+7WdMZ6cfs+1p9rC ktGsriApH2CXP73S/tRwuDSp3YA1TiXGCSA8KvKl78816qF5sLyDxYHq31gCDWSiW2V6 dj6LyBhcL7QiNDSdlPsi/Mh3dQSI4+U+8CxKc3GaGNpVeLy4z+YgZwumZgMl0zJUL+Un sv1g== 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=nu5ru0hLTE8o+symXqVPbhNCKCyvIah2eh7AgF3o5Ww=; b=FtC34Y4Zam/o9zxjCTW3Gs+usysw74PxMKSYc/xUeUhCgv09Y7kzt+aotWZexnkWpI ewV+wUmIe0udlSbxXlPbYWT7TvPXHBYaMUB10QCFbHq85ErFI//yOtkorqux8Ai6/MtJ vOQUQ4pFSUcJhNA+qrl8AxbFvrN88WkwmW2M0Ak6ibCUdtYQ2XX9CDrWLwabS1K7EeJ3 Mx3Yg5ND8TnQu2agHfwmRSYIxggZIqRKx3VoCJlS1yNOSzfyts2zK0L4CXn0zj3o1a6F XhUgwY9jIVvxLefMGxWFllR8GYISvqUdosrntt6JGaO5VsSFw7ZIbWsSTkJgTJ/UTjzz s6Sg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=VBY99xI6; 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 w4-20020a656944000000b004370503d42dsi17900529pgq.554.2022.10.19.04.19.41; Wed, 19 Oct 2022 04:20:05 -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=VBY99xI6; 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 S233438AbiJSLGQ (ORCPT + 99 others); Wed, 19 Oct 2022 07:06:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53996 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232018AbiJSLFY (ORCPT ); Wed, 19 Oct 2022 07:05:24 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8D5E022BE3; Wed, 19 Oct 2022 03:34:44 -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 9DB4D61835; Wed, 19 Oct 2022 08:46:26 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A9F86C433C1; Wed, 19 Oct 2022 08:46:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666169186; bh=Wkw0QbIHnTEca00uSpzVXZ9ouI36rhpJUoG3jX/xkOU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VBY99xI6sYOe0GapNAM5Xh5otU5bzIC4UwchCaHheZ8GJiRxANAGfuHIOWdGgc4sO 4NQSYsYMtILwYR0nC4Tdt5LNJJzfYOlbA599nqeNTcv54I3MYq8K6O9vRcxp89wTuX jTz85fVbC26wZ5t263DG4czsZaW8D2XMIzgIJa88= 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 186/862] drm/i915: Fix watermark calculations for gen12+ CCS+CC modifier Date: Wed, 19 Oct 2022 10:24:33 +0200 Message-Id: <20221019083258.177171662@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 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 @@ -5310,12 +5310,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;