From patchwork Fri Aug 26 12:17:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Manna, Animesh" X-Patchwork-Id: 12955962 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6C3E8ECAAD4 for ; Fri, 26 Aug 2022 12:21:27 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A5CD810E8D5; Fri, 26 Aug 2022 12:21:26 +0000 (UTC) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by gabe.freedesktop.org (Postfix) with ESMTPS id D546D10E8BD for ; Fri, 26 Aug 2022 12:21:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1661516475; x=1693052475; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=Gu9H5mgRL0EGieQM5IUO7S7Ln16H90AKitpsoOrZKFI=; b=A3sQjVln4RAWfMpXtwT/DzACnDzDlWIKgnb78tE/wVNFmva9Ew+EJvqP P6e1W+7LMc62Z/9iuNWVDe2GIxJvj90pPQbxKsF5UTjB77tADMgoT4di7 AE3YSbtU461srxv5C2WKtIEYTrFcHL3+Sc04uXTkyygnJtJ4kQyzPxf0T Y2MBFI/z6wbTENeR0A36Jij0LhFVVujdcKGNl3iakzgEc6OMV/AE3A2Ml nBaTCCMQUWHaSl6JQdr2rJEc2mAh+HEMoAglcaUTJCzVaIRQ8m57GZ8gJ FGGC0J6tXNv6tKn0c6brfiNHc8jcJ4yiBS8fO5bSnr1r6w0UEonSrl5ti g==; X-IronPort-AV: E=McAfee;i="6500,9779,10450"; a="358459231" X-IronPort-AV: E=Sophos;i="5.93,265,1654585200"; d="scan'208";a="358459231" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Aug 2022 05:21:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,265,1654585200"; d="scan'208";a="643641364" Received: from srr4-3-linux-101-amanna.iind.intel.com ([10.223.74.76]) by orsmga001.jf.intel.com with ESMTP; 26 Aug 2022 05:21:06 -0700 From: Animesh Manna To: intel-gfx@lists.freedesktop.org Date: Fri, 26 Aug 2022 17:47:40 +0530 Message-Id: <20220826121741.25485-1-animesh.manna@intel.com> X-Mailer: git-send-email 2.29.0 MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH 1/2] drm/i915/mtl: Added restriction for plane downscaling X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" The second Scaler (i.e. Scaler 2) does not support vertical downscaling (i.e. it's vertical scale factor must not be greater than 1.0). So, vertical plane downscaling is not supported on MTL, scale factor modified accordingly. Cc: Ville Syrjälä Cc: Manasi Navare Signed-off-by: Animesh Manna --- drivers/gpu/drm/i915/display/skl_universal_plane.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/display/skl_universal_plane.c b/drivers/gpu/drm/i915/display/skl_universal_plane.c index bcfde81e4d08..6bfcda748e7b 100644 --- a/drivers/gpu/drm/i915/display/skl_universal_plane.c +++ b/drivers/gpu/drm/i915/display/skl_universal_plane.c @@ -1464,9 +1464,12 @@ static int skl_plane_max_scale(struct drm_i915_private *dev_priv, * whether we can use the HQ scaler mode. Assume * the best case. * FIXME need to properly check this later. + * FIXME On MTL, adjust specific scaler's downscaling capability. */ - if (DISPLAY_VER(dev_priv) >= 10 || - !intel_format_info_is_yuv_semiplanar(fb->format, fb->modifier)) + if (IS_METEORLAKE(dev_priv)) + return 0x10000; + else if (DISPLAY_VER(dev_priv) >= 10 || + !intel_format_info_is_yuv_semiplanar(fb->format, fb->modifier)) return 0x30000 - 1; else return 0x20000 - 1; From patchwork Fri Aug 26 12:17:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Manna, Animesh" X-Patchwork-Id: 12955961 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D0ED4ECAAD4 for ; Fri, 26 Aug 2022 12:21:20 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B4B5310E8CC; Fri, 26 Aug 2022 12:21:19 +0000 (UTC) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by gabe.freedesktop.org (Postfix) with ESMTPS id 08AB610E8CC for ; Fri, 26 Aug 2022 12:21:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1661516476; x=1693052476; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=XhpLXhCvQwuoeyn0zHSxgkXllI6Cy+WKvFXViXbMrNg=; b=S5eWy6aQ0ISIbnk5DNdP9uSzImaQqUlQL9Dbz5wUyo+GiemlyhTEZchN 6tkTsCfSJL2ha6N0JBNf1AfCiTVEYyqLsjeFo/fMZhJFAwc6L6R2hrUcy KrM6vq1290HOptNe8Nf1gYh0Fyt+7DkWFbu91j2qyEgCUruVajGaIyag7 OU+a7nyLEZ0zVsTebt/sjXxd2FUu7K64aQ1HhZogyy5IOjH11NJsgtgKM 4dbr1ZcTCVJhHqvSDLC41CsxWGFUawpkR6uOoQcDQ8fZ0N1RZaeqz2aAB m/eDwIgISQtbR/dkIoq+uVc9mOMoehHbLOWBcrT1xfwiwqr8D0BJEGtBg w==; X-IronPort-AV: E=McAfee;i="6500,9779,10450"; a="358459230" X-IronPort-AV: E=Sophos;i="5.93,265,1654585200"; d="scan'208";a="358459230" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Aug 2022 05:21:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,265,1654585200"; d="scan'208";a="643641385" Received: from srr4-3-linux-101-amanna.iind.intel.com ([10.223.74.76]) by orsmga001.jf.intel.com with ESMTP; 26 Aug 2022 05:21:08 -0700 From: Animesh Manna To: intel-gfx@lists.freedesktop.org Date: Fri, 26 Aug 2022 17:47:41 +0530 Message-Id: <20220826121741.25485-2-animesh.manna@intel.com> X-Mailer: git-send-email 2.29.0 In-Reply-To: <20220826121741.25485-1-animesh.manna@intel.com> References: <20220826121741.25485-1-animesh.manna@intel.com> MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH 2/2] drm/i915/mtl: Limit scaler input to 4k in plane scaling X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" As part of die area reduction max input source modified to 4096 for MTL so modified range check logic of scaler. Cc: Manasi Navare Signed-off-by: Animesh Manna --- drivers/gpu/drm/i915/display/skl_scaler.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/display/skl_scaler.c b/drivers/gpu/drm/i915/display/skl_scaler.c index 4092679be21e..bb40b639ff5d 100644 --- a/drivers/gpu/drm/i915/display/skl_scaler.c +++ b/drivers/gpu/drm/i915/display/skl_scaler.c @@ -158,10 +158,10 @@ skl_update_scaler(struct intel_crtc_state *crtc_state, bool force_detach, /* range checks */ if (src_w < SKL_MIN_SRC_W || src_h < SKL_MIN_SRC_H || dst_w < SKL_MIN_DST_W || dst_h < SKL_MIN_DST_H || - (DISPLAY_VER(dev_priv) >= 11 && + (DISPLAY_VER(dev_priv) >= 11 && !IS_METEORLAKE(dev_priv) && (src_w > ICL_MAX_SRC_W || src_h > ICL_MAX_SRC_H || dst_w > ICL_MAX_DST_W || dst_h > ICL_MAX_DST_H)) || - (DISPLAY_VER(dev_priv) < 11 && + ((DISPLAY_VER(dev_priv) < 11 && IS_METEORLAKE(dev_priv)) && (src_w > SKL_MAX_SRC_W || src_h > SKL_MAX_SRC_H || dst_w > SKL_MAX_DST_W || dst_h > SKL_MAX_DST_H))) { drm_dbg_kms(&dev_priv->drm,