Commit 904bb5e5 authored by Sinclair Yeh's avatar Sinclair Yeh

drm/vmwgfx: Switch over to internal atomic API for STDU

Switch over to using internal atomic API for mode set.

This removes the legacy set_config API, replacing it with
drm_atomic_helper_set_config().  The DRM helper will use various
vmwgfx-specific atomic functions to set a mode.

DRIVER_ATOMIC capability flag is not yet set, so the user mode
will still use the legacy mode set IOCTL.

v2:
* Avoid a clash between page-flip pinning and setcrtc pinning, modify
the page-flip code to use the page-flip helper and the atomic callbacks.
To enable this, we will need to add a wrapper around atomic_commit.

* Add vmw_kms_set_config() to work around vmwgfx xorg driver bug
Signed-off-by: default avatarSinclair Yeh <syeh@vmware.com>
Signed-off-by: default avatarThomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: default avatarThomas Hellstrom <thellstrom@vmware.com>
parent aa74f068
......@@ -2885,3 +2885,23 @@ vmw_kms_create_implicit_placement_property(struct vmw_private *dev_priv,
"implicit_placement", 0, 1);
}
/**
* vmw_kms_set_config - Wrapper around drm_atomic_helper_set_config
*
* @set: The configuration to set.
*
* The vmwgfx Xorg driver doesn't assign the mode::type member, which
* when drm_mode_set_crtcinfo is called as part of the configuration setting
* causes it to return incorrect crtc dimensions causing severe problems in
* the vmwgfx modesetting. So explicitly clear that member before calling
* into drm_atomic_helper_set_config.
*/
int vmw_kms_set_config(struct drm_mode_set *set)
{
if (set && set->mode)
set->mode->type = 0;
return drm_atomic_helper_set_config(set);
}
......@@ -449,5 +449,6 @@ int vmw_kms_stdu_dma(struct vmw_private *dev_priv,
bool to_surface,
bool interruptible);
int vmw_kms_set_config(struct drm_mode_set *set);
#endif
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment