From: Jani Nikula <jani.nikula@linux.intel.com>
To: Ankit Nautiyal <ankit.k.nautiyal@intel.com>,
intel-gfx@lists.freedesktop.org
Cc: intel-xe@lists.freedesktop.org, imre.deak@intel.com
Subject: Re: [PATCH] drm/i915/dp: Return early if dsc is required but not supported
Date: Fri, 03 Jan 2025 12:03:26 +0200 [thread overview]
Message-ID: <87seq0mcy9.fsf@intel.com> (raw)
In-Reply-To: <20250103031424.1732774-1-ankit.k.nautiyal@intel.com>
On Fri, 03 Jan 2025, Ankit Nautiyal <ankit.k.nautiyal@intel.com> wrote:
> Currently, when bandwidth is insufficient for a given mode, we attempt
> to use DSC. This is indicated by a debug print, followed by a check for
> DSC support.
>
> The debug message states that we are trying DSC, but DSC might not be
> supported, which can give an incorrect picture in the logs if we bail
> out later.
>
> Correct the order for both DP and DP MST to:
> - Check if DSC is required and supported, and return early if DSC is
> not supported.
> - Print a debug message to indicate that DSC will be tried next.
>
> Suggested-by: Jani Nikula <jani.nikula@linux.intel.com>
> Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_dp.c | 8 +++++---
> drivers/gpu/drm/i915/display/intel_dp_mst.c | 7 +++++--
> 2 files changed, 10 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
> index 0d74adae2ec9..4fa0e0b675b0 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -2642,15 +2642,17 @@ intel_dp_compute_link_config(struct intel_encoder *encoder,
> dsc_needed = true;
> }
>
> + if (dsc_needed && !intel_dp_supports_dsc(intel_dp, connector, pipe_config)) {
> + drm_dbg_kms(display->drm, "DSC required but not available\n");
> + return -EINVAL;
> + }
> +
> if (dsc_needed) {
> drm_dbg_kms(display->drm,
> "Try DSC (fallback=%s, joiner=%s, force=%s)\n",
> str_yes_no(ret), str_yes_no(joiner_needs_dsc),
> str_yes_no(intel_dp->force_dsc_en));
>
> - if (!intel_dp_supports_dsc(intel_dp, connector, pipe_config))
> - return -EINVAL;
> -
> if (!intel_dp_compute_config_limits(intel_dp, pipe_config,
> respect_downstream_limits,
> true,
> diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c b/drivers/gpu/drm/i915/display/intel_dp_mst.c
> index fffd199999e0..0433f2ff77e1 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp_mst.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c
> @@ -633,14 +633,17 @@ static int mst_stream_compute_config(struct intel_encoder *encoder,
> dsc_needed = true;
> }
>
> + if (dsc_needed && !intel_dp_supports_dsc(intel_dp, connector, pipe_config)) {
> + drm_dbg_kms(display->drm, "DSC required but not available\n");
> + return -EINVAL;
> + }
> +
> /* enable compression if the mode doesn't fit available BW */
> if (dsc_needed) {
> drm_dbg_kms(display->drm, "Try DSC (fallback=%s, joiner=%s, force=%s)\n",
> str_yes_no(ret), str_yes_no(joiner_needs_dsc),
> str_yes_no(intel_dp->force_dsc_en));
>
> - if (!intel_dp_supports_dsc(intel_dp, connector, pipe_config))
> - return -EINVAL;
>
> if (!mst_stream_compute_config_limits(intel_dp, connector,
> pipe_config, true,
--
Jani Nikula, Intel
next prev parent reply other threads:[~2025-01-03 10:03 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-03 3:14 [PATCH] drm/i915/dp: Return early if dsc is required but not supported Ankit Nautiyal
2025-01-03 4:30 ` ✓ CI.Patch_applied: success for " Patchwork
2025-01-03 4:30 ` ✓ CI.checkpatch: " Patchwork
2025-01-03 4:32 ` ✓ CI.KUnit: " Patchwork
2025-01-03 4:50 ` ✓ CI.Build: " Patchwork
2025-01-03 4:52 ` ✓ CI.Hooks: " Patchwork
2025-01-03 4:53 ` ✓ CI.checksparse: " Patchwork
2025-01-03 5:16 ` ✗ i915.CI.BAT: failure " Patchwork
2025-01-03 5:26 ` ✓ Xe.CI.BAT: success " Patchwork
2025-01-03 5:34 ` [PATCH] " Kandpal, Suraj
2025-01-03 6:58 ` ✗ Xe.CI.Full: failure for " Patchwork
2025-01-03 10:03 ` Jani Nikula [this message]
2025-01-06 5:34 ` ✓ i915.CI.BAT: success " Patchwork
2025-01-06 7:20 ` ✗ i915.CI.Full: failure " Patchwork
2025-01-06 10:41 ` ✓ i915.CI.Full: success " Patchwork
2025-01-07 8:21 ` [PATCH] " Nautiyal, Ankit K
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87seq0mcy9.fsf@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=ankit.k.nautiyal@intel.com \
--cc=imre.deak@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.