diff options
| author | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2021-10-01 16:01:03 +0300 |
|---|---|---|
| committer | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2021-10-04 13:01:28 +0300 |
| commit | 2c63e0f92e2fe3400ebfec7952f9dcbff6a583a9 (patch) | |
| tree | d7241b6894df02bfb553e68e0ac51b801d137980 /drivers/gpu/drm/i915/display/intel_dpio_phy.c | |
| parent | 5f5ada0bae454aababf83b9fde3ae6b8df73afe1 (diff) | |
drm/i915: Hoover the level>=n_entries WARN into intel_ddi_level()
All callers of intel_ddi_level() duplicate the check+WARN
to make sure the returned level is actually present in the
appropriate buf_trans table. Let's push that stuff into
intel_ddi_level() so the callers don't have to worry about it.
Reviewed-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20211001130107.1746-7-ville.syrjala@linux.intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/display/intel_dpio_phy.c')
| -rw-r--r-- | drivers/gpu/drm/i915/display/intel_dpio_phy.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/display/intel_dpio_phy.c b/drivers/gpu/drm/i915/display/intel_dpio_phy.c index 4d604e4cfa5d..96650369164d 100644 --- a/drivers/gpu/drm/i915/display/intel_dpio_phy.c +++ b/drivers/gpu/drm/i915/display/intel_dpio_phy.c @@ -282,8 +282,6 @@ void bxt_ddi_phy_set_signal_levels(struct intel_encoder *encoder, trans = encoder->get_buf_trans(encoder, crtc_state, &n_entries); if (drm_WARN_ON_ONCE(&dev_priv->drm, !trans)) return; - if (drm_WARN_ON_ONCE(&dev_priv->drm, level >= n_entries)) - level = n_entries - 1; bxt_port_to_phy_channel(dev_priv, encoder->port, &phy, &ch); |