From mboxrd@z Thu Jan 1 00:00:00 1970 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 11E66C02185 for ; Fri, 17 Jan 2025 07:47:41 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D35FD10EA80; Fri, 17 Jan 2025 07:47:40 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="Q2z9u2rF"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.14]) by gabe.freedesktop.org (Postfix) with ESMTPS id 00AC110EA7F for ; Fri, 17 Jan 2025 07:47:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1737100060; x=1768636060; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=+d7dAQzrB4HDCmoEdbrdxR6mOUtHN0NaEFVkKYTnD84=; b=Q2z9u2rFG/D4XP6sBEsqe4x6xbBUEThqRmRdbeGHYkhUNjjYJhOmOmi4 aVXVh4BVbNXNk5ejngG/v6CshK5vUNVViQDzGSoP2jbZyGDTi9l+gEG2v 41hU3LPllRJ7yvrmCPeCU2V85vXJruF7HDbvslHPwQGDMopTQ9o7GLlsF gTWbOP4kQWI2GvGdB8BCCFYAQBzEZ9L10wZuaFgRECqmLe3fWMH6gfjik D8ZtHmxCvRc9CslXt7MrgCkwY79jCh5eS/nkwiprL9s8Sus2cNGWR7I3c MASkQLADoHvoj0WtHnf1zUOIxwcLBVRHQCp3kc/l1wMzh/D9JGvH6NaWM A==; X-CSE-ConnectionGUID: w00+bBpLSYi0OFdaeixyUA== X-CSE-MsgGUID: khfNqvyGTjyF5PG7zSxP8Q== X-IronPort-AV: E=McAfee;i="6700,10204,11317"; a="37760754" X-IronPort-AV: E=Sophos;i="6.13,211,1732608000"; d="scan'208";a="37760754" Received: from fmviesa007.fm.intel.com ([10.60.135.147]) by fmvoesa108.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Jan 2025 23:47:40 -0800 X-CSE-ConnectionGUID: Tmvw7ei2Q9S17yASNqBTwA== X-CSE-MsgGUID: fo5a3nA1Rf6zdUHVHc4WxQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.13,211,1732608000"; d="scan'208";a="105687946" Received: from mgolanimitul-x299-ud4-pro.iind.intel.com ([10.190.239.114]) by fmviesa007.fm.intel.com with ESMTP; 16 Jan 2025 23:47:39 -0800 From: Mitul Golani To: intel-xe@lists.freedesktop.org Subject: [PATCH v7 5/7] drm/i915/scaler: Limit pipe scaler downscaling factors for YUV420 Date: Fri, 17 Jan 2025 13:14:19 +0530 Message-ID: <20250117074422.3965519-6-mitulkumar.ajitkumar.golani@intel.com> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250117074422.3965519-1-mitulkumar.ajitkumar.golani@intel.com> References: <20250117074422.3965519-1-mitulkumar.ajitkumar.golani@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: intel-xe@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Xe graphics driver List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-xe-bounces@lists.freedesktop.org Sender: "Intel-xe" Limit downscaling to less than 1.5 (source/destination) in the horizontal direction and 1.0 in the vertical direction, When configured for Pipe YUV 420 encoding for port output. Bspec: 50441, 7490, 69901 Signed-off-by: Mitul Golani Reviewed-by: Ankit Nautiyal --- drivers/gpu/drm/i915/display/skl_scaler.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/gpu/drm/i915/display/skl_scaler.c b/drivers/gpu/drm/i915/display/skl_scaler.c index 72344044d9d3..c9d7966b37ff 100644 --- a/drivers/gpu/drm/i915/display/skl_scaler.c +++ b/drivers/gpu/drm/i915/display/skl_scaler.c @@ -456,6 +456,16 @@ static int intel_atomic_setup_scaler(struct intel_crtc_state *crtc_state, calculate_max_scale(crtc, 0, *scaler_id, &max_hscale, &max_vscale); + /* + * When configured for Pipe YUV 420 encoding for port output, + * limit downscaling to less than 1.5 (source/destination) in + * the horizontal direction and 1.0 in the vertical direction. + */ + if (crtc_state->output_format == INTEL_OUTPUT_FORMAT_YCBCR420) { + max_hscale = 0x18000 - 1; + max_vscale = 0x10000; + } + hscale = drm_rect_calc_hscale(&src, &crtc_state->pch_pfit.dst, 0, max_hscale); vscale = drm_rect_calc_vscale(&src, &crtc_state->pch_pfit.dst, -- 2.48.1