Commit 9459545b authored by Maarten Lankhorst's avatar Maarten Lankhorst Committed by Daniel Vetter

drm/atomic: Pass connector and state to update_connector_routing.

Minor cleanup, connector and connector_state are always non-NULL here.
Signed-off-by: default avatarMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1456303053-28806-3-git-send-email-maarten.lankhorst@linux.intel.com
parent 6ab520a2
...@@ -215,22 +215,16 @@ steal_encoder(struct drm_atomic_state *state, ...@@ -215,22 +215,16 @@ steal_encoder(struct drm_atomic_state *state,
} }
static int static int
update_connector_routing(struct drm_atomic_state *state, int conn_idx) update_connector_routing(struct drm_atomic_state *state,
struct drm_connector *connector,
struct drm_connector_state *connector_state)
{ {
const struct drm_connector_helper_funcs *funcs; const struct drm_connector_helper_funcs *funcs;
struct drm_encoder *new_encoder; struct drm_encoder *new_encoder;
struct drm_crtc *encoder_crtc; struct drm_crtc *encoder_crtc;
struct drm_connector *connector;
struct drm_connector_state *connector_state;
struct drm_crtc_state *crtc_state; struct drm_crtc_state *crtc_state;
int idx, ret; int idx, ret;
connector = state->connectors[conn_idx];
connector_state = state->connector_states[conn_idx];
if (!connector)
return 0;
DRM_DEBUG_ATOMIC("Updating routing for [CONNECTOR:%d:%s]\n", DRM_DEBUG_ATOMIC("Updating routing for [CONNECTOR:%d:%s]\n",
connector->base.id, connector->base.id,
connector->name); connector->name);
...@@ -494,7 +488,8 @@ drm_atomic_helper_check_modeset(struct drm_device *dev, ...@@ -494,7 +488,8 @@ drm_atomic_helper_check_modeset(struct drm_device *dev,
* drivers must set crtc->mode_changed themselves when connector * drivers must set crtc->mode_changed themselves when connector
* properties need to be updated. * properties need to be updated.
*/ */
ret = update_connector_routing(state, i); ret = update_connector_routing(state, connector,
connector_state);
if (ret) if (ret)
return ret; return ret;
} }
......
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