From patchwork Tue Dec 3 16:40:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jani Nikula X-Patchwork-Id: 13892697 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 85CC6E74AC4 for ; Tue, 3 Dec 2024 16:41:08 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2DEF110EA9A; Tue, 3 Dec 2024 16:41:08 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="i62cMM4o"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.19]) by gabe.freedesktop.org (Postfix) with ESMTPS id A29BA10EAAC for ; Tue, 3 Dec 2024 16:41:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1733244067; x=1764780067; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=kFgVf2j2M2r3ElV0Pn9wtkFlqgYvwXyUXGio5Za1gd0=; b=i62cMM4ol9nnY4OSR3Mehm5VF7h/PHn2B8ckGwYeb5eOjqJoFF4XjHHN iX6zGaAsxmL0SB4AdMukN4iIg7LQHXWKY7S5YS8NtkjceqDG3aia3sWb9 ljnsYk6z8aOS403y9v8z9fvGfSXNOnXO3nWVNtqMvI269xEoMCmCuGzxI MlAoCw49ge1/lijsemoD0bDeRyAPoYIT1ZaHc8xAiPSRgaV2uYwSpGnpb OXrFqrqQ4/BH98/DqtYzD2Mx1ZvqpOEZNZ0UEnuTNqjEOHhQ4tZ/rhXBM Za+tOsCAXp9DS47tSZCXxma9AluoTa1q9kAx+b4FOaj8QpTq5bJPOa69t A==; X-CSE-ConnectionGUID: 03b9tEOXR86dzb6HHfwkLg== X-CSE-MsgGUID: 2Yw29HRHQH6R4GW+eKrXTQ== X-IronPort-AV: E=McAfee;i="6700,10204,11275"; a="33347504" X-IronPort-AV: E=Sophos;i="6.12,205,1728975600"; d="scan'208";a="33347504" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by orvoesa111.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Dec 2024 08:41:07 -0800 X-CSE-ConnectionGUID: jCkCwy7dSq2HNpvZMCM2ug== X-CSE-MsgGUID: C46q+ejnSvuVw+2OYwxDQg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,205,1728975600"; d="scan'208";a="93580391" Received: from kniemiec-mobl1.ger.corp.intel.com (HELO localhost) ([10.245.246.135]) by orviesa006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Dec 2024 08:41:05 -0800 From: Jani Nikula To: intel-gfx@lists.freedesktop.org Cc: jani.nikula@intel.com Subject: [PATCH 1/6] drm/i915/hdmi: move declarations for hsw_read/write_infoframe() to the right place Date: Tue, 3 Dec 2024 18:40:51 +0200 Message-Id: <37d23be996417ccfa2d376cae4f1d748a16887cd.1733243959.git.jani.nikula@intel.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: References: MIME-Version: 1.0 Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo 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 functions are located in intel_hdmi.c, put the declarations in intel_hdmi.h. Signed-off-by: Jani Nikula --- drivers/gpu/drm/i915/display/intel_hdmi.h | 9 +++++++++ drivers/gpu/drm/i915/display/intel_lspcon.h | 8 -------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_hdmi.h b/drivers/gpu/drm/i915/display/intel_hdmi.h index 466f48df8a74..8211a8e6f9f7 100644 --- a/drivers/gpu/drm/i915/display/intel_hdmi.h +++ b/drivers/gpu/drm/i915/display/intel_hdmi.h @@ -62,4 +62,13 @@ int intel_hdmi_dsc_get_num_slices(const struct intel_crtc_state *crtc_state, int hdmi_max_slices, int hdmi_throughput); int intel_hdmi_dsc_get_slice_height(int vactive); +void hsw_write_infoframe(struct intel_encoder *encoder, + const struct intel_crtc_state *crtc_state, + unsigned int type, + const void *frame, ssize_t len); +void hsw_read_infoframe(struct intel_encoder *encoder, + const struct intel_crtc_state *crtc_state, + unsigned int type, + void *frame, ssize_t len); + #endif /* __INTEL_HDMI_H__ */ diff --git a/drivers/gpu/drm/i915/display/intel_lspcon.h b/drivers/gpu/drm/i915/display/intel_lspcon.h index e19e10492b05..47f9ae77b328 100644 --- a/drivers/gpu/drm/i915/display/intel_lspcon.h +++ b/drivers/gpu/drm/i915/display/intel_lspcon.h @@ -35,13 +35,5 @@ u32 lspcon_infoframes_enabled(struct intel_encoder *encoder, const struct intel_crtc_state *pipe_config); u32 intel_lspcon_infoframes_enabled(struct intel_encoder *encoder, const struct intel_crtc_state *pipe_config); -void hsw_write_infoframe(struct intel_encoder *encoder, - const struct intel_crtc_state *crtc_state, - unsigned int type, - const void *frame, ssize_t len); -void hsw_read_infoframe(struct intel_encoder *encoder, - const struct intel_crtc_state *crtc_state, - unsigned int type, - void *frame, ssize_t len); #endif /* __INTEL_LSPCON_H__ */ From patchwork Tue Dec 3 16:40:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jani Nikula X-Patchwork-Id: 13892698 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 8826FE74AC3 for ; Tue, 3 Dec 2024 16:41:12 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2F91C10EAAB; Tue, 3 Dec 2024 16:41:12 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="AICS8KrK"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.19]) by gabe.freedesktop.org (Postfix) with ESMTPS id D81CF10EAAB for ; Tue, 3 Dec 2024 16:41:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1733244071; x=1764780071; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=lBPcXFlFaSomVKNETUq0mYZc+Tkp8ihrJtsUGxZkP68=; b=AICS8KrKrRdDtAXwsLPMqw9Tzt8l/UD7zbDsv4/JajS+9kL9V+jWmxPb 5t0njt38nAzqC5GTUOZaVjM0MwXX8+Vs7MZ8YlVletU74i+jqSV0KIEAA 5zk66kvfJlM4eofouNqE0O2+gG9ZzPNydq40sIcsuXYW2akR3IWeDmGTC 0SR1Xs7FP1yCERPFTtrkZB/ygGl0pb1V/CGfsipz/zzir0iTP7tUWGvdp 8C4ciHw3qJ+5XAL9jNuR08a5WyxMHu/IWC/63Bwbbw76FPws7UZxWmwlz FyzY1LYG4cgSGgj9v2OlaxBSeuru9jNI50d1ADIdPGqPK2dzfAH0G1/AD A==; X-CSE-ConnectionGUID: r6wcOc9xQIes/vkqGOL7Sg== X-CSE-MsgGUID: piQdTIq+Q2iw8+WAfi0RPA== X-IronPort-AV: E=McAfee;i="6700,10204,11275"; a="33347509" X-IronPort-AV: E=Sophos;i="6.12,205,1728975600"; d="scan'208";a="33347509" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by orvoesa111.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Dec 2024 08:41:11 -0800 X-CSE-ConnectionGUID: DP/Dm4ctQfaL3jv37ngAtA== X-CSE-MsgGUID: NEceq4htShSUOcotOi8pEg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,205,1728975600"; d="scan'208";a="93580421" Received: from kniemiec-mobl1.ger.corp.intel.com (HELO localhost) ([10.245.246.135]) by orviesa006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Dec 2024 08:41:09 -0800 From: Jani Nikula To: intel-gfx@lists.freedesktop.org Cc: jani.nikula@intel.com Subject: [PATCH 2/6] drm/i915/lspcon: add intel_lspcon_active() and use it Date: Tue, 3 Dec 2024 18:40:52 +0200 Message-Id: <6312593f231ba8522c5ecce7fc34e8de815f2197.1733243959.git.jani.nikula@intel.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: References: MIME-Version: 1.0 Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo 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" Hide the direct lspcon->active use behind intel_lspcon_active(). Signed-off-by: Jani Nikula --- drivers/gpu/drm/i915/display/intel_ddi.c | 6 +++--- drivers/gpu/drm/i915/display/intel_dp.c | 7 ++++--- drivers/gpu/drm/i915/display/intel_lspcon.c | 7 +++++++ drivers/gpu/drm/i915/display/intel_lspcon.h | 1 + 4 files changed, 15 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c b/drivers/gpu/drm/i915/display/intel_ddi.c index 4f9c50996446..1d363c1ddfad 100644 --- a/drivers/gpu/drm/i915/display/intel_ddi.c +++ b/drivers/gpu/drm/i915/display/intel_ddi.c @@ -2974,7 +2974,7 @@ static void intel_ddi_pre_enable(struct intel_atomic_state *state, /* FIXME precompute everything properly */ /* FIXME how do we turn infoframes off again? */ - if (dig_port->lspcon.active && intel_dp_has_hdmi_sink(&dig_port->dp)) + if (intel_lspcon_active(dig_port) && intel_dp_has_hdmi_sink(&dig_port->dp)) dig_port->set_infoframes(encoder, crtc_state->has_infoframe, crtc_state, conn_state); @@ -3314,7 +3314,7 @@ static void intel_ddi_enable_dp(struct intel_atomic_state *state, drm_connector_update_privacy_screen(conn_state); intel_edp_backlight_on(crtc_state, conn_state); - if (!dig_port->lspcon.active || intel_dp_has_hdmi_sink(&dig_port->dp)) + if (!intel_lspcon_active(dig_port) || intel_dp_has_hdmi_sink(&dig_port->dp)) intel_dp_set_infoframes(encoder, true, crtc_state, conn_state); trans_port_sync_stop_link_train(state, encoder, crtc_state); @@ -3982,7 +3982,7 @@ static void intel_ddi_read_func_ctl_dp_sst(struct intel_encoder *encoder, intel_de_read(display, dp_tp_ctl_reg(encoder, crtc_state)) & DP_TP_CTL_FEC_ENABLE; - if (dig_port->lspcon.active && intel_dp_has_hdmi_sink(&dig_port->dp)) + if (intel_lspcon_active(dig_port) && intel_dp_has_hdmi_sink(&dig_port->dp)) crtc_state->infoframes.enable |= intel_lspcon_infoframes_enabled(encoder, crtc_state); else diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c index 4471c8fcd478..775d1c10d671 100644 --- a/drivers/gpu/drm/i915/display/intel_dp.c +++ b/drivers/gpu/drm/i915/display/intel_dp.c @@ -3497,9 +3497,10 @@ void intel_dp_set_power(struct intel_dp *intel_dp, u8 mode) ret = drm_dp_dpcd_writeb(&intel_dp->aux, DP_SET_POWER, mode); } else { + struct intel_digital_port *dig_port = dp_to_dig_port(intel_dp); struct intel_lspcon *lspcon = dp_to_lspcon(intel_dp); - lspcon_resume(dp_to_dig_port(intel_dp)); + lspcon_resume(dig_port); /* Write the source OUI as early as possible */ intel_dp_init_source_oui(intel_dp); @@ -3515,7 +3516,7 @@ void intel_dp_set_power(struct intel_dp *intel_dp, u8 mode) msleep(1); } - if (ret == 1 && lspcon->active) + if (ret == 1 && intel_lspcon_active(dig_port)) lspcon_wait_pcon_mode(lspcon); } @@ -5552,7 +5553,7 @@ intel_dp_update_420(struct intel_dp *intel_dp) intel_dp->downstream_ports); /* on-board LSPCON always assumed to support 4:4:4->4:2:0 conversion */ intel_dp->dfp.ycbcr_444_to_420 = - dp_to_dig_port(intel_dp)->lspcon.active || + intel_lspcon_active(dp_to_dig_port(intel_dp)) || drm_dp_downstream_444_to_420_conversion(intel_dp->dpcd, intel_dp->downstream_ports); intel_dp->dfp.rgb_to_ycbcr = diff --git a/drivers/gpu/drm/i915/display/intel_lspcon.c b/drivers/gpu/drm/i915/display/intel_lspcon.c index f9db867fae89..f898b8fabdd6 100644 --- a/drivers/gpu/drm/i915/display/intel_lspcon.c +++ b/drivers/gpu/drm/i915/display/intel_lspcon.c @@ -687,6 +687,13 @@ bool lspcon_init(struct intel_digital_port *dig_port) return true; } +bool intel_lspcon_active(struct intel_digital_port *dig_port) +{ + struct intel_lspcon *lspcon = &dig_port->lspcon; + + return lspcon->active; +} + u32 intel_lspcon_infoframes_enabled(struct intel_encoder *encoder, const struct intel_crtc_state *pipe_config) { diff --git a/drivers/gpu/drm/i915/display/intel_lspcon.h b/drivers/gpu/drm/i915/display/intel_lspcon.h index 47f9ae77b328..4c8ba3ddbac4 100644 --- a/drivers/gpu/drm/i915/display/intel_lspcon.h +++ b/drivers/gpu/drm/i915/display/intel_lspcon.h @@ -16,6 +16,7 @@ struct intel_encoder; struct intel_lspcon; bool lspcon_init(struct intel_digital_port *dig_port); +bool intel_lspcon_active(struct intel_digital_port *dig_port); void lspcon_detect_hdr_capability(struct intel_lspcon *lspcon); void lspcon_resume(struct intel_digital_port *dig_port); void lspcon_wait_pcon_mode(struct intel_lspcon *lspcon); From patchwork Tue Dec 3 16:40:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jani Nikula X-Patchwork-Id: 13892699 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 ED436E74AC3 for ; Tue, 3 Dec 2024 16:41:15 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 960CE10EAAC; Tue, 3 Dec 2024 16:41:15 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="cTX4dVpP"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.19]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4976E10EAAC for ; Tue, 3 Dec 2024 16:41:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1733244075; x=1764780075; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=k5FcykjYBMbc9fc7Ch5yej62BVhQ3BXaxCKUi48LjD4=; b=cTX4dVpPAMknj1n3tMAmaHE0rRUDQxfeiCv0mIv23wvb3BheLB0cFjIh QKQdxjqFF46dHUvdh1LB9wJ0DU+uaIgERwSeq8N1d0qCQqNBn1/Q9ZRGI MC2ICkuDwj2+glLcbrxp61Wp1OqET0fW551phe6QTOLOExkIZjQ+EiOk4 hsLOF8Tx3PQlLMxgcVLVLB5pVmfjOgKfv23XxPYqiVrDLwSPX6fizEneG 6+qA/axkkycgcahsuFdy97/qR24fy6Wgje6fd2l3ZYyMoedAG+QKzzM0q IYnajg3NCoO/a5seMEBzawPAYlaIrfBM44Dw9zWSzHRX3QQwPXMP6kvi2 g==; X-CSE-ConnectionGUID: LL48e2eRTBOkp6OGyy570A== X-CSE-MsgGUID: Qm7QB3oQS2SDkNCIZ7XrFQ== X-IronPort-AV: E=McAfee;i="6700,10204,11275"; a="33347518" X-IronPort-AV: E=Sophos;i="6.12,205,1728975600"; d="scan'208";a="33347518" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by orvoesa111.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Dec 2024 08:41:15 -0800 X-CSE-ConnectionGUID: BZ0pHfZ3TuSMq2+Cq0Vdrw== X-CSE-MsgGUID: OPSuwhXjReeeTyn8NKCnbA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,205,1728975600"; d="scan'208";a="93580458" Received: from kniemiec-mobl1.ger.corp.intel.com (HELO localhost) ([10.245.246.135]) by orviesa006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Dec 2024 08:41:14 -0800 From: Jani Nikula To: intel-gfx@lists.freedesktop.org Cc: jani.nikula@intel.com Subject: [PATCH 3/6] drm/i915/lspcon: change signature of lspcon_detect_hdr_capability() Date: Tue, 3 Dec 2024 18:40:53 +0200 Message-Id: <99b391117301f2eb5a08a346817b394cbf30ddbd.1733243959.git.jani.nikula@intel.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: References: MIME-Version: 1.0 Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo 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" Switch from struct intel_lspcon to struct intel_digital_port to unify, and return the value so the caller doesn't have to look at lspcon->hdr_detected directly. Signed-off-by: Jani Nikula --- drivers/gpu/drm/i915/display/intel_dp.c | 4 +--- drivers/gpu/drm/i915/display/intel_lspcon.c | 5 ++++- drivers/gpu/drm/i915/display/intel_lspcon.h | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c index 775d1c10d671..f0d590b5d9ab 100644 --- a/drivers/gpu/drm/i915/display/intel_dp.c +++ b/drivers/gpu/drm/i915/display/intel_dp.c @@ -5831,7 +5831,6 @@ intel_dp_connector_register(struct drm_connector *connector) struct drm_i915_private *i915 = to_i915(connector->dev); struct intel_dp *intel_dp = intel_attached_dp(to_intel_connector(connector)); struct intel_digital_port *dig_port = dp_to_dig_port(intel_dp); - struct intel_lspcon *lspcon = &dig_port->lspcon; int ret; ret = intel_connector_register(connector); @@ -5854,8 +5853,7 @@ intel_dp_connector_register(struct drm_connector *connector) * efficiently and streamlined. */ if (lspcon_init(dig_port)) { - lspcon_detect_hdr_capability(lspcon); - if (lspcon->hdr_supported) + if (lspcon_detect_hdr_capability(dig_port)) drm_connector_attach_hdr_output_metadata_property(connector); } diff --git a/drivers/gpu/drm/i915/display/intel_lspcon.c b/drivers/gpu/drm/i915/display/intel_lspcon.c index f898b8fabdd6..2c731161a711 100644 --- a/drivers/gpu/drm/i915/display/intel_lspcon.c +++ b/drivers/gpu/drm/i915/display/intel_lspcon.c @@ -120,8 +120,9 @@ static u32 get_hdr_status_reg(struct intel_lspcon *lspcon) return DPCD_PARADE_LSPCON_HDR_STATUS; } -void lspcon_detect_hdr_capability(struct intel_lspcon *lspcon) +bool lspcon_detect_hdr_capability(struct intel_digital_port *dig_port) { + struct intel_lspcon *lspcon = &dig_port->lspcon; struct intel_dp *intel_dp = lspcon_to_intel_dp(lspcon); struct intel_display *display = to_intel_display(intel_dp); u8 hdr_caps; @@ -137,6 +138,8 @@ void lspcon_detect_hdr_capability(struct intel_lspcon *lspcon) drm_dbg_kms(display->drm, "LSPCON capable of HDR\n"); lspcon->hdr_supported = true; } + + return lspcon->hdr_supported; } static enum drm_lspcon_mode lspcon_get_current_mode(struct intel_lspcon *lspcon) diff --git a/drivers/gpu/drm/i915/display/intel_lspcon.h b/drivers/gpu/drm/i915/display/intel_lspcon.h index 4c8ba3ddbac4..18cc15e5221d 100644 --- a/drivers/gpu/drm/i915/display/intel_lspcon.h +++ b/drivers/gpu/drm/i915/display/intel_lspcon.h @@ -17,7 +17,7 @@ struct intel_lspcon; bool lspcon_init(struct intel_digital_port *dig_port); bool intel_lspcon_active(struct intel_digital_port *dig_port); -void lspcon_detect_hdr_capability(struct intel_lspcon *lspcon); +bool lspcon_detect_hdr_capability(struct intel_digital_port *dig_port); void lspcon_resume(struct intel_digital_port *dig_port); void lspcon_wait_pcon_mode(struct intel_lspcon *lspcon); void lspcon_write_infoframe(struct intel_encoder *encoder, From patchwork Tue Dec 3 16:40:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jani Nikula X-Patchwork-Id: 13892700 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 418F7E74AC2 for ; Tue, 3 Dec 2024 16:41:22 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DE18010EAB0; Tue, 3 Dec 2024 16:41:21 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="YJ20JaeS"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.19]) by gabe.freedesktop.org (Postfix) with ESMTPS id D027210EAB0 for ; Tue, 3 Dec 2024 16:41:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1733244080; x=1764780080; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=QdGkIHX7ScrVLt/m+DhriBGSk3lv//6SJG64ywhMJKc=; b=YJ20JaeSeaQa09hTSS6M/3WQwBAlmf+lBALNLgnbt0237yqJaBy2CgMa SnACm8bjMMHY3xdGq1x7O1FpJHuy1AH+cbAZ4sbQU0d44yfqx7xgRco4W n24DKoHTUCoJbmIn2gFGxGGJ0LX/a4HGyUo8zU947cfwAJrXOsTkQtfbC Sv8sjdAo0z3gMAyqSLpA/dblQe4GVn3lBAhKwtI5UTwAH86LSdNXcDU+m q4LPkwGOWPthSRhDYi6XN618nAhMPXEkoFvrsN+99nhGkaLBBQ2dw2RlC wTnPOjR/f8xA36kBnzDKaVzDuLRL9w55OVkT9A6pa93pqAExNTPlpZgar g==; X-CSE-ConnectionGUID: vcnD9qZRTZCNVzgYCFkMTg== X-CSE-MsgGUID: JXhkSVtRQ+WrbiQx7nnKHw== X-IronPort-AV: E=McAfee;i="6700,10204,11275"; a="33347522" X-IronPort-AV: E=Sophos;i="6.12,205,1728975600"; d="scan'208";a="33347522" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by orvoesa111.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Dec 2024 08:41:20 -0800 X-CSE-ConnectionGUID: CujLD106T6OWq+6vm225vA== X-CSE-MsgGUID: Soab5TIWQde88zvhwn9N8w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,205,1728975600"; d="scan'208";a="93580485" Received: from kniemiec-mobl1.ger.corp.intel.com (HELO localhost) ([10.245.246.135]) by orviesa006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Dec 2024 08:41:18 -0800 From: Jani Nikula To: intel-gfx@lists.freedesktop.org Cc: jani.nikula@intel.com Subject: [PATCH 4/6] drm/i915/lspcon: change signature of lspcon_wait_pcon_mode() Date: Tue, 3 Dec 2024 18:40:54 +0200 Message-Id: <58877deecc2e7083d055303fa2907094eb1d09b3.1733243959.git.jani.nikula@intel.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: References: MIME-Version: 1.0 Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo 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" Switch from struct intel_lspcon to struct intel_digital_port to unify. Signed-off-by: Jani Nikula --- drivers/gpu/drm/i915/display/intel_dp.c | 3 +-- drivers/gpu/drm/i915/display/intel_lspcon.c | 4 +++- drivers/gpu/drm/i915/display/intel_lspcon.h | 4 +--- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c index f0d590b5d9ab..537476e456d3 100644 --- a/drivers/gpu/drm/i915/display/intel_dp.c +++ b/drivers/gpu/drm/i915/display/intel_dp.c @@ -3498,7 +3498,6 @@ void intel_dp_set_power(struct intel_dp *intel_dp, u8 mode) ret = drm_dp_dpcd_writeb(&intel_dp->aux, DP_SET_POWER, mode); } else { struct intel_digital_port *dig_port = dp_to_dig_port(intel_dp); - struct intel_lspcon *lspcon = dp_to_lspcon(intel_dp); lspcon_resume(dig_port); @@ -3517,7 +3516,7 @@ void intel_dp_set_power(struct intel_dp *intel_dp, u8 mode) } if (ret == 1 && intel_lspcon_active(dig_port)) - lspcon_wait_pcon_mode(lspcon); + lspcon_wait_pcon_mode(dig_port); } if (ret != 1) diff --git a/drivers/gpu/drm/i915/display/intel_lspcon.c b/drivers/gpu/drm/i915/display/intel_lspcon.c index 2c731161a711..485dad6f3629 100644 --- a/drivers/gpu/drm/i915/display/intel_lspcon.c +++ b/drivers/gpu/drm/i915/display/intel_lspcon.c @@ -654,8 +654,10 @@ u32 lspcon_infoframes_enabled(struct intel_encoder *encoder, return val; } -void lspcon_wait_pcon_mode(struct intel_lspcon *lspcon) +void lspcon_wait_pcon_mode(struct intel_digital_port *dig_port) { + struct intel_lspcon *lspcon = &dig_port->lspcon; + lspcon_wait_mode(lspcon, DRM_LSPCON_MODE_PCON); } diff --git a/drivers/gpu/drm/i915/display/intel_lspcon.h b/drivers/gpu/drm/i915/display/intel_lspcon.h index 18cc15e5221d..20581af1ddb2 100644 --- a/drivers/gpu/drm/i915/display/intel_lspcon.h +++ b/drivers/gpu/drm/i915/display/intel_lspcon.h @@ -8,18 +8,16 @@ #include -struct drm_connector; struct drm_connector_state; struct intel_crtc_state; struct intel_digital_port; struct intel_encoder; -struct intel_lspcon; bool lspcon_init(struct intel_digital_port *dig_port); bool intel_lspcon_active(struct intel_digital_port *dig_port); bool lspcon_detect_hdr_capability(struct intel_digital_port *dig_port); void lspcon_resume(struct intel_digital_port *dig_port); -void lspcon_wait_pcon_mode(struct intel_lspcon *lspcon); +void lspcon_wait_pcon_mode(struct intel_digital_port *dig_port); void lspcon_write_infoframe(struct intel_encoder *encoder, const struct intel_crtc_state *crtc_state, unsigned int type, From patchwork Tue Dec 3 16:40:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jani Nikula X-Patchwork-Id: 13892701 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 19CC0E74AC2 for ; Tue, 3 Dec 2024 16:41:26 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B38DF10EAB1; Tue, 3 Dec 2024 16:41:25 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="eUd8IngC"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.19]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0B4AD10EAAE for ; Tue, 3 Dec 2024 16:41:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1733244084; x=1764780084; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=AoZTJ2RyLEIErEUvqzSa+AWDi36LWoD8qYz+h8p5Vw0=; b=eUd8IngCZvp6//bhN3GS0pZ/8QNjUWY37yhXeSEACmlu7w1S0dXITbU6 6rkVwq0JEHAx1Da9aErte0bm99ybFbd63Q/kjRbFdo0ymkWKQHwYIWmVj ZCit1nSbT/F9iic1PTkNZNJIo3nUhT7pPtVLoStcKmQAf1dkkVLgxnJQh C2fVCu1ZyLDWN2phsyVrrIfz8jdPd9o6ycDTE2/IEN/2d/PqVa+Cyj6O4 QBl4rkTfq1DFwVkx33qNT9QMhokniu1Hc80daI229IfCsJncT2beqMhY8 UOKrUUpmB+SfPkCcsKg39Uwnjk0hftSWxIN9wrnid6w7FxvZhQSdNmVMc g==; X-CSE-ConnectionGUID: Ofh2DmArRR+5LUcXk/Znzg== X-CSE-MsgGUID: oBSoXQuHSiyDy8xRzgd4UQ== X-IronPort-AV: E=McAfee;i="6700,10204,11275"; a="33347526" X-IronPort-AV: E=Sophos;i="6.12,205,1728975600"; d="scan'208";a="33347526" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by orvoesa111.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Dec 2024 08:41:24 -0800 X-CSE-ConnectionGUID: /cXN5eDwSEusHJjCh/gLew== X-CSE-MsgGUID: R11OULgLRZiJZ/XRo8CGxQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,205,1728975600"; d="scan'208";a="93580516" Received: from kniemiec-mobl1.ger.corp.intel.com (HELO localhost) ([10.245.246.135]) by orviesa006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Dec 2024 08:41:22 -0800 From: Jani Nikula To: intel-gfx@lists.freedesktop.org Cc: jani.nikula@intel.com Subject: [PATCH 5/6] drm/i915/lspcon: remove dp_to_lspcon(), hide enc_to_intel_lspcon() Date: Tue, 3 Dec 2024 18:40:55 +0200 Message-Id: X-Mailer: git-send-email 2.39.5 In-Reply-To: References: MIME-Version: 1.0 Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo 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" There are no users left for dp_to_lspcon(), remove it. The only two users of enc_to_intel_lspcon() are in intel_lspcon.c, so hide it there. Signed-off-by: Jani Nikula --- drivers/gpu/drm/i915/display/intel_display_types.h | 12 ------------ drivers/gpu/drm/i915/display/intel_lspcon.c | 5 +++++ 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h b/drivers/gpu/drm/i915/display/intel_display_types.h index 167aa8ec4948..35b65eecc5ea 100644 --- a/drivers/gpu/drm/i915/display/intel_display_types.h +++ b/drivers/gpu/drm/i915/display/intel_display_types.h @@ -1959,24 +1959,12 @@ static inline bool intel_encoder_is_dp(struct intel_encoder *encoder) } } -static inline struct intel_lspcon * -enc_to_intel_lspcon(struct intel_encoder *encoder) -{ - return &enc_to_dig_port(encoder)->lspcon; -} - static inline struct intel_digital_port * dp_to_dig_port(struct intel_dp *intel_dp) { return container_of(intel_dp, struct intel_digital_port, dp); } -static inline struct intel_lspcon * -dp_to_lspcon(struct intel_dp *intel_dp) -{ - return &dp_to_dig_port(intel_dp)->lspcon; -} - static inline struct intel_digital_port * hdmi_to_dig_port(struct intel_hdmi *intel_hdmi) { diff --git a/drivers/gpu/drm/i915/display/intel_lspcon.c b/drivers/gpu/drm/i915/display/intel_lspcon.c index 485dad6f3629..add2461f4a13 100644 --- a/drivers/gpu/drm/i915/display/intel_lspcon.c +++ b/drivers/gpu/drm/i915/display/intel_lspcon.c @@ -54,6 +54,11 @@ #define LSPCON_PARADE_AVI_IF_KICKOFF (1 << 7) #define LSPCON_PARADE_AVI_IF_DATA_SIZE 32 +static struct intel_lspcon *enc_to_intel_lspcon(struct intel_encoder *encoder) +{ + return &enc_to_dig_port(encoder)->lspcon; +} + static struct intel_dp *lspcon_to_intel_dp(struct intel_lspcon *lspcon) { struct intel_digital_port *dig_port = From patchwork Tue Dec 3 16:40:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jani Nikula X-Patchwork-Id: 13892702 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 AAD67E74AC2 for ; Tue, 3 Dec 2024 16:41:29 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5B9E510EAB2; Tue, 3 Dec 2024 16:41:29 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="NgIfDEV9"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.19]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5117F10EAAE for ; Tue, 3 Dec 2024 16:41: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=1733244088; x=1764780088; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=x+up0kWaXps5YZ2JA0eHCuxnSnfQYH/GSMLmWBOSO2U=; b=NgIfDEV9mEaJhUNzw3guQ7tTxWK9aLI4DWf4Zi8p4ZZginCyLUXauR0R O6+fD+m/+Evi2DPqXvbqJ/6qiv9A6fO0EqDaeS8olIwwxgvOqlE0YsyGE cPRhbW773Fi6oB+p0R8AdMoztAyhX/OUeADDuvU6Ad7y7GufjzCfK1CzU JGA/UVI5iiBGAEr3wNv7sSs8YpRHUx4TG4Ur1NajJdQ54tThoMmYnH1tK aIg8MQ9ikxNg53lr0WZeXtNaqhGikcVWTypX2uYJm8Zy/AbuJr9jDOg20 vEZ6L6rYhxzGuBBD08WN5hVQNS2wPwRMQPqdDb9ff1+t9yE5sWYvPGgHl Q==; X-CSE-ConnectionGUID: nLS2+5loRhKwYxR+d9YUUA== X-CSE-MsgGUID: RdwgvefURnuVf0ITn+P6yg== X-IronPort-AV: E=McAfee;i="6700,10204,11275"; a="33347532" X-IronPort-AV: E=Sophos;i="6.12,205,1728975600"; d="scan'208";a="33347532" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by orvoesa111.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Dec 2024 08:41:28 -0800 X-CSE-ConnectionGUID: gbWnd4IwRz2lWIbdJo/kjg== X-CSE-MsgGUID: OweyXxtwQEGDfasghiGvpw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,205,1728975600"; d="scan'208";a="93580543" Received: from kniemiec-mobl1.ger.corp.intel.com (HELO localhost) ([10.245.246.135]) by orviesa006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Dec 2024 08:41:27 -0800 From: Jani Nikula To: intel-gfx@lists.freedesktop.org Cc: jani.nikula@intel.com Subject: [PATCH 6/6] drm/i915/lspcon: rename interfaces to intel_lspcon_* to unify Date: Tue, 3 Dec 2024 18:40:56 +0200 Message-Id: <10c174653dc07f5e9fdfe1109bdc5d065efacbb9.1733243959.git.jani.nikula@intel.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: References: MIME-Version: 1.0 Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo 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" Rename all the main functions to have intel_lspcon_ prefix. Keep the infoframes hooks named lspcon_ for now, and grouped together, as there'd be a clash with intel_lspcon_infoframes_enabled(). Signed-off-by: Jani Nikula --- drivers/gpu/drm/i915/display/intel_dp.c | 10 +++++----- drivers/gpu/drm/i915/display/intel_lspcon.c | 10 +++++----- drivers/gpu/drm/i915/display/intel_lspcon.h | 14 ++++++++------ 3 files changed, 18 insertions(+), 16 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c index 537476e456d3..9b95a1e1f664 100644 --- a/drivers/gpu/drm/i915/display/intel_dp.c +++ b/drivers/gpu/drm/i915/display/intel_dp.c @@ -3499,7 +3499,7 @@ void intel_dp_set_power(struct intel_dp *intel_dp, u8 mode) } else { struct intel_digital_port *dig_port = dp_to_dig_port(intel_dp); - lspcon_resume(dig_port); + intel_lspcon_resume(dig_port); /* Write the source OUI as early as possible */ intel_dp_init_source_oui(intel_dp); @@ -3516,7 +3516,7 @@ void intel_dp_set_power(struct intel_dp *intel_dp, u8 mode) } if (ret == 1 && intel_lspcon_active(dig_port)) - lspcon_wait_pcon_mode(dig_port); + intel_lspcon_wait_pcon_mode(dig_port); } if (ret != 1) @@ -5352,7 +5352,7 @@ intel_dp_detect_dpcd(struct intel_dp *intel_dp) if (drm_WARN_ON(&i915->drm, intel_dp_is_edp(intel_dp))) return connector_status_connected; - lspcon_resume(dig_port); + intel_lspcon_resume(dig_port); if (!intel_dp_get_dpcd(intel_dp)) return connector_status_disconnected; @@ -5851,8 +5851,8 @@ intel_dp_connector_register(struct drm_connector *connector) * ToDo: Clean this up to handle lspcon init and resume more * efficiently and streamlined. */ - if (lspcon_init(dig_port)) { - if (lspcon_detect_hdr_capability(dig_port)) + if (intel_lspcon_init(dig_port)) { + if (intel_lspcon_detect_hdr_capability(dig_port)) drm_connector_attach_hdr_output_metadata_property(connector); } diff --git a/drivers/gpu/drm/i915/display/intel_lspcon.c b/drivers/gpu/drm/i915/display/intel_lspcon.c index add2461f4a13..1d3108c7011c 100644 --- a/drivers/gpu/drm/i915/display/intel_lspcon.c +++ b/drivers/gpu/drm/i915/display/intel_lspcon.c @@ -125,7 +125,7 @@ static u32 get_hdr_status_reg(struct intel_lspcon *lspcon) return DPCD_PARADE_LSPCON_HDR_STATUS; } -bool lspcon_detect_hdr_capability(struct intel_digital_port *dig_port) +bool intel_lspcon_detect_hdr_capability(struct intel_digital_port *dig_port) { struct intel_lspcon *lspcon = &dig_port->lspcon; struct intel_dp *intel_dp = lspcon_to_intel_dp(lspcon); @@ -659,14 +659,14 @@ u32 lspcon_infoframes_enabled(struct intel_encoder *encoder, return val; } -void lspcon_wait_pcon_mode(struct intel_digital_port *dig_port) +void intel_lspcon_wait_pcon_mode(struct intel_digital_port *dig_port) { struct intel_lspcon *lspcon = &dig_port->lspcon; lspcon_wait_mode(lspcon, DRM_LSPCON_MODE_PCON); } -bool lspcon_init(struct intel_digital_port *dig_port) +bool intel_lspcon_init(struct intel_digital_port *dig_port) { struct intel_display *display = to_intel_display(dig_port); struct intel_dp *intel_dp = &dig_port->dp; @@ -712,7 +712,7 @@ u32 intel_lspcon_infoframes_enabled(struct intel_encoder *encoder, return dig_port->infoframes_enabled(encoder, pipe_config); } -void lspcon_resume(struct intel_digital_port *dig_port) +void intel_lspcon_resume(struct intel_digital_port *dig_port) { struct intel_display *display = to_intel_display(dig_port); struct intel_lspcon *lspcon = &dig_port->lspcon; @@ -722,7 +722,7 @@ void lspcon_resume(struct intel_digital_port *dig_port) return; if (!lspcon->active) { - if (!lspcon_init(dig_port)) { + if (!intel_lspcon_init(dig_port)) { drm_err(display->drm, "LSPCON init failed on port %c\n", port_name(dig_port->base.port)); return; diff --git a/drivers/gpu/drm/i915/display/intel_lspcon.h b/drivers/gpu/drm/i915/display/intel_lspcon.h index 20581af1ddb2..41d142a5c440 100644 --- a/drivers/gpu/drm/i915/display/intel_lspcon.h +++ b/drivers/gpu/drm/i915/display/intel_lspcon.h @@ -13,11 +13,15 @@ struct intel_crtc_state; struct intel_digital_port; struct intel_encoder; -bool lspcon_init(struct intel_digital_port *dig_port); +bool intel_lspcon_init(struct intel_digital_port *dig_port); bool intel_lspcon_active(struct intel_digital_port *dig_port); -bool lspcon_detect_hdr_capability(struct intel_digital_port *dig_port); -void lspcon_resume(struct intel_digital_port *dig_port); -void lspcon_wait_pcon_mode(struct intel_digital_port *dig_port); +bool intel_lspcon_detect_hdr_capability(struct intel_digital_port *dig_port); +void intel_lspcon_resume(struct intel_digital_port *dig_port); +void intel_lspcon_wait_pcon_mode(struct intel_digital_port *dig_port); +u32 intel_lspcon_infoframes_enabled(struct intel_encoder *encoder, + const struct intel_crtc_state *pipe_config); + +/* digital port infoframes hooks */ void lspcon_write_infoframe(struct intel_encoder *encoder, const struct intel_crtc_state *crtc_state, unsigned int type, @@ -32,7 +36,5 @@ void lspcon_set_infoframes(struct intel_encoder *encoder, const struct drm_connector_state *conn_state); u32 lspcon_infoframes_enabled(struct intel_encoder *encoder, const struct intel_crtc_state *pipe_config); -u32 intel_lspcon_infoframes_enabled(struct intel_encoder *encoder, - const struct intel_crtc_state *pipe_config); #endif /* __INTEL_LSPCON_H__ */