From: Jani Nikula <jani.nikula@linux.intel.com>
To: Suraj Kandpal <suraj.kandpal@intel.com>,
intel-xe@lists.freedesktop.org, intel-gfx@lists.freedesktop.org
Cc: ankit.k.nautiyal@intel.com, Suraj Kandpal <suraj.kandpal@intel.com>
Subject: Re: [PATCH] drm/i915/dp_mst: Fix dsc mst bw overhead calculation
Date: Wed, 09 Oct 2024 13:00:03 +0300 [thread overview]
Message-ID: <87v7y1a95o.fsf@intel.com> (raw)
In-Reply-To: <20241009054050.1796088-1-suraj.kandpal@intel.com>
On Wed, 09 Oct 2024, Suraj Kandpal <suraj.kandpal@intel.com> wrote:
> Fix the DSC flag assignment based on the dsc_slice_count returned
> to avoid divide by zero error.
>
> Fixes: 4e0837a8d00a ("drm/i915/dp_mst: Account for FEC and DSC overhead during BW allocation")
> Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_dp_mst.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c b/drivers/gpu/drm/i915/display/intel_dp_mst.c
> index 4765bda154c1..bacd294d6bb6 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp_mst.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c
> @@ -105,11 +105,16 @@ static int intel_dp_mst_bw_overhead(const struct intel_crtc_state *crtc_state,
> if (dsc) {
> int num_joined_pipes = intel_crtc_num_joined_pipes(crtc_state);
>
> - flags |= DRM_DP_BW_OVERHEAD_DSC;
> dsc_slice_count = intel_dp_dsc_get_slice_count(connector,
> adjusted_mode->clock,
> adjusted_mode->hdisplay,
> num_joined_pipes);
> + /*
> + * Try with dsc only if dsc_slice_count has a sane value i.e value is no
> + * 0
> + */
> + if (dsc_slice_count)
> + flags |= DRM_DP_BW_OVERHEAD_DSC;
Do you think that's enough to handle the error?!
BR,
Jani.
> }
>
> overhead = drm_dp_bw_overhead(crtc_state->lane_count,
--
Jani Nikula, Intel
next prev parent reply other threads:[~2024-10-09 10:00 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-09 5:40 [PATCH] drm/i915/dp_mst: Fix dsc mst bw overhead calculation Suraj Kandpal
2024-10-09 6:06 ` ✓ CI.Patch_applied: success for " Patchwork
2024-10-09 6:06 ` ✓ CI.checkpatch: " Patchwork
2024-10-09 6:07 ` ✓ CI.KUnit: " Patchwork
2024-10-09 6:19 ` ✓ CI.Build: " Patchwork
2024-10-09 6:21 ` ✓ CI.Hooks: " Patchwork
2024-10-09 6:22 ` ✗ CI.checksparse: warning " Patchwork
2024-10-09 6:46 ` ✓ CI.BAT: success " Patchwork
2024-10-09 10:00 ` Jani Nikula [this message]
2024-10-09 10:45 ` [PATCH] " Kandpal, Suraj
2024-10-09 11:10 ` Nautiyal, Ankit K
2024-10-09 11:07 ` Imre Deak
2024-10-09 11:15 ` Nautiyal, Ankit K
2024-10-09 11:35 ` ✗ CI.FULL: failure for " Patchwork
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=87v7y1a95o.fsf@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=ankit.k.nautiyal@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=suraj.kandpal@intel.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox