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 E679ACAC58E for ; Thu, 11 Sep 2025 02:59:31 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id AE11210E9FE; Thu, 11 Sep 2025 02:59:31 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="W2dCyvX4"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.7]) by gabe.freedesktop.org (Postfix) with ESMTPS id CD18710E9FA; Thu, 11 Sep 2025 02:59:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1757559569; x=1789095569; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=8kTPNv/456LtJVzYy+Cg0Q0WUX+V6sUfUsEZXkhiLKY=; b=W2dCyvX4bpTTvp0KgoyvJ6m40wGamgWZm8p+GEGNlWhwDmJbrUBcwiNl wEeXtu/D/Pn+QaT2mpPoqTQFALZMe+CjSiCEJUw2V5eTAs1Dqq49YRge+ 6Cry+aTZGfU9v3nEHbN0Mj+eEg66VNUgqGsPyIjAoiLgIlatPMUgXuSQV Lh+tpzaZToRNwLzWiL06T2qL31+h0cHnFUWW+mx36Q0qgpxbe15GqSl9L 7Y0+BpqkH/aCOySio5Q/aEE4OVsO0KP6Ms7RbNPklVjJF3pcENbrF8zO7 ela109m+uW/LkLveiGUEgMBdMGBggHNo6wkUyTaRTKJdz8KDJ6DG9ppj7 g==; X-CSE-ConnectionGUID: 7SZ4JtMzTAaGmH8Dn1yPNA== X-CSE-MsgGUID: nkCT0GQ+TyCD45Jdbr0q7g== X-IronPort-AV: E=McAfee;i="6800,10657,11549"; a="85327052" X-IronPort-AV: E=Sophos;i="6.18,256,1751266800"; d="scan'208";a="85327052" Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Sep 2025 19:59:29 -0700 X-CSE-ConnectionGUID: b2IXSsMkQ2CPep1mzwLsAg== X-CSE-MsgGUID: QHCCyFfxRymaG+6sZm+KhA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.18,256,1751266800"; d="scan'208";a="173955498" Received: from srr4-3-linux-103-aknautiy.iind.intel.com ([10.223.34.160]) by fmviesa008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Sep 2025 19:59:27 -0700 From: Ankit Nautiyal To: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org Cc: ville.syrjala@linux.intel.com, Ankit Nautiyal , Mitul Golani Subject: [PATCH 02/15] drm/i915/skl_watermark: Fix the scaling factor for chroma subsampling Date: Thu, 11 Sep 2025 08:15:41 +0530 Message-ID: <20250911024554.692469-3-ankit.k.nautiyal@intel.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20250911024554.692469-1-ankit.k.nautiyal@intel.com> References: <20250911024554.692469-1-ankit.k.nautiyal@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" 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 d74cbb43ae6f..51548447f4aa 100644 --- a/drivers/gpu/drm/i915/display/skl_watermark.c +++ b/drivers/gpu/drm/i915/display/skl_watermark.c @@ -2185,7 +2185,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 || @@ -2228,7 +2228,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