From patchwork Sat Oct 22 07:20:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 7507 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4242:0:0:0:0:0 with SMTP id s2csp1104964wrr; Sat, 22 Oct 2022 01:33:48 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5ZkOSuff6/ral9YAPBNy5oiTDiuTdHlMG1yv8ViL+kyIuEy9mL6FuYXAQBz/ZgFuYgZiW8 X-Received: by 2002:a17:907:75e5:b0:78d:95d3:255d with SMTP id jz5-20020a17090775e500b0078d95d3255dmr18097238ejc.495.1666427628089; Sat, 22 Oct 2022 01:33:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666427628; cv=none; d=google.com; s=arc-20160816; b=k2wG1ax6EpBU8rMHP6r0UQ28ceSEqpyHr5HWzOK6fKHlYI977k38oSEY2Rp9xAVFBm SEnnPG5eEyGL6MwVf/CZOP25QePPp8GdsGC+u3DqbpGKlUO0cU6pAQHpKNu7hrlffuwy LHuJSh1SVmQQInHYnc7t5Us4Ud2326UaId//3vzZcafcOam5BXxkSzVlmkTOkk5w0v8N Outi/xTeB3XJLq/C36vM9GK/rIymJ/yx+dNHxk6vle+UpU+7rroaDsbXgZhHV3iREeIX M1Xq+0LyOxn5xNqYj1dilu8MVJ0sB1XUxFl3CjRVXdgARJEYtR5dvmTN8IGyX4I/1q2L UWUQ== 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=hAqdH878FVurY/1FLDKvYbqsEuehY4RYf5EEnIWYqTw=; b=npV2qi4U1+XPPvcr4MhZorzn1CcZE74VitOigKDxKHy0wVGWV2PcRkwWnoCDmq3yF5 Jm7QjpP5AOJhlMZb2EU9k49Kk7T54x4oSQ1fROapjCnVmEaZ2KVP3fJcFzdVLyxrxy6m o7eaVP3ZqpcW6IMRRTeJPiZhJDoUrVAgsyWMVyMOToaqkRNfUsfamik8B5vKNlZv0oPF IeogRBChMKj/+s0hjOeAOzYuTlwOspd7SVI8WSZZ0Xua7CWYRRa4EBhh5o5RAA9p7iow bXJSNmd6BQg1a0r9/AophlZBo5EIvjMD3LiOzEzXdntqCFuhrCoPCe/3IUBNkGipfewX KDXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=fdvH9ykY; 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 bv16-20020a170906b1d000b007809c50fd78si18859557ejb.262.2022.10.22.01.33.19; Sat, 22 Oct 2022 01:33:48 -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=fdvH9ykY; 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 S233572AbiJVISP (ORCPT + 99 others); Sat, 22 Oct 2022 04:18:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50010 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234049AbiJVIQD (ORCPT ); Sat, 22 Oct 2022 04:16:03 -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 6BB6A625FF; Sat, 22 Oct 2022 00:57:03 -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 49267B82E12; Sat, 22 Oct 2022 07:43:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6E1D8C433D6; Sat, 22 Oct 2022 07:43:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666424586; bh=AQyPOa2XBCeGULnZKJoPc0UF3DJNyZXGL295k86aygc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fdvH9ykYaxM8FGs5d9I8Wo4EKWZw+4Pp9kWgC9sZJ8qNH0+HMmgsLh7NiMqRp0EUc 8yOwlk0xyu5MfeXPoKB7E9MNIiz/yM88O5mU/HkGFA+eEacgSwvv07bYEPAsEaEVu7 Pdim6+2ub69XMHe86WXuYBfvIj1a6DGGovyySlic= 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 171/717] drm/i915: Fix watermark calculations for DG2 CCS modifiers Date: Sat, 22 Oct 2022 09:20:50 +0200 Message-Id: <20221022072445.784429696@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?1747376016711840575?= X-GMAIL-MSGID: =?utf-8?q?1747376016711840575?= From: Ville Syrjälä commit ccfa6d35f9233702c924316cdf40c05b6ce88113 upstream. Take the DG2 CCS modifiers into account when calculating the watermarks. Othwerwise we'll calculate the watermarks thinking these tile-4 modifiers are linear. The rc_surface part is actually a nop since that is not used for any glk+ platform. Cc: stable@vger.kernel.org Fixes: 4c3afa72138c ("drm/i915/dg2: Add support for DG2 render and media compression") Reviewed-by: Juha-Pekka Heikkila Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221003111544.8007-5-ville.syrjala@linux.intel.com (cherry picked from commit f25d9f81a8e09ace4f04106995550bae1f522143) Signed-off-by: Tvrtko Ursulin Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/i915/intel_pm.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) --- a/drivers/gpu/drm/i915/intel_pm.c +++ b/drivers/gpu/drm/i915/intel_pm.c @@ -5310,13 +5310,17 @@ skl_compute_wm_params(const struct intel 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_RC_CCS_CC; + modifier == I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC || + modifier == I915_FORMAT_MOD_4_TILED_DG2_RC_CCS || + modifier == I915_FORMAT_MOD_4_TILED_DG2_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_MC_CCS || - modifier == I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC; + modifier == I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC || + modifier == I915_FORMAT_MOD_4_TILED_DG2_RC_CCS || + modifier == I915_FORMAT_MOD_4_TILED_DG2_MC_CCS; wp->is_planar = intel_format_info_is_yuv_semiplanar(format, modifier); wp->width = width;