summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c
diff options
context:
space:
mode:
authorSinclair Yeh <syeh@vmware.com>2017-03-23 11:48:44 -0700
committerSinclair Yeh <syeh@vmware.com>2017-03-31 11:13:27 -0700
commitd7721ca71126b222fb5d66af444d33950a0e3ba3 (patch)
treebfa3849231a07f8571300702824b1f85aad5d954 /drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c
parentcc5ec459de323fe32514d5f47a4d00460ee30f7b (diff)
downloadblackbird-op-linux-d7721ca71126b222fb5d66af444d33950a0e3ba3.tar.gz
blackbird-op-linux-d7721ca71126b222fb5d66af444d33950a0e3ba3.zip
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 <syeh@vmware.com> Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
Diffstat (limited to 'drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c')
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c b/drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c
index 2a0f550235c0..b1fae4975247 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c
@@ -28,6 +28,9 @@
#include "vmwgfx_kms.h"
#include "device_include/svga3d_surfacedefs.h"
#include <drm/drm_plane_helper.h>
+#include <drm/drm_atomic.h>
+#include <drm/drm_atomic_helper.h>
+
#define vmw_crtc_to_stdu(x) \
container_of(x, struct vmw_screen_target_display_unit, base.crtc)
@@ -1078,6 +1081,11 @@ static const struct drm_connector_funcs vmw_stdu_connector_funcs = {
.fill_modes = vmw_du_connector_fill_modes,
.set_property = vmw_du_connector_set_property,
.destroy = vmw_stdu_connector_destroy,
+ .reset = vmw_du_connector_reset,
+ .atomic_duplicate_state = vmw_du_connector_duplicate_state,
+ .atomic_destroy_state = vmw_du_connector_destroy_state,
+ .atomic_set_property = vmw_du_connector_atomic_set_property,
+ .atomic_get_property = vmw_du_connector_atomic_get_property,
};
@@ -1174,6 +1182,8 @@ static int vmw_stdu_init(struct vmw_private *dev_priv, unsigned unit)
goto err_free;
}
+ vmw_du_connector_reset(connector);
+
ret = drm_connector_init(dev, connector, &vmw_stdu_connector_funcs,
DRM_MODE_CONNECTOR_VIRTUAL);
if (ret) {
@@ -1181,6 +1191,7 @@ static int vmw_stdu_init(struct vmw_private *dev_priv, unsigned unit)
goto err_free;
}
connector->status = vmw_du_connector_detect(connector, false);
+ vmw_connector_state_to_vcs(connector->state)->is_implicit = false;
ret = drm_encoder_init(dev, encoder, &vmw_stdu_encoder_funcs,
DRM_MODE_ENCODER_VIRTUAL, NULL);
@@ -1199,8 +1210,7 @@ static int vmw_stdu_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, &stdu->base.primary,
&stdu->base.cursor,
&vmw_stdu_crtc_funcs, NULL);
OpenPOWER on IntegriCloud