]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/i915: Remove dead TPS3->TPS2 fallback code
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 18 Mar 2021 16:10:09 +0000 (18:10 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 19 Mar 2021 16:30:39 +0000 (18:30 +0200)
If we ever get here with TPS3 then intel_dp_training_pattern()
is just broken. Replace the careful fallback with just
MISSING_CASE().

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210318161015.22070-2-ville.syrjala@linux.intel.com
drivers/gpu/drm/i915/display/intel_dp.c

index 2c98335c260caf5109dcd0cc4e659bc8454fa380..a6501f2c9e209835e74eeebd5e6b8ed502b79643 100644 (file)
@@ -2503,11 +2503,9 @@ cpt_set_link_train(struct intel_dp *intel_dp,
        case DP_TRAINING_PATTERN_2:
                *DP |= DP_LINK_TRAIN_PAT_2_CPT;
                break;
-       case DP_TRAINING_PATTERN_3:
-               drm_dbg_kms(&dev_priv->drm,
-                           "TPS3 not supported, using TPS2 instead\n");
-               *DP |= DP_LINK_TRAIN_PAT_2_CPT;
-               break;
+       default:
+               MISSING_CASE(intel_dp_training_pattern_symbol(dp_train_pat));
+               return;
        }
 
        intel_de_write(dev_priv, intel_dp->output_reg, intel_dp->DP);
@@ -2808,11 +2806,9 @@ g4x_set_link_train(struct intel_dp *intel_dp,
        case DP_TRAINING_PATTERN_2:
                *DP |= DP_LINK_TRAIN_PAT_2;
                break;
-       case DP_TRAINING_PATTERN_3:
-               drm_dbg_kms(&dev_priv->drm,
-                           "TPS3 not supported, using TPS2 instead\n");
-               *DP |= DP_LINK_TRAIN_PAT_2;
-               break;
+       default:
+               MISSING_CASE(intel_dp_training_pattern_symbol(dp_train_pat));
+               return;
        }
 
        intel_de_write(dev_priv, intel_dp->output_reg, intel_dp->DP);