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 BA8B4CD98F2 for ; Mon, 22 Jun 2026 21:36:30 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5ACE510E8AD; Mon, 22 Jun 2026 21:36:30 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="UWjGSoL6"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.20]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6CB5010E8A1; Mon, 22 Jun 2026 21:36: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=1782164190; x=1813700190; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=4Y4j1dpFvccxjjqjoDM6b486D8XRlyq1jBlQTR7tZxE=; b=UWjGSoL6YJzuyhPBUIhxdwIkrJqCLjRaa3xRwPMa6EDuBhBehHTLFUFt YzM5ehv0HV4h6mDE3hAnyJGvypIqSkiSYPR01g/X3OgVtfN39BI7cpNY3 4g7dY2yHF+4ikF2lrSZwQE06v2WbtUBm8PT7cXylTp4y2iUJtPZgrB2c6 9+EC27p0Y/2/NCvbCT/GpgRZqCYVVYmH9mGLFXkKFyaEHOBvjhuTSm1v/ v2KQOhJ9EW2y0sQbOJQWduFY3Qls1aE9DCDsfeEkwvENGLeEamSV/0MIl 5JZkOLjp7UuuxzR7TmYczVPqK1ScTQXwLqxhh+k9GTs3an3BLOKeuXEmF A==; X-CSE-ConnectionGUID: aEt3OgB6Ss+KP4TiaxlJyg== X-CSE-MsgGUID: 9kC10DmDRQ2ZjuWcxeBXIA== X-IronPort-AV: E=McAfee;i="6800,10657,11825"; a="82673613" X-IronPort-AV: E=Sophos;i="6.24,219,1774335600"; d="scan'208";a="82673613" Received: from fmviesa007.fm.intel.com ([10.60.135.147]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Jun 2026 14:36:29 -0700 X-CSE-ConnectionGUID: bDt/dLRNSIaSLzZNGaFoTw== X-CSE-MsgGUID: PRMqIGmqQDS6g0MgWjf3fQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.24,219,1774335600"; d="scan'208";a="246422773" Received: from kniemiec-mobl1.ger.corp.intel.com (HELO localhost) ([10.245.245.160]) by fmviesa007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Jun 2026 14:36:27 -0700 From: Ville Syrjala To: intel-gfx@lists.freedesktop.org Cc: intel-xe@lists.freedesktop.org, dri-devel@lists.freedesktop.org, Suraj Kandpal Subject: [PATCH v2 4/5] drm/i915/panel: Adjust intel_panel_compute_config() calling convention Date: Tue, 23 Jun 2026 00:36:01 +0300 Message-ID: <20260622213602.7244-5-ville.syrjala@linux.intel.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260622213602.7244-1-ville.syrjala@linux.intel.com> References: <20260622213602.7244-1-ville.syrjala@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Organization: Intel Finland Oy - BIC 0357606-4 - c/o Alberga Business Park, 6 krs Bertel Jungin Aukio 5, 02600 Espoo, Finland 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" From: Ville Syrjälä Pass the full atomic state to intel_panel_compute_config(). We'll need this for some upcoming VRR fastset tricks. And to accompany full state we'll also need the crtc (or its state) as well. Reviewed-by: Suraj Kandpal Signed-off-by: Ville Syrjälä --- drivers/gpu/drm/i915/display/icl_dsi.c | 2 +- drivers/gpu/drm/i915/display/intel_dp.c | 2 +- drivers/gpu/drm/i915/display/intel_dvo.c | 2 +- drivers/gpu/drm/i915/display/intel_lvds.c | 2 +- drivers/gpu/drm/i915/display/intel_panel.c | 24 +++++++++++++--------- drivers/gpu/drm/i915/display/intel_panel.h | 6 ++++-- drivers/gpu/drm/i915/display/intel_sdvo.c | 4 ++-- drivers/gpu/drm/i915/display/vlv_dsi.c | 2 +- 8 files changed, 25 insertions(+), 19 deletions(-) diff --git a/drivers/gpu/drm/i915/display/icl_dsi.c b/drivers/gpu/drm/i915/display/icl_dsi.c index 59184f2f805c..ea0cdb7822f3 100644 --- a/drivers/gpu/drm/i915/display/icl_dsi.c +++ b/drivers/gpu/drm/i915/display/icl_dsi.c @@ -1672,7 +1672,7 @@ static int gen11_dsi_compute_config(struct intel_atomic_state *state, pipe_config->sink_format = INTEL_OUTPUT_FORMAT_RGB; pipe_config->output_format = INTEL_OUTPUT_FORMAT_RGB; - ret = intel_panel_compute_config(intel_connector, adjusted_mode); + ret = intel_panel_compute_config(state, pipe_config, intel_connector); if (ret) return ret; diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c index b9324b590ee9..da8a94821c11 100644 --- a/drivers/gpu/drm/i915/display/intel_dp.c +++ b/drivers/gpu/drm/i915/display/intel_dp.c @@ -3639,7 +3639,7 @@ intel_dp_compute_config(struct intel_atomic_state *state, int ret = 0, link_bpp_x16; if (intel_dp_is_edp(intel_dp)) { - ret = intel_panel_compute_config(connector, adjusted_mode); + ret = intel_panel_compute_config(state, pipe_config, connector); if (ret) return ret; } diff --git a/drivers/gpu/drm/i915/display/intel_dvo.c b/drivers/gpu/drm/i915/display/intel_dvo.c index 181722c41b96..f157699a7c4c 100644 --- a/drivers/gpu/drm/i915/display/intel_dvo.c +++ b/drivers/gpu/drm/i915/display/intel_dvo.c @@ -257,7 +257,7 @@ static int intel_dvo_compute_config(struct intel_atomic_state *state, * with the panel scaling set up to source from the H/VDisplay * of the original mode. */ - ret = intel_panel_compute_config(connector, adjusted_mode); + ret = intel_panel_compute_config(state, pipe_config, connector); if (ret) return ret; diff --git a/drivers/gpu/drm/i915/display/intel_lvds.c b/drivers/gpu/drm/i915/display/intel_lvds.c index 30e4809b36ac..872753478cf2 100644 --- a/drivers/gpu/drm/i915/display/intel_lvds.c +++ b/drivers/gpu/drm/i915/display/intel_lvds.c @@ -460,7 +460,7 @@ static int intel_lvds_compute_config(struct intel_atomic_state *state, * with the panel scaling set up to source from the H/VDisplay * of the original mode. */ - ret = intel_panel_compute_config(connector, adjusted_mode); + ret = intel_panel_compute_config(state, crtc_state, connector); if (ret) return ret; diff --git a/drivers/gpu/drm/i915/display/intel_panel.c b/drivers/gpu/drm/i915/display/intel_panel.c index 12a27edf8bc8..faa24537ef63 100644 --- a/drivers/gpu/drm/i915/display/intel_panel.c +++ b/drivers/gpu/drm/i915/display/intel_panel.c @@ -219,11 +219,12 @@ enum drrs_type intel_panel_drrs_type(struct intel_connector *connector) return connector->panel.vbt.drrs_type; } -static int intel_panel_compute_config_vrr(struct intel_connector *connector, - struct drm_display_mode *adjusted_mode) +static int intel_panel_compute_config_vrr(struct intel_atomic_state *state, + struct intel_crtc_state *crtc_state, + struct intel_connector *connector) { - const struct drm_display_mode *fixed_mode = - intel_panel_fixed_mode(connector, adjusted_mode); + struct drm_display_mode *adjusted_mode = &crtc_state->hw.adjusted_mode; + const struct drm_display_mode *fixed_mode; int vrefresh, fixed_mode_vrefresh; fixed_mode = intel_panel_fixed_mode_vrr(connector, adjusted_mode); @@ -252,9 +253,11 @@ static int intel_panel_compute_config_vrr(struct intel_connector *connector, return 0; } -static int intel_panel_compute_config_fixed_rr(struct intel_connector *connector, - struct drm_display_mode *adjusted_mode) +static int intel_panel_compute_config_fixed_rr(struct intel_atomic_state *state, + struct intel_crtc_state *crtc_state, + struct intel_connector *connector) { + struct drm_display_mode *adjusted_mode = &crtc_state->hw.adjusted_mode; const struct drm_display_mode *fixed_mode; int vrefresh, fixed_mode_vrefresh; @@ -287,14 +290,15 @@ static int intel_panel_compute_config_fixed_rr(struct intel_connector *connector return 0; } -int intel_panel_compute_config(struct intel_connector *connector, - struct drm_display_mode *adjusted_mode) +int intel_panel_compute_config(struct intel_atomic_state *state, + struct intel_crtc_state *crtc_state, + struct intel_connector *connector) { int ret; - ret = intel_panel_compute_config_vrr(connector, adjusted_mode); + ret = intel_panel_compute_config_vrr(state, crtc_state, connector); if (ret) - ret = intel_panel_compute_config_fixed_rr(connector, adjusted_mode); + ret = intel_panel_compute_config_fixed_rr(state, crtc_state, connector); return ret; } diff --git a/drivers/gpu/drm/i915/display/intel_panel.h b/drivers/gpu/drm/i915/display/intel_panel.h index 23bd227826c9..30c6078ecb1b 100644 --- a/drivers/gpu/drm/i915/display/intel_panel.h +++ b/drivers/gpu/drm/i915/display/intel_panel.h @@ -14,6 +14,7 @@ struct drm_connector; struct drm_connector_state; struct drm_display_mode; struct drm_edid; +struct intel_atomic_state; struct intel_connector; struct intel_crtc_state; struct intel_display; @@ -45,8 +46,9 @@ enum drm_mode_status intel_panel_mode_valid(struct intel_connector *connector, const struct drm_display_mode *mode, int *target_clock); -int intel_panel_compute_config(struct intel_connector *connector, - struct drm_display_mode *adjusted_mode); +int intel_panel_compute_config(struct intel_atomic_state *state, + struct intel_crtc_state *crtc_state, + struct intel_connector *connector); void intel_panel_add_edid_fixed_modes(struct intel_connector *connector, bool use_alt_fixed_modes); void intel_panel_add_vbt_lfp_fixed_mode(struct intel_connector *connector); diff --git a/drivers/gpu/drm/i915/display/intel_sdvo.c b/drivers/gpu/drm/i915/display/intel_sdvo.c index 6b73c9a5ec7f..3075ef04df56 100644 --- a/drivers/gpu/drm/i915/display/intel_sdvo.c +++ b/drivers/gpu/drm/i915/display/intel_sdvo.c @@ -1399,8 +1399,8 @@ static int intel_sdvo_compute_config(struct intel_atomic_state *state, const struct drm_display_mode *fixed_mode; int ret; - ret = intel_panel_compute_config(&intel_sdvo_connector->base, - adjusted_mode); + ret = intel_panel_compute_config(state, pipe_config, + &intel_sdvo_connector->base); if (ret) return ret; diff --git a/drivers/gpu/drm/i915/display/vlv_dsi.c b/drivers/gpu/drm/i915/display/vlv_dsi.c index b89318f5bdc2..8829f365592e 100644 --- a/drivers/gpu/drm/i915/display/vlv_dsi.c +++ b/drivers/gpu/drm/i915/display/vlv_dsi.c @@ -281,7 +281,7 @@ static int intel_dsi_compute_config(struct intel_atomic_state *state, pipe_config->sink_format = INTEL_OUTPUT_FORMAT_RGB; pipe_config->output_format = INTEL_OUTPUT_FORMAT_RGB; - ret = intel_panel_compute_config(intel_connector, adjusted_mode); + ret = intel_panel_compute_config(state, pipe_config, intel_connector); if (ret) return ret; -- 2.53.0