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: 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
This commit is contained in:
parent
bb1c7edc6d
commit
046c9bca3d
@ -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
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user