Commit 046c9bca authored by Jani Nikula's avatar Jani Nikula

drm/i915: rename and move intel_get_pipe_from_connector()

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: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20181016145044.3924-1-jani.nikula@intel.com
parent bb1c7edc
...@@ -147,6 +147,18 @@ bool intel_connector_get_hw_state(struct intel_connector *connector) ...@@ -147,6 +147,18 @@ bool intel_connector_get_hw_state(struct intel_connector *connector)
return encoder->get_hw_state(encoder, &pipe); 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 * intel_connector_update_modes - update connector from edid
* @connector: DRM connector device to use * @connector: DRM connector device to use
......
...@@ -13898,18 +13898,6 @@ static int intel_crtc_init(struct drm_i915_private *dev_priv, enum pipe pipe) ...@@ -13898,18 +13898,6 @@ static int intel_crtc_init(struct drm_i915_private *dev_priv, enum pipe pipe)
return ret; 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, int intel_get_pipe_from_crtc_id_ioctl(struct drm_device *dev, void *data,
struct drm_file *file) struct drm_file *file)
{ {
......
...@@ -1535,8 +1535,6 @@ bool intel_port_is_combophy(struct drm_i915_private *dev_priv, enum port port); ...@@ -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); 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 tc_port intel_port_to_tc(struct drm_i915_private *dev_priv,
enum port port); 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, int intel_get_pipe_from_crtc_id_ioctl(struct drm_device *dev, void *data,
struct drm_file *file_priv); struct drm_file *file_priv);
enum transcoder intel_pipe_to_cpu_transcoder(struct drm_i915_private *dev_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); ...@@ -1695,6 +1693,7 @@ void intel_connector_unregister(struct drm_connector *connector);
void intel_connector_attach_encoder(struct intel_connector *connector, void intel_connector_attach_encoder(struct intel_connector *connector,
struct intel_encoder *encoder); struct intel_encoder *encoder);
bool intel_connector_get_hw_state(struct intel_connector *connector); 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, int intel_connector_update_modes(struct drm_connector *connector,
struct edid *edid); struct edid *edid);
int intel_ddc_get_modes(struct drm_connector *c, struct i2c_adapter *adapter); int intel_ddc_get_modes(struct drm_connector *c, struct i2c_adapter *adapter);
......
...@@ -505,7 +505,7 @@ static u32 _vlv_get_backlight(struct drm_i915_private *dev_priv, enum pipe pipe) ...@@ -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) static u32 vlv_get_backlight(struct intel_connector *connector)
{ {
struct drm_i915_private *dev_priv = to_i915(connector->base.dev); 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); return _vlv_get_backlight(dev_priv, pipe);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment