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 302E7CCD184 for ; Mon, 6 Oct 2025 04:42:11 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id F353810E2E8; Mon, 6 Oct 2025 04:42:09 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="Z3ndeiKd"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.15]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4E5F110E2E7; Mon, 6 Oct 2025 04:42:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1759725729; x=1791261729; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=+bPKLCGVtTfEo06Sn2iiMoHmcdOO0UtqNl/4J33CSA4=; b=Z3ndeiKdZ712ci0TNTYmmleKh/Gs41p7HFEI675hBA++1g8xhZmffbYs BwHx5HNXbkbeDhSVE1Zaae7qxRemxxd7b/l+l0qcwvsDmge6M0JdKm5LZ d+89C4Oy4uQm/g5croZnj4V8DAGiDS9+zOdUdqS1UjvHveskfJnIdif6s xUfL9JatdfJ6OtTIfgUDFVLAZJn2ZnNqumfdpGmf8JiKQsu2aTRqzz9G9 zZdWYsEd6KgTbQXasp3I9RKl3a+/wt8btK0EXLJc21qUjCQpvA79pJujQ Sq4vlVIPfIM6Bn1HDWTcywtfOs0e2pvx1arLIPuvEGYH5rIRX9wjqi1kP w==; X-CSE-ConnectionGUID: 0sJh8LFGSWuHTwv7CibD2w== X-CSE-MsgGUID: Ci7H0vK9TNyUSSX7KMNjzg== X-IronPort-AV: E=McAfee;i="6800,10657,11573"; a="61996409" X-IronPort-AV: E=Sophos;i="6.18,319,1751266800"; d="scan'208";a="61996409" Received: from orviesa010.jf.intel.com ([10.64.159.150]) by fmvoesa109.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Oct 2025 21:42:09 -0700 X-CSE-ConnectionGUID: SwNHLYY7R3GWh8/w8OM5LA== X-CSE-MsgGUID: 7FyYAXaaSimVRPyYbuEnwQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.18,319,1751266800"; d="scan'208";a="179062993" Received: from srr4-3-linux-103-aknautiy.iind.intel.com ([10.223.34.160]) by orviesa010-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Oct 2025 21:42:08 -0700 From: Ankit Nautiyal To: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org Cc: ville.syrjala@linux.intel.com Subject: [PATCH 02/16] drm/i915/skl_watermark: Fix the scaling factor for chroma subsampling Date: Mon, 6 Oct 2025 09:58:38 +0530 Message-ID: <20251006042852.263249-3-ankit.k.nautiyal@intel.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20251006042852.263249-1-ankit.k.nautiyal@intel.com> References: <20251006042852.263249-1-ankit.k.nautiyal@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Bspec:70151, mentions Chroma subsampling is a 2x downscale operation. This means that the downscale factor is 2 in each direction. So correct the downscaling factor to 4. Signed-off-by: Ankit Nautiyal Reviewed-by: Mitul Golani --- drivers/gpu/drm/i915/display/skl_watermark.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/display/skl_watermark.c b/drivers/gpu/drm/i915/display/skl_watermark.c index 9eb28d935757..4b1ef4fa8ed2 100644 --- a/drivers/gpu/drm/i915/display/skl_watermark.c +++ b/drivers/gpu/drm/i915/display/skl_watermark.c @@ -2188,7 +2188,7 @@ dsc_prefill_latency(const struct intel_crtc_state *crtc_state) crtc_state->hw.adjusted_mode.clock); int num_scaler_users = hweight32(scaler_state->scaler_users); int chroma_downscaling_factor = - crtc_state->output_format == INTEL_OUTPUT_FORMAT_YCBCR420 ? 2 : 1; + crtc_state->output_format == INTEL_OUTPUT_FORMAT_YCBCR420 ? 4 : 1; u32 dsc_prefill_latency = 0; if (!crtc_state->dsc.compression_enable || @@ -2231,7 +2231,7 @@ scaler_prefill_latency(const struct intel_crtc_state *crtc_state) u64 hscale_k = max(1000, mul_u32_u32(scaler_state->scalers[0].hscale, 1000) >> 16); u64 vscale_k = max(1000, mul_u32_u32(scaler_state->scalers[0].vscale, 1000) >> 16); int chroma_downscaling_factor = - crtc_state->output_format == INTEL_OUTPUT_FORMAT_YCBCR420 ? 2 : 1; + crtc_state->output_format == INTEL_OUTPUT_FORMAT_YCBCR420 ? 4 : 1; int latency; latency = DIV_ROUND_UP_ULL((4 * linetime * hscale_k * vscale_k * -- 2.45.2