From: Jonathan Cavitt <jonathan.cavitt@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: alex.zuo@intel.com, jonathan.cavitt@intel.com, imre.deak@intel.com
Subject: [PATCH] drm/i915/display: Do not check crtc_state when initializing BW limits
Date: Tue, 22 Sep 2026 02:46:17 +0800 [thread overview]
Message-ID: <20260921184617.609564-1-jonathan.cavitt@intel.com> (raw)
In intel_link_bw_init_limits, we call intel_atomic_get_new_crtc_state to
grab an intel_crtc_state pointer. This pointer is later used to set the
max_bpp_x16 value for the given pipe. There is a check here for if the
return value of the intel_atomic_get_new_crtc_state function returns
NULL, but this is not checked in any other place where this function is
used. Removing this check makes the code more consistent and prevents
confusion from static analyzers.
Signed-off-by: Jonathan Cavitt <jonathan.cavitt@intel.com>
Cc: Imre Deak <imre.deak@intel.com>
---
drivers/gpu/drm/i915/display/intel_link_bw.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_link_bw.c b/drivers/gpu/drm/i915/display/intel_link_bw.c
index e71e76d6fd3e0..2a20a12de9e0a 100644
--- a/drivers/gpu/drm/i915/display/intel_link_bw.c
+++ b/drivers/gpu/drm/i915/display/intel_link_bw.c
@@ -64,8 +64,7 @@ void intel_link_bw_init_limits(struct intel_atomic_state *state,
intel_atomic_get_new_crtc_state(state, crtc);
int forced_bpp_x16 = get_forced_link_bpp_x16(state, crtc);
- if ((state->base.duplicated && crtc_state) ||
- intel_dp_mst_stream_disconnected(state, crtc)) {
+ if (state->base.duplicated || intel_dp_mst_stream_disconnected(state, crtc)) {
limits->max_bpp_x16[pipe] = crtc_state->max_link_bpp_x16;
if (intel_dsc_enabled_on_link(crtc_state))
limits->link_dsc_pipes |= BIT(pipe);
--
2.53.0
next reply other threads:[~2026-09-21 18:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-21 18:46 Jonathan Cavitt [this message]
2026-09-21 19:25 ` ✓ i915.CI.BAT: success for drm/i915/display: Do not check crtc_state when initializing BW limits Patchwork
2026-09-22 3:55 ` ✗ i915.CI.Full: failure " Patchwork
2026-09-22 12:27 ` [PATCH] " Imre Deak
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=20260921184617.609564-1-jonathan.cavitt@intel.com \
--to=jonathan.cavitt@intel.com \
--cc=alex.zuo@intel.com \
--cc=imre.deak@intel.com \
--cc=intel-gfx@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox