From d7721ca71126b222fb5d66af444d33950a0e3ba3 Mon Sep 17 00:00:00 2001 From: Sinclair Yeh Date: Thu, 23 Mar 2017 11:48:44 -0700 Subject: drm/vmwgfx: Connector atomic state Add connector handling functions. Start tracking is_implicity in the connector state. Eventually, this field should be tracked exclusively in a connector state. Now that plane and connector states have been created, we can also activate the code that use CRTC state. Signed-off-by: Sinclair Yeh Reviewed-by: Thomas Hellstrom --- drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c') diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c b/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c index cfba59a8e155..36d42f5656b4 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c @@ -27,6 +27,8 @@ #include "vmwgfx_kms.h" #include +#include +#include #define vmw_crtc_to_sou(x) \ @@ -496,6 +498,11 @@ static const struct drm_connector_funcs vmw_sou_connector_funcs = { .fill_modes = vmw_du_connector_fill_modes, .set_property = vmw_du_connector_set_property, .destroy = vmw_sou_connector_destroy, + .reset = vmw_du_connector_reset, + .atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state, + .atomic_destroy_state = drm_atomic_helper_connector_destroy_state, + .atomic_set_property = vmw_du_connector_atomic_set_property, + .atomic_get_property = vmw_du_connector_atomic_get_property, }; /* @@ -589,6 +596,8 @@ static int vmw_sou_init(struct vmw_private *dev_priv, unsigned unit) } connector->status = vmw_du_connector_detect(connector, true); + vmw_connector_state_to_vcs(connector->state)->is_implicit = false; + ret = drm_encoder_init(dev, encoder, &vmw_screen_object_encoder_funcs, DRM_MODE_ENCODER_VIRTUAL, NULL); @@ -607,8 +616,8 @@ static int vmw_sou_init(struct vmw_private *dev_priv, unsigned unit) goto err_free_encoder; } - /* FIXME: Turn on after plane/connector states are implemented. */ - /* vmw_du_crtc_reset(crtc); */ + + vmw_du_crtc_reset(crtc); ret = drm_crtc_init_with_planes(dev, crtc, &sou->base.primary, &sou->base.cursor, &vmw_screen_object_crtc_funcs, NULL); -- cgit