diff options
author | Sinclair Yeh <syeh@vmware.com> | 2017-03-23 19:33:39 +0100 |
---|---|---|
committer | Sinclair Yeh <syeh@vmware.com> | 2017-03-31 18:13:08 +0200 |
commit | 9c2542a41f559452d570b96239a81038c49becfc (patch) | |
tree | d3f26c0c4579a8269cb7dbe43e13a7a18c1e19d2 /drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c | |
parent | drm/vmwgfx: Add universal plane support (diff) | |
download | linux-9c2542a41f559452d570b96239a81038c49becfc.tar.xz linux-9c2542a41f559452d570b96239a81038c49becfc.zip |
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_scrn.c')
-rw-r--r-- | drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c b/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c index 8ffccb87cf3a..033e17b966b1 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c @@ -461,6 +461,9 @@ out_no_fence: static const struct drm_crtc_funcs vmw_screen_object_crtc_funcs = { .gamma_set = vmw_du_crtc_gamma_set, .destroy = vmw_sou_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_sou_crtc_set_config, .page_flip = vmw_sou_crtc_page_flip, }; @@ -535,6 +538,11 @@ static int vmw_sou_init(struct vmw_private *dev_priv, unsigned unit) sou->base.pref_width = dev_priv->initial_width; sou->base.pref_height = dev_priv->initial_height; sou->base.pref_mode = NULL; + + /* + * Remove this after enabling atomic because property values can + * only exist in a state object + */ sou->base.is_implicit = false; /* Initialize primary plane */ @@ -586,6 +594,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); */ ret = drm_crtc_init_with_planes(dev, crtc, &sou->base.primary, &sou->base.cursor, &vmw_screen_object_crtc_funcs, NULL); |