aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaarten Lankhorst <maarten.lankhorst@linux.intel.com>2016-02-24 03:37:29 -0500
committerDaniel Vetter <daniel.vetter@ffwll.ch>2016-03-04 11:17:50 -0500
commit9459545b9c966bd221e6e3129b635a4b0a9cf6c2 (patch)
treedf18414d55ea20082a9a912a3fb27e98f8c910b9
parent6ab520a2a105abbd275c4814ac0d61d36b1db4fe (diff)
drm/atomic: Pass connector and state to update_connector_routing.
Minor cleanup, connector and connector_state are always non-NULL here. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1456303053-28806-3-git-send-email-maarten.lankhorst@linux.intel.com
-rw-r--r--drivers/gpu/drm/drm_atomic_helper.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c
index ddcfc8efe59e..ed28ca1fc494 100644
--- a/drivers/gpu/drm/drm_atomic_helper.c
+++ b/drivers/gpu/drm/drm_atomic_helper.c
@@ -215,22 +215,16 @@ steal_encoder(struct drm_atomic_state *state,
215} 215}
216 216
217static int 217static int
218update_connector_routing(struct drm_atomic_state *state, int conn_idx) 218update_connector_routing(struct drm_atomic_state *state,
219 struct drm_connector *connector,
220 struct drm_connector_state *connector_state)
219{ 221{
220 const struct drm_connector_helper_funcs *funcs; 222 const struct drm_connector_helper_funcs *funcs;
221 struct drm_encoder *new_encoder; 223 struct drm_encoder *new_encoder;
222 struct drm_crtc *encoder_crtc; 224 struct drm_crtc *encoder_crtc;
223 struct drm_connector *connector;
224 struct drm_connector_state *connector_state;
225 struct drm_crtc_state *crtc_state; 225 struct drm_crtc_state *crtc_state;
226 int idx, ret; 226 int idx, ret;
227 227
228 connector = state->connectors[conn_idx];
229 connector_state = state->connector_states[conn_idx];
230
231 if (!connector)
232 return 0;
233
234 DRM_DEBUG_ATOMIC("Updating routing for [CONNECTOR:%d:%s]\n", 228 DRM_DEBUG_ATOMIC("Updating routing for [CONNECTOR:%d:%s]\n",
235 connector->base.id, 229 connector->base.id,
236 connector->name); 230 connector->name);
@@ -494,7 +488,8 @@ drm_atomic_helper_check_modeset(struct drm_device *dev,
494 * drivers must set crtc->mode_changed themselves when connector 488 * drivers must set crtc->mode_changed themselves when connector
495 * properties need to be updated. 489 * properties need to be updated.
496 */ 490 */
497 ret = update_connector_routing(state, i); 491 ret = update_connector_routing(state, connector,
492 connector_state);
498 if (ret) 493 if (ret)
499 return ret; 494 return ret;
500 } 495 }