drm/i915: Use HAS_PCH_CPT() everywhere
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Tue, 20 Jun 2017 13:03:06 +0000 (16:03 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 22 Jun 2017 16:08:34 +0000 (19:08 +0300)
We have a few cases comparing pch_type directly. Let's just replace
them with HAS_PCH_CPT() since CPT/PPT is what they're looking for.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170620130310.13245-2-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
drivers/gpu/drm/i915/intel_device_info.c
drivers/gpu/drm/i915/intel_sdvo.c

index 77d3214e1a7773bf1c1a8571ca826a80cf245f54..5f91ddc78c7a332c92653651fe983345bdea1a58 100644 (file)
@@ -363,7 +363,7 @@ void intel_device_info_runtime_init(struct drm_i915_private *dev_priv)
                 */
                if (fuse_strap & ILK_INTERNAL_DISPLAY_DISABLE ||
                    sfuse_strap & SFUSE_STRAP_DISPLAY_DISABLED ||
-                   (dev_priv->pch_type == PCH_CPT &&
+                   (HAS_PCH_CPT(dev_priv) &&
                     !(sfuse_strap & SFUSE_STRAP_FUSE_LOCK))) {
                        DRM_INFO("Display fused off, disabling\n");
                        info->num_pipes = 0;
index 3f8f30b412cd883c6919f9c59ca32610a344cf0e..f902922d4ae6b5cf865e005136e2919af778f39d 100644 (file)
@@ -1343,7 +1343,7 @@ static void intel_sdvo_pre_enable(struct intel_encoder *intel_encoder,
                sdvox |= (9 << 19) | SDVO_BORDER_ENABLE;
        }
 
-       if (INTEL_PCH_TYPE(dev_priv) >= PCH_CPT)
+       if (HAS_PCH_CPT(dev_priv))
                sdvox |= SDVO_PIPE_SEL_CPT(crtc->pipe);
        else
                sdvox |= SDVO_PIPE_SEL(crtc->pipe);