drm/i915: rename and move intel_get_pipe_from_connector()
authorJani Nikula <jani.nikula@intel.com>
Tue, 16 Oct 2018 14:50:44 +0000 (17:50 +0300)
committerJani Nikula <jani.nikula@intel.com>
Wed, 17 Oct 2018 06:36:43 +0000 (09:36 +0300)
Rename intel_get_pipe_from_connector() to intel_connector_get_pipe() and
move it near its connector function friends in intel_connector.c. No
functional changes.

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20181016145044.3924-1-jani.nikula@intel.com
drivers/gpu/drm/i915/intel_connector.c
drivers/gpu/drm/i915/intel_display.c
drivers/gpu/drm/i915/intel_drv.h
drivers/gpu/drm/i915/intel_panel.c

index 598d5cb9b657e1b68f67ec549aae0b50b99c71ea..18e370f607bcc2e50105c5854b70d61611c22709 100644 (file)
@@ -147,6 +147,18 @@ bool intel_connector_get_hw_state(struct intel_connector *connector)
        return encoder->get_hw_state(encoder, &pipe);
 }
 
+enum pipe intel_connector_get_pipe(struct intel_connector *connector)
+{
+       struct drm_device *dev = connector->base.dev;
+
+       WARN_ON(!drm_modeset_is_locked(&dev->mode_config.connection_mutex));
+
+       if (!connector->base.state->crtc)
+               return INVALID_PIPE;
+
+       return to_intel_crtc(connector->base.state->crtc)->pipe;
+}
+
 /**
  * intel_connector_update_modes - update connector from edid
  * @connector: DRM connector device to use
index 5d278249f643a6f1806d77b24bdb0e17f7f866a2..206215792d7e907e85b9f18d6a2207a69b8ca865 100644 (file)
@@ -13898,18 +13898,6 @@ fail:
        return ret;
 }
 
-enum pipe intel_get_pipe_from_connector(struct intel_connector *connector)
-{
-       struct drm_device *dev = connector->base.dev;
-
-       WARN_ON(!drm_modeset_is_locked(&dev->mode_config.connection_mutex));
-
-       if (!connector->base.state->crtc)
-               return INVALID_PIPE;
-
-       return to_intel_crtc(connector->base.state->crtc)->pipe;
-}
-
 int intel_get_pipe_from_crtc_id_ioctl(struct drm_device *dev, void *data,
                                      struct drm_file *file)
 {
index b2ca9f278b36fae80d92f4ceb5e61baf853ceaf9..83b19587abad94f39cdab96b1981f14224e6ec3f 100644 (file)
@@ -1535,8 +1535,6 @@ bool intel_port_is_combophy(struct drm_i915_private *dev_priv, enum port port);
 bool intel_port_is_tc(struct drm_i915_private *dev_priv, enum port port);
 enum tc_port intel_port_to_tc(struct drm_i915_private *dev_priv,
                              enum port port);
-
-enum pipe intel_get_pipe_from_connector(struct intel_connector *connector);
 int intel_get_pipe_from_crtc_id_ioctl(struct drm_device *dev, void *data,
                                      struct drm_file *file_priv);
 enum transcoder intel_pipe_to_cpu_transcoder(struct drm_i915_private *dev_priv,
@@ -1695,6 +1693,7 @@ void intel_connector_unregister(struct drm_connector *connector);
 void intel_connector_attach_encoder(struct intel_connector *connector,
                                    struct intel_encoder *encoder);
 bool intel_connector_get_hw_state(struct intel_connector *connector);
+enum pipe intel_connector_get_pipe(struct intel_connector *connector);
 int intel_connector_update_modes(struct drm_connector *connector,
                                 struct edid *edid);
 int intel_ddc_get_modes(struct drm_connector *c, struct i2c_adapter *adapter);
index 20582cfed491e33f9b96d4e427c9049ac7d59e83..ad88008f8dd0f254dc683f52a288601ced6788c1 100644 (file)
@@ -505,7 +505,7 @@ static u32 _vlv_get_backlight(struct drm_i915_private *dev_priv, enum pipe pipe)
 static u32 vlv_get_backlight(struct intel_connector *connector)
 {
        struct drm_i915_private *dev_priv = to_i915(connector->base.dev);
-       enum pipe pipe = intel_get_pipe_from_connector(connector);
+       enum pipe pipe = intel_connector_get_pipe(connector);
 
        return _vlv_get_backlight(dev_priv, pipe);
 }