drm/i915: rip out encoder->prepare/commit
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 2 Jul 2012 08:21:35 +0000 (10:21 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 6 Sep 2012 05:57:19 +0000 (07:57 +0200)
With the new infrastructure we're doing this when enabling/disabling
the entire display pipe.

Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_crt.c
drivers/gpu/drm/i915/intel_display.c
drivers/gpu/drm/i915/intel_dp.c
drivers/gpu/drm/i915/intel_drv.h
drivers/gpu/drm/i915/intel_dvo.c
drivers/gpu/drm/i915/intel_hdmi.c
drivers/gpu/drm/i915/intel_lvds.c
drivers/gpu/drm/i915/intel_sdvo.c
drivers/gpu/drm/i915/intel_tv.c

index 76646c715a42d24e57c819010a898c8056558b21..2e2581098d3262c7b1483715ced4d882cd13a361 100644 (file)
@@ -617,8 +617,6 @@ static void intel_crt_reset(struct drm_connector *connector)
 
 static const struct drm_encoder_helper_funcs crt_encoder_funcs = {
        .mode_fixup = intel_crt_mode_fixup,
-       .prepare = intel_encoder_noop,
-       .commit = intel_encoder_noop,
        .mode_set = intel_crt_mode_set,
        .disable = intel_encoder_disable,
 };
index 343f99104c39bd083032d5444cc32d975dbf0643..d37a851d0b2d098967a52c00e08629856f5d62e2 100644 (file)
@@ -3527,10 +3527,6 @@ static void intel_crtc_disable(struct drm_crtc *crtc)
        }
 }
 
-void intel_encoder_noop(struct drm_encoder *encoder)
-{
-}
-
 void intel_encoder_disable(struct drm_encoder *encoder)
 {
        struct intel_encoder *intel_encoder = to_intel_encoder(encoder);
@@ -6701,16 +6697,6 @@ bool intel_set_mode(struct drm_crtc *crtc,
        }
        DRM_DEBUG_KMS("[CRTC:%d]\n", crtc->base.id);
 
-       /* Prepare the encoders and CRTCs before setting the mode. */
-       list_for_each_entry(encoder, &dev->mode_config.encoder_list, head) {
-
-               if (encoder->crtc != crtc)
-                       continue;
-               encoder_funcs = encoder->helper_private;
-               /* Disable the encoders as the first thing we do. */
-               encoder_funcs->prepare(encoder);
-       }
-
        intel_crtc_prepare_encoders(dev);
 
        crtc_funcs->prepare(crtc);
@@ -6737,16 +6723,6 @@ bool intel_set_mode(struct drm_crtc *crtc,
        /* Now enable the clocks, plane, pipe, and connectors that we set up. */
        crtc_funcs->commit(crtc);
 
-       list_for_each_entry(encoder, &dev->mode_config.encoder_list, head) {
-
-               if (encoder->crtc != crtc)
-                       continue;
-
-               encoder_funcs = encoder->helper_private;
-               encoder_funcs->commit(encoder);
-
-       }
-
        /* Store real post-adjustment hardware mode. */
        crtc->hwmode = *adjusted_mode;
 
index 2abaaf65ae8d83c2a1d471e7a01be2a8ad2001b5..ff993a01d0398bbdd36e78cc033274a9d8eef8f4 100644 (file)
@@ -2348,9 +2348,7 @@ static void intel_dp_encoder_destroy(struct drm_encoder *encoder)
 
 static const struct drm_encoder_helper_funcs intel_dp_helper_funcs = {
        .mode_fixup = intel_dp_mode_fixup,
-       .prepare = intel_encoder_noop,
        .mode_set = intel_dp_mode_set,
-       .commit = intel_encoder_noop,
        .disable = intel_encoder_disable,
 };
 
index c28fadae8758171792cae597f500e7e42fbf7430..673e8d484bfa3b701013b95114507721d5cf9b68 100644 (file)
@@ -414,7 +414,6 @@ extern bool intel_set_mode(struct drm_crtc *crtc, struct drm_display_mode *mode,
                           int x, int y, struct drm_framebuffer *old_fb);
 extern void intel_crtc_load_lut(struct drm_crtc *crtc);
 extern void intel_crtc_update_dpms(struct drm_crtc *crtc);
-extern void intel_encoder_noop(struct drm_encoder *encoder);
 extern void intel_encoder_disable(struct drm_encoder *encoder);
 extern void intel_encoder_destroy(struct drm_encoder *encoder);
 extern void intel_encoder_dpms(struct intel_encoder *encoder, int mode);
index c55a13ea7ae8b5b27bf3b66e0feaab8c47a864d8..84c0867e212b86907ebc6bbb5098f1d4f9953732 100644 (file)
@@ -318,9 +318,7 @@ static void intel_dvo_destroy(struct drm_connector *connector)
 
 static const struct drm_encoder_helper_funcs intel_dvo_helper_funcs = {
        .mode_fixup = intel_dvo_mode_fixup,
-       .prepare = intel_encoder_noop,
        .mode_set = intel_dvo_mode_set,
-       .commit = intel_encoder_noop,
        .disable = intel_encoder_disable,
 };
 
index ef8409794ab6259ccfe1d27f49a78ce5f4d4037d..c9535cee1a73157650a1f111bbc0c03381b8ea90 100644 (file)
@@ -885,17 +885,13 @@ static void intel_hdmi_destroy(struct drm_connector *connector)
 
 static const struct drm_encoder_helper_funcs intel_hdmi_helper_funcs_hsw = {
        .mode_fixup = intel_hdmi_mode_fixup,
-       .prepare = intel_encoder_noop,
        .mode_set = intel_ddi_mode_set,
-       .commit = intel_encoder_noop,
        .disable = intel_encoder_disable,
 };
 
 static const struct drm_encoder_helper_funcs intel_hdmi_helper_funcs = {
        .mode_fixup = intel_hdmi_mode_fixup,
-       .prepare = intel_encoder_noop,
        .mode_set = intel_hdmi_mode_set,
-       .commit = intel_encoder_noop,
        .disable = intel_encoder_disable,
 };
 
index fad82b2721ed79aea1a1286f7754fe4101c7d84c..5fc7abca28ee068a5cbd99a98f14f8ecca099e83 100644 (file)
@@ -570,9 +570,7 @@ static int intel_lvds_set_property(struct drm_connector *connector,
 
 static const struct drm_encoder_helper_funcs intel_lvds_helper_funcs = {
        .mode_fixup = intel_lvds_mode_fixup,
-       .prepare = intel_encoder_noop,
        .mode_set = intel_lvds_mode_set,
-       .commit = intel_encoder_noop,
        .disable = intel_encoder_disable,
 };
 
index 88fb30dff7587a29bdb7cfeb7d5d48e857637993..8cdc674ff4b704ad33558fd60bb6c80342eca242 100644 (file)
@@ -1889,9 +1889,7 @@ done:
 
 static const struct drm_encoder_helper_funcs intel_sdvo_helper_funcs = {
        .mode_fixup = intel_sdvo_mode_fixup,
-       .prepare = intel_encoder_noop,
        .mode_set = intel_sdvo_mode_set,
-       .commit = intel_encoder_noop,
        .disable = intel_encoder_disable
 };
 
index 16cb1140506861105dd7bc6fcf8479c62171771b..5dc08b931ff9693b19d70413f2aada48c781aef3 100644 (file)
@@ -1479,9 +1479,7 @@ out:
 
 static const struct drm_encoder_helper_funcs intel_tv_helper_funcs = {
        .mode_fixup = intel_tv_mode_fixup,
-       .prepare = intel_encoder_noop,
        .mode_set = intel_tv_mode_set,
-       .commit = intel_encoder_noop,
        .disable = intel_encoder_disable,
 };