drm/i915: drop intel_encoder argument to load_detect_pipe functions
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Sun, 12 Aug 2012 19:20:10 +0000 (21:20 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 17 Aug 2012 08:10:02 +0000 (10:10 +0200)
Since it's redundant - we can get the attached encoder in the
functions themselves.

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
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_drv.h
drivers/gpu/drm/i915/intel_tv.c

index bc5e2c97db616aef9fb0be8f4e2b3b1e72390aa4..62b6555cfa272c628efab4ffed1781eefea5c364 100644 (file)
@@ -517,14 +517,12 @@ intel_crt_detect(struct drm_connector *connector, bool force)
                return connector->status;
 
        /* for pre-945g platforms use load detect */
-       if (intel_get_load_detect_pipe(&crt->base, connector, NULL,
-                                      &tmp)) {
+       if (intel_get_load_detect_pipe(connector, NULL, &tmp)) {
                if (intel_crt_detect_ddc(connector))
                        status = connector_status_connected;
                else
                        status = intel_crt_load_detect(crt);
-               intel_release_load_detect_pipe(&crt->base, connector,
-                                              &tmp);
+               intel_release_load_detect_pipe(connector, &tmp);
        } else
                status = connector_status_unknown;
 
index f851474fe0663db4e5448c9ed65368b844704bd8..62524b036bd17c59b2d543c02f03d6d318e42ca3 100644 (file)
@@ -5584,12 +5584,13 @@ mode_fits_in_fbdev(struct drm_device *dev,
        return fb;
 }
 
-bool intel_get_load_detect_pipe(struct intel_encoder *intel_encoder,
-                               struct drm_connector *connector,
+bool intel_get_load_detect_pipe(struct drm_connector *connector,
                                struct drm_display_mode *mode,
                                struct intel_load_detect_pipe *old)
 {
        struct intel_crtc *intel_crtc;
+       struct intel_encoder *intel_encoder =
+               intel_attached_encoder(connector);
        struct drm_crtc *possible_crtc;
        struct drm_encoder *encoder = &intel_encoder->base;
        struct drm_crtc *crtc = NULL;
@@ -5694,10 +5695,11 @@ fail:
        return false;
 }
 
-void intel_release_load_detect_pipe(struct intel_encoder *intel_encoder,
-                                   struct drm_connector *connector,
+void intel_release_load_detect_pipe(struct drm_connector *connector,
                                    struct intel_load_detect_pipe *old)
 {
+       struct intel_encoder *intel_encoder =
+               intel_attached_encoder(connector);
        struct drm_encoder *encoder = &intel_encoder->base;
        struct drm_device *dev = encoder->dev;
 
index 6920bc26a2e96c71899cb52bcb0525788ce49837..95f635b70b5b4855ece401a81ddfc8af86ec3278 100644 (file)
@@ -433,12 +433,10 @@ struct intel_load_detect_pipe {
        bool load_detect_temp;
        int dpms_mode;
 };
-extern bool intel_get_load_detect_pipe(struct intel_encoder *intel_encoder,
-                                      struct drm_connector *connector,
+extern bool intel_get_load_detect_pipe(struct drm_connector *connector,
                                       struct drm_display_mode *mode,
                                       struct intel_load_detect_pipe *old);
-extern void intel_release_load_detect_pipe(struct intel_encoder *intel_encoder,
-                                          struct drm_connector *connector,
+extern void intel_release_load_detect_pipe(struct drm_connector *connector,
                                           struct intel_load_detect_pipe *old);
 
 extern void intelfb_restore(void);
index 1a0bab07699e9d0e0d7cd87f095d57cbe3913285..95653a5089876814177169cd05054abc54fc05ef 100644 (file)
@@ -1303,12 +1303,9 @@ intel_tv_detect(struct drm_connector *connector, bool force)
        if (force) {
                struct intel_load_detect_pipe tmp;
 
-               if (intel_get_load_detect_pipe(&intel_tv->base, connector,
-                                              &mode, &tmp)) {
+               if (intel_get_load_detect_pipe(connector, &mode, &tmp)) {
                        type = intel_tv_detect_type(intel_tv, connector);
-                       intel_release_load_detect_pipe(&intel_tv->base,
-                                                      connector,
-                                                      &tmp);
+                       intel_release_load_detect_pipe(connector, &tmp);
                } else
                        return connector_status_unknown;
        } else