[PATCH 14/16] drm/i915: Compute config and mode valid changes for ultrajoiner
Ville Syrjälä
ville.syrjala at linux.intel.com
Mon Sep 23 19:06:55 UTC 2024
On Mon, Sep 23, 2024 at 11:43:34PM +0530, Ankit Nautiyal wrote:
> From: Stanislav Lisovskiy <stanislav.lisovskiy at intel.com>
>
> Implement required changes for mode validation and compute config,
> to support Ultrajoiner.
>
> v2:
> -Drop changes for HDMI.
> -Separate out DSC changes into another patch.
> v3: Fix check in can_ultrajoiner. (Ankit)
> v4:
> -Unify helper to check joiner requirement. (Ville)
> -Split patches for ultrajoiner changes for max dsc slices and compressed
> bpp.(Ankit)
>
> Signed-off-by: Stanislav Lisovskiy <stanislav.lisovskiy at intel.com>
> Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal at intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_dp.c | 26 +++++++++++++++++++------
> 1 file changed, 20 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
> index 115d8468bb91..8e0cb6c77c64 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -1280,26 +1280,38 @@ intel_dp_mode_valid_downstream(struct intel_connector *connector,
> }
>
> static
> -bool intel_dp_needs_bigjoiner(struct intel_dp *intel_dp,
> - struct intel_connector *connector,
> - int hdisplay, int clock)
> +bool intel_dp_needs_joiner(struct intel_dp *intel_dp,
> + struct intel_connector *connector,
> + int hdisplay, int clock,
> + int num_joined_pipes)
> {
> struct drm_i915_private *i915 = dp_to_i915(intel_dp);
>
> if (!intel_dp_has_joiner(intel_dp))
> return false;
>
> - return clock > i915->display.cdclk.max_dotclk_freq || hdisplay > 5120;
> + num_joined_pipes /= 2;
> +
> + return clock > num_joined_pipes * i915->display.cdclk.max_dotclk_freq ||
> + hdisplay > 5120;
'num_joined_pipes * 5120'
With that
Reviewed-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
> }
>
> int intel_dp_num_joined_pipes(struct intel_dp *intel_dp,
> struct intel_connector *connector,
> int hdisplay, int clock)
> {
> + struct intel_display *display = to_intel_display(intel_dp);
> + struct drm_i915_private *i915 = to_i915(display->drm);
> +
> if (connector->force_joined_pipes)
> return connector->force_joined_pipes;
>
> - if (intel_dp_needs_bigjoiner(intel_dp, connector, hdisplay, clock))
> + if (HAS_ULTRAJOINER(i915) &&
> + intel_dp_needs_joiner(intel_dp, connector, hdisplay, clock, 4))
> + return 4;
> +
> + if ((HAS_BIGJOINER(i915) || HAS_UNCOMPRESSED_JOINER(i915)) &&
> + intel_dp_needs_joiner(intel_dp, connector, hdisplay, clock, 2))
> return 2;
>
> return 1;
> @@ -2505,8 +2517,10 @@ bool intel_dp_joiner_needs_dsc(struct drm_i915_private *i915,
> * Pipe joiner needs compression up to display 12 due to bandwidth
> * limitation. DG2 onwards pipe joiner can be enabled without
> * compression.
> + * Ultrajoiner always needs compression.
> */
> - return !HAS_UNCOMPRESSED_JOINER(i915) && num_joined_pipes == 2;
> + return (!HAS_UNCOMPRESSED_JOINER(i915) && num_joined_pipes == 2) ||
> + num_joined_pipes == 4;
> }
>
> static int
> --
> 2.45.2
--
Ville Syrjälä
Intel
More information about the Intel-gfx
mailing list