diff options
author | Paulo Zanoni <paulo.r.zanoni@intel.com> | 2012-08-10 09:05:10 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-08-10 12:34:05 -0400 |
commit | 228d3e367c91af16d672fb8bff78b030acb5efc3 (patch) | |
tree | 75a55eaf471c9e3e7168c1ac8921a0ad9cf87c0e /drivers/gpu/drm/i915 | |
parent | b2eadbc85b2c26df3fd2fe5c53c2a47cfd307249 (diff) |
drm/i915: use the correct encoder type when comparing
- intel_encoder->type is INTEL_OUTPUT_SOMETHING
- drm_encoder->encoder_type is DRM_MODE_ENCODER_SOMETHING
Here we're using intel_encoder, so compare the oranges against
oranges. While at it, rename the variable to "intel_encoder" so we
keep our naming standards used everywhere.
Luckily this was not a bug because both DRM_MODE_ENCODER_DAC and
INTEL_OUTPUT_ANALOG are defined as 1. This is the only case where the
drm definition matches the intel definition.
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915')
-rw-r--r-- | drivers/gpu/drm/i915/intel_display.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index bddb29002c03..e3afe9688905 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c | |||
@@ -2837,13 +2837,13 @@ static void intel_crtc_wait_for_pending_flips(struct drm_crtc *crtc) | |||
2837 | static bool intel_crtc_driving_pch(struct drm_crtc *crtc) | 2837 | static bool intel_crtc_driving_pch(struct drm_crtc *crtc) |
2838 | { | 2838 | { |
2839 | struct drm_device *dev = crtc->dev; | 2839 | struct drm_device *dev = crtc->dev; |
2840 | struct intel_encoder *encoder; | 2840 | struct intel_encoder *intel_encoder; |
2841 | 2841 | ||
2842 | /* | 2842 | /* |
2843 | * If there's a non-PCH eDP on this crtc, it must be DP_A, and that | 2843 | * If there's a non-PCH eDP on this crtc, it must be DP_A, and that |
2844 | * must be driven by its own crtc; no sharing is possible. | 2844 | * must be driven by its own crtc; no sharing is possible. |
2845 | */ | 2845 | */ |
2846 | for_each_encoder_on_crtc(dev, crtc, encoder) { | 2846 | for_each_encoder_on_crtc(dev, crtc, intel_encoder) { |
2847 | 2847 | ||
2848 | /* On Haswell, LPT PCH handles the VGA connection via FDI, and Haswell | 2848 | /* On Haswell, LPT PCH handles the VGA connection via FDI, and Haswell |
2849 | * CPU handles all others */ | 2849 | * CPU handles all others */ |
@@ -2851,19 +2851,19 @@ static bool intel_crtc_driving_pch(struct drm_crtc *crtc) | |||
2851 | /* It is still unclear how this will work on PPT, so throw up a warning */ | 2851 | /* It is still unclear how this will work on PPT, so throw up a warning */ |
2852 | WARN_ON(!HAS_PCH_LPT(dev)); | 2852 | WARN_ON(!HAS_PCH_LPT(dev)); |
2853 | 2853 | ||
2854 | if (encoder->type == DRM_MODE_ENCODER_DAC) { | 2854 | if (intel_encoder->type == INTEL_OUTPUT_ANALOG) { |
2855 | DRM_DEBUG_KMS("Haswell detected DAC encoder, assuming is PCH\n"); | 2855 | DRM_DEBUG_KMS("Haswell detected DAC encoder, assuming is PCH\n"); |
2856 | return true; | 2856 | return true; |
2857 | } else { | 2857 | } else { |
2858 | DRM_DEBUG_KMS("Haswell detected encoder %d, assuming is CPU\n", | 2858 | DRM_DEBUG_KMS("Haswell detected encoder %d, assuming is CPU\n", |
2859 | encoder->type); | 2859 | intel_encoder->type); |
2860 | return false; | 2860 | return false; |
2861 | } | 2861 | } |
2862 | } | 2862 | } |
2863 | 2863 | ||
2864 | switch (encoder->type) { | 2864 | switch (intel_encoder->type) { |
2865 | case INTEL_OUTPUT_EDP: | 2865 | case INTEL_OUTPUT_EDP: |
2866 | if (!intel_encoder_is_pch_edp(&encoder->base)) | 2866 | if (!intel_encoder_is_pch_edp(&intel_encoder->base)) |
2867 | return false; | 2867 | return false; |
2868 | continue; | 2868 | continue; |
2869 | } | 2869 | } |