Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9E247606A322 for ; Fri, 4 Dec 2026 09:20:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=Yeffr+dU Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4EBDF112DD3; Fri, 4 Dec 2026 09:20:35 +0000 (UTC) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.4]) by gabe.freedesktop.org (Postfix) with ESMTPS id 94F1B112DD3; Fri, 4 Dec 2026 09:20:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1796376030; x=1827912030; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Ixl3hkAHKpCIqMwBPaJ8jVA9P6wU3gWEnZowJAmi74U=; b=Yeffr+dUgJZeoZuafbiGOfGUZ/5B+CEVZ6o40UrXMQ+N0+Bjrp+qXCpz W0cXmFOeztdLJ+tqoflmZTH4kRWIzBeMprVHrAcGypMmxfBrNx3Z8DR/z hIfF51WDYylw1kbGw+e6UhNQp8AG8D16K/yXGhEYzHTijb8FKyKqymdJE E0KSVPiWxgVVg0U//T7vGeMdA8RQm8k27tEiXd5uOQXGfKGraVfmnnaWJ CSMrJMJZ6stndZ3kiRxLi7yzyoSQo0ynoVyFcwqfOUIAVGtIsNOeNNDpZ CbOExhhR1u4xudWcqNSA2Qml8fnyfdRvCUmPA34hMUbDa0xqd8JKvNDqW Q==; X-CSE-ConnectionGUID: KNQ6q7ExSD+qH8vU8dYvHA== X-CSE-MsgGUID: IYSV/5EARK6kqjN4IgwNSg== X-IronPort-AV: E=McAfee;i="6800,10657,11985"; a="108995" X-IronPort-AV: E=Sophos;i="6.29,78,1794902400"; d="scan'208";a="108995" Received: from orviesa004.jf.intel.com ([10.64.159.144]) by fmvoesa114.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Dec 2026 01:13:22 -0800 X-CSE-ConnectionGUID: cpgURe6QSCy/TT3lzwg7mg== X-CSE-MsgGUID: f2oAFeW7TWiNdMexkFU4xQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.29,78,1794902400"; d="scan'208";a="13864050" Received: from srr4-3-linux-103-aknautiy.iind.intel.com ([10.223.34.160]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Dec 2026 01:13:20 -0800 From: Ankit Nautiyal To: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org, alexander.kaplan@sms-medipool.de, suraj.kandpal@intel.com, Ankit Nautiyal Subject: [PATCH v5 04/15] drm/i915/dp: Add PCON DSC state to crtc_state Date: Fri, 4 Dec 2026 14:27:35 +0530 Message-ID: <20261204085746.391918-5-ankit.k.nautiyal@intel.com> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20261204085746.391918-1-ankit.k.nautiyal@intel.com> References: <20261204085746.391918-1-ankit.k.nautiyal@intel.com> X-Archived-By: 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-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Intel-xe" X-Spam-Status: No, score=-19.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 A DP->HDMI 2.1 PCON handles DSC in one of three ways: - it decodes the stream, - passes it through to the HDMI sink, or - decodes it and encodes it again, if it has a DSC encoder. Add the state to hold that decision, along with the PCON DSC encoder PPS override parameters, so that they can be computed during compute_config and only programmed at enable time. The pass-through is not handled yet, so for now the state is none, decode, or decode and re-encode. The state is not read out since it does not map to any register, and reading back the DPCD is unreliable. Reset it for every link configuration attempt and print it in the crtc state dump. Signed-off-by: Ankit Nautiyal --- .../drm/i915/display/intel_crtc_state_dump.c | 15 +++++++++++ .../drm/i915/display/intel_display_types.h | 27 +++++++++++++++++++ drivers/gpu/drm/i915/display/intel_dp.c | 1 + 3 files changed, 43 insertions(+) diff --git a/drivers/gpu/drm/i915/display/intel_crtc_state_dump.c b/drivers/gpu/drm/i915/display/intel_crtc_state_dump.c index 57e64dda79c1..4e9ff59a8d5c 100644 --- a/drivers/gpu/drm/i915/display/intel_crtc_state_dump.c +++ b/drivers/gpu/drm/i915/display/intel_crtc_state_dump.c @@ -73,6 +73,12 @@ static const char * const output_type_str[] = { #undef OUTPUT_TYPE +static const char * const pcon_dsc_op_str[] = { + [INTEL_PCON_NO_DSC] = "none", + [INTEL_PCON_DSC_DECODE] = "decode", + [INTEL_PCON_DSC_DECODE_ENCODE] = "decode+encode", +}; + static void snprintf_output_types(char *buf, size_t len, unsigned int output_types) { @@ -243,6 +249,15 @@ void intel_crtc_state_dump(const struct intel_crtc_state *pipe_config, str_enabled_disabled(pipe_config->fec_enable), str_enabled_disabled(pipe_config->enhanced_framing)); + drm_printf(&p, "pcon: dsc op %s\n", + pcon_dsc_op_str[pipe_config->pcon_config.dsc_op]); + if (pipe_config->pcon_config.dsc_op == INTEL_PCON_DSC_DECODE_ENCODE) + drm_printf(&p, + "pcon dsc encoder: slice height: %u, slice width: %u, bpp_x16: %u\n", + pipe_config->pcon_config.dsc_enc.slice_height, + pipe_config->pcon_config.dsc_enc.slice_width, + pipe_config->pcon_config.dsc_enc.bpp_x16); + drm_printf(&p, "sdp split: %s\n", str_enabled_disabled(pipe_config->sdp_split_enable)); diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h b/drivers/gpu/drm/i915/display/intel_display_types.h index 514ca067e139..0103ac569727 100644 --- a/drivers/gpu/drm/i915/display/intel_display_types.h +++ b/drivers/gpu/drm/i915/display/intel_display_types.h @@ -968,6 +968,23 @@ enum intel_output_format { INTEL_OUTPUT_FORMAT_YCBCR444, }; +enum intel_pcon_dsc_op { + /* The PCON does not take part in DSC, also used when there is no HDMI 2.1 PCON */ + INTEL_PCON_NO_DSC, + /* PCON decodes the DSC stream from the DP link, HDMI link is uncompressed */ + INTEL_PCON_DSC_DECODE, + /* PCON decodes the DP stream and encodes DSC 1.2 for the HDMI sink */ + INTEL_PCON_DSC_DECODE_ENCODE, +}; + +/* PCON DSC encoder PPS override parameters */ +struct intel_pcon_dsc_enc_config { + u16 slice_height; + u16 slice_width; + /* Compressed Bpp in U6.4 format */ + u16 bpp_x16; +}; + /* Used by dp and fdi links */ struct intel_link_m_n { u32 tu; @@ -1370,6 +1387,16 @@ struct intel_crtc_state { struct drm_dsc_config config; } dsc; + /* + * Configuration of a DP->HDMI PCON. Only used for state computation, + * not read out from the HW. + */ + struct { + enum intel_pcon_dsc_op dsc_op; + /* Only valid for INTEL_PCON_DSC_DECODE_ENCODE */ + struct intel_pcon_dsc_enc_config dsc_enc; + } pcon_config; + /* DP tunnel used for BW allocation. */ struct drm_dp_tunnel_ref dp_tunnel_ref; diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c index c0cf0938a7b6..2d5f7754eda0 100644 --- a/drivers/gpu/drm/i915/display/intel_dp.c +++ b/drivers/gpu/drm/i915/display/intel_dp.c @@ -2514,6 +2514,7 @@ void intel_dp_dsc_reset_config(struct intel_crtc_state *crtc_state) memset(&crtc_state->dsc.slice_config, 0, sizeof(crtc_state->dsc.slice_config)); memset(&crtc_state->dsc.config, 0, sizeof(crtc_state->dsc.config)); + memset(&crtc_state->pcon_config, 0, sizeof(crtc_state->pcon_config)); } int intel_dp_dsc_compute_config(struct intel_dp *intel_dp, -- 2.50.1