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 D1CDBCA0FE7 for ; Mon, 25 Aug 2025 12:49:35 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6964210E45A; Mon, 25 Aug 2025 12:49:35 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="lwcKVosV"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.14]) by gabe.freedesktop.org (Postfix) with ESMTPS id B69AB10E45A; Mon, 25 Aug 2025 12:49:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1756126174; x=1787662174; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=rICjRUMs15/4iduPjETOUgEgTHhouMx9EcaZGBp/O6g=; b=lwcKVosVfYNPFo8ZuPiYzQt/buXESSXnwvfhoOCEUxYSWjZSoekH2GU8 huyKJNvj1f+bOn0d5/+FOtnjTVCCeO4Ts7+W87+XUeCa1Y9IuifVBhkzL wn9SpG6FH3TN82ytKs+Xq1L7yhPWMz1LuCVtK7bsURZapHP3qaGcLwTOB ogzCn/RopTvGdRzvdydi/eMiV8XNdXEWtFexP7SFnbm3jNER/iJmh8yqW JKDeu90cqDrwr4PeF09+z4danVsA8plETJDqZPlQRwDPiL614uC3+YDPf bufT8rFywimE7P595ojO8SqGWrp5hectNA+ogn40nxsuqrE5i+gA2gzLm w==; X-CSE-ConnectionGUID: 3ejpB7HMQlWgIffH8iWCqg== X-CSE-MsgGUID: RD8wrv8qRb+A+/BC6c/yxQ== X-IronPort-AV: E=McAfee;i="6800,10657,11531"; a="62164114" X-IronPort-AV: E=Sophos;i="6.17,312,1747724400"; d="scan'208";a="62164114" Received: from orviesa002.jf.intel.com ([10.64.159.142]) by orvoesa106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Aug 2025 05:49:34 -0700 X-CSE-ConnectionGUID: i4nAeOtzSdauHLwpejCoSw== X-CSE-MsgGUID: aJcO2czGR9mcXUf4wBjpUw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.18,213,1751266800"; d="scan'208";a="200229893" Received: from srr4-3-linux-103-aknautiy.iind.intel.com ([10.223.34.160]) by orviesa002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Aug 2025 05:49:32 -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 01/12] drm/i915/skl_watermark: Fix the scaling factor for chroma subsampling Date: Mon, 25 Aug 2025 18:05:37 +0530 Message-ID: <20250825123548.3022474-2-ankit.k.nautiyal@intel.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20250825123548.3022474-1-ankit.k.nautiyal@intel.com> References: <20250825123548.3022474-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 33885d619a97..a803e028e1ba 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