summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c
diff options
context:
space:
mode:
authorSinclair Yeh <syeh@vmware.com>2017-03-23 11:33:39 -0700
committerSinclair Yeh <syeh@vmware.com>2017-03-31 09:13:08 -0700
commit9c2542a41f559452d570b96239a81038c49becfc (patch)
treed3f26c0c4579a8269cb7dbe43e13a7a18c1e19d2 /drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c
parent36cc79bc9077319c04bd3b132edcacaa9a0d9f2b (diff)
drm/vmwgfx: CRTC atomic state
Create and Add CRTC state. We currently do not track any properties or custom states so we can technically use the DRM helpers. Creating this code just to make potential future additions easier. Most of the new code will be compiled but not enabled until plane/connector state handling code is also in place. This is the first of a series to enable atomic mode set for vmwgfx. The atomic enabling effort was done in collaboration with Thomas Hellstrom and the VMware Graphics Team. Signed-off-by: Sinclair Yeh <syeh@vmware.com> Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
Diffstat (limited to 'drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c')
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c b/drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c
index 3efcbe514472..3ee33f0234e4 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c
@@ -280,6 +280,9 @@ static int vmw_ldu_crtc_set_config(struct drm_mode_set *set)
static const struct drm_crtc_funcs vmw_legacy_crtc_funcs = {
.gamma_set = vmw_du_crtc_gamma_set,
.destroy = vmw_ldu_crtc_destroy,
+ .reset = vmw_du_crtc_reset,
+ .atomic_duplicate_state = vmw_du_crtc_duplicate_state,
+ .atomic_destroy_state = vmw_du_crtc_destroy_state,
.set_config = vmw_ldu_crtc_set_config,
};
@@ -355,6 +358,11 @@ static int vmw_ldu_init(struct vmw_private *dev_priv, unsigned unit)
ldu->base.pref_width = dev_priv->initial_width;
ldu->base.pref_height = dev_priv->initial_height;
ldu->base.pref_mode = NULL;
+
+ /*
+ * Remove this after enabling atomic because property values can
+ * only exist in a state object
+ */
ldu->base.is_implicit = true;
/* Initialize primary plane */
@@ -405,6 +413,8 @@ static int vmw_ldu_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); */
ret = drm_crtc_init_with_planes(dev, crtc, &ldu->base.primary,
&ldu->base.cursor,
&vmw_legacy_crtc_funcs, NULL);