]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/vmwgfx: Add and connect connector helper function
authorSinclair Yeh <syeh@vmware.com>
Thu, 23 Mar 2017 21:23:20 +0000 (14:23 -0700)
committerSinclair Yeh <syeh@vmware.com>
Fri, 31 Mar 2017 22:20:42 +0000 (15:20 -0700)
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: Sinclair Yeh <syeh@vmware.com>
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
Acked-by: Daniel Vetter <daniel@ffwll.ch>
drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c
drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c
drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c

index 1d734de1e6e1dd96afd9ce4d8f5e4af1eddf6a79..1b9e08335cceeb5fee84f9eb0fe8944023809d48 100644 (file)
@@ -389,6 +389,11 @@ static const struct drm_connector_funcs vmw_legacy_connector_funcs = {
        .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
  */
@@ -555,6 +560,8 @@ static int vmw_ldu_init(struct vmw_private *dev_priv, unsigned unit)
                DRM_ERROR("Failed to initialize connector\n");
                goto err_free;
        }
+
+       drm_connector_helper_add(connector, &vmw_ldu_connector_helper_funcs);
        connector->status = vmw_du_connector_detect(connector, true);
        vmw_connector_state_to_vcs(connector->state)->is_implicit = true;
 
index eca055ec27c8b3d42ce84a0c6717cfc71ff2b390..536f4b55492ed0f13206b4e429b3429a651fd784 100644 (file)
@@ -608,6 +608,14 @@ static const struct drm_connector_funcs vmw_sou_connector_funcs = {
        .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
  */
@@ -827,6 +835,7 @@ static int vmw_sou_init(struct vmw_private *dev_priv, unsigned unit)
                goto err_free;
        }
 
+       drm_connector_helper_add(connector, &vmw_sou_connector_helper_funcs);
        connector->status = vmw_du_connector_detect(connector, true);
        vmw_connector_state_to_vcs(connector->state)->is_implicit = false;
 
index cce5e5b02e201d236476043dd46849378447006c..76ca5fa1e3bfb9069bca219352939d7e041208fc 100644 (file)
@@ -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
@@ -1549,6 +1555,8 @@ static int vmw_stdu_init(struct vmw_private *dev_priv, unsigned unit)
                DRM_ERROR("Failed to initialize connector\n");
                goto err_free;
        }
+
+       drm_connector_helper_add(connector, &vmw_stdu_connector_helper_funcs);
        connector->status = vmw_du_connector_detect(connector, false);
        vmw_connector_state_to_vcs(connector->state)->is_implicit = false;