Commit d947d1b7 authored by Sinclair Yeh's avatar Sinclair Yeh

drm/vmwgfx: Add and connect connector helper function

These helpers won't be called until we flip on the atomic support
flag or set drm_crtc_funcs->set_config to using the atomic
helper.

v2
Use drm_atomic_helper_best_encoder() rather than a vmwgfx-specific one
Signed-off-by: default avatarSinclair Yeh <syeh@vmware.com>
Reviewed-by: default avatarThomas Hellstrom <thellstrom@vmware.com>
Acked-by: default avatarDaniel Vetter <daniel@ffwll.ch>
parent 060e2ad5
...@@ -389,6 +389,11 @@ static const struct drm_connector_funcs vmw_legacy_connector_funcs = { ...@@ -389,6 +389,11 @@ static const struct drm_connector_funcs vmw_legacy_connector_funcs = {
.atomic_get_property = vmw_du_connector_atomic_get_property, .atomic_get_property = vmw_du_connector_atomic_get_property,
}; };
static const struct
drm_connector_helper_funcs vmw_ldu_connector_helper_funcs = {
.best_encoder = drm_atomic_helper_best_encoder,
};
/* /*
* Legacy Display Plane Functions * Legacy Display Plane Functions
*/ */
...@@ -555,6 +560,8 @@ static int vmw_ldu_init(struct vmw_private *dev_priv, unsigned unit) ...@@ -555,6 +560,8 @@ static int vmw_ldu_init(struct vmw_private *dev_priv, unsigned unit)
DRM_ERROR("Failed to initialize connector\n"); DRM_ERROR("Failed to initialize connector\n");
goto err_free; goto err_free;
} }
drm_connector_helper_add(connector, &vmw_ldu_connector_helper_funcs);
connector->status = vmw_du_connector_detect(connector, true); connector->status = vmw_du_connector_detect(connector, true);
vmw_connector_state_to_vcs(connector->state)->is_implicit = true; vmw_connector_state_to_vcs(connector->state)->is_implicit = true;
......
...@@ -608,6 +608,14 @@ static const struct drm_connector_funcs vmw_sou_connector_funcs = { ...@@ -608,6 +608,14 @@ static const struct drm_connector_funcs vmw_sou_connector_funcs = {
.atomic_get_property = vmw_du_connector_atomic_get_property, .atomic_get_property = vmw_du_connector_atomic_get_property,
}; };
static const struct
drm_connector_helper_funcs vmw_sou_connector_helper_funcs = {
.best_encoder = drm_atomic_helper_best_encoder,
};
/* /*
* Screen Object Display Plane Functions * Screen Object Display Plane Functions
*/ */
...@@ -827,6 +835,7 @@ static int vmw_sou_init(struct vmw_private *dev_priv, unsigned unit) ...@@ -827,6 +835,7 @@ static int vmw_sou_init(struct vmw_private *dev_priv, unsigned unit)
goto err_free; goto err_free;
} }
drm_connector_helper_add(connector, &vmw_sou_connector_helper_funcs);
connector->status = vmw_du_connector_detect(connector, true); connector->status = vmw_du_connector_detect(connector, true);
vmw_connector_state_to_vcs(connector->state)->is_implicit = false; vmw_connector_state_to_vcs(connector->state)->is_implicit = false;
......
...@@ -1189,6 +1189,12 @@ static const struct drm_connector_funcs vmw_stdu_connector_funcs = { ...@@ -1189,6 +1189,12 @@ static const struct drm_connector_funcs vmw_stdu_connector_funcs = {
}; };
static const struct
drm_connector_helper_funcs vmw_stdu_connector_helper_funcs = {
.best_encoder = drm_atomic_helper_best_encoder,
};
/****************************************************************************** /******************************************************************************
* Screen Target Display Plane Functions * Screen Target Display Plane Functions
...@@ -1549,6 +1555,8 @@ static int vmw_stdu_init(struct vmw_private *dev_priv, unsigned unit) ...@@ -1549,6 +1555,8 @@ static int vmw_stdu_init(struct vmw_private *dev_priv, unsigned unit)
DRM_ERROR("Failed to initialize connector\n"); DRM_ERROR("Failed to initialize connector\n");
goto err_free; goto err_free;
} }
drm_connector_helper_add(connector, &vmw_stdu_connector_helper_funcs);
connector->status = vmw_du_connector_detect(connector, false); connector->status = vmw_du_connector_detect(connector, false);
vmw_connector_state_to_vcs(connector->state)->is_implicit = false; vmw_connector_state_to_vcs(connector->state)->is_implicit = false;
......
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