summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2012-07-02 10:16:35 +0200
committerDaniel Vetter <daniel.vetter@ffwll.ch>2012-09-06 07:57:03 +0200
commit821112aa413285ae8a49f787ba01ab30e930ad85 (patch)
treeb879105ca5f38803e863091f4a034ecdcd8a26f9
parenta6778b3cfd7711951d8973286b783bc061281256 (diff)
downloadop-kernel-dev-821112aa413285ae8a49f787ba01ab30e930ad85.zip
op-kernel-dev-821112aa413285ae8a49f787ba01ab30e930ad85.tar.gz
drm/i915: simplify intel_crtc_prepare_encoders
- We don't have the ->get_crtc callback. - Call intel_encoder->disable directly. Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
-rw-r--r--drivers/gpu/drm/i915/intel_display.c25
1 files changed, 4 insertions, 21 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 3e119a6..343f991 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -6636,31 +6636,14 @@ intel_crtc_helper_disable(struct drm_crtc *crtc)
}
static void
-intel_encoder_disable_helper(struct drm_encoder *encoder)
-{
- struct drm_encoder_helper_funcs *encoder_funcs = encoder->helper_private;
-
- if (encoder_funcs->disable)
- (*encoder_funcs->disable)(encoder);
- else
- (*encoder_funcs->dpms)(encoder, DRM_MODE_DPMS_OFF);
-}
-
-static void
intel_crtc_prepare_encoders(struct drm_device *dev)
{
- struct drm_encoder_helper_funcs *encoder_funcs;
- struct drm_encoder *encoder;
+ struct intel_encoder *encoder;
- list_for_each_entry(encoder, &dev->mode_config.encoder_list, head) {
- encoder_funcs = encoder->helper_private;
+ list_for_each_entry(encoder, &dev->mode_config.encoder_list, base.head) {
/* Disable unused encoders */
- if (encoder->crtc == NULL)
- intel_encoder_disable_helper(encoder);
- /* Disable encoders whose CRTC is about to change */
- if (encoder_funcs->get_crtc &&
- encoder->crtc != (*encoder_funcs->get_crtc)(encoder))
- intel_encoder_disable_helper(encoder);
+ if (encoder->base.crtc == NULL)
+ encoder->disable(encoder);
}
}
OpenPOWER on IntegriCloud