Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915/display: Do not check crtc_state when initializing BW limits
@ 2026-09-21 18:46 Jonathan Cavitt
  2026-09-21 19:25 ` ✓ i915.CI.BAT: success for " Patchwork
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Jonathan Cavitt @ 2026-09-21 18:46 UTC (permalink / raw)
  To: intel-gfx; +Cc: alex.zuo, jonathan.cavitt, imre.deak

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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-09-22 12:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-21 18:46 [PATCH] drm/i915/display: Do not check crtc_state when initializing BW limits Jonathan Cavitt
2026-09-21 19:25 ` ✓ i915.CI.BAT: success for " Patchwork
2026-09-22  3:55 ` ✗ i915.CI.Full: failure " Patchwork
2026-09-22 12:27 ` [PATCH] " Imre Deak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox