diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-07-08 13:41:43 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-09-06 02:20:31 -0400 |
commit | 6ed0f796c22cd638fac60f29ff72b3a7a03485e6 (patch) | |
tree | 038e38b47c351e783221d2caa3333350d2e94ddc /drivers/gpu/drm/i915/intel_tv.c | |
parent | 7758a11340cc8845509303b0bee60401738da82e (diff) |
drm/i915: use staged outuput config in tv->mode_fixup
The "is this encoder cloned" check will be reused by the lvds encoder,
hence exract it.
v2: Be a bit more careful about that we need to check the new, staged
ouput configuration in the check_non_cloned helper ...
v3: Kill the double negation with s/!non_cloned/is_cloned/, suggested
by Jesse Barnes.
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_tv.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_tv.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/gpu/drm/i915/intel_tv.c b/drivers/gpu/drm/i915/intel_tv.c index 98ad7fdb366..003ef9e9280 100644 --- a/drivers/gpu/drm/i915/intel_tv.c +++ b/drivers/gpu/drm/i915/intel_tv.c | |||
@@ -910,17 +910,14 @@ intel_tv_mode_fixup(struct drm_encoder *encoder, | |||
910 | const struct drm_display_mode *mode, | 910 | const struct drm_display_mode *mode, |
911 | struct drm_display_mode *adjusted_mode) | 911 | struct drm_display_mode *adjusted_mode) |
912 | { | 912 | { |
913 | struct drm_device *dev = encoder->dev; | ||
914 | struct intel_tv *intel_tv = enc_to_intel_tv(encoder); | 913 | struct intel_tv *intel_tv = enc_to_intel_tv(encoder); |
915 | const struct tv_mode *tv_mode = intel_tv_mode_find(intel_tv); | 914 | const struct tv_mode *tv_mode = intel_tv_mode_find(intel_tv); |
916 | struct intel_encoder *other_encoder; | ||
917 | 915 | ||
918 | if (!tv_mode) | 916 | if (!tv_mode) |
919 | return false; | 917 | return false; |
920 | 918 | ||
921 | for_each_encoder_on_crtc(dev, encoder->crtc, other_encoder) | 919 | if (intel_encoder_check_is_cloned(&intel_tv->base)) |
922 | if (&other_encoder->base != encoder) | 920 | return false; |
923 | return false; | ||
924 | 921 | ||
925 | adjusted_mode->clock = tv_mode->clock; | 922 | adjusted_mode->clock = tv_mode->clock; |
926 | return true; | 923 | return true; |