summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c
diff options
context:
space:
mode:
authorSinclair Yeh <syeh@vmware.com>2017-03-23 14:42:36 -0700
committerSinclair Yeh <syeh@vmware.com>2017-03-31 15:21:15 -0700
commite9cebe837be720af5972959d2ea295ece3be3721 (patch)
tree292513b31fc1829df3283d0a99326eee2b308a8a /drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c
parent5c6089a1dfa6e699a9c8ca95df02e8c39b4e8e15 (diff)
drm/vmwgfx: Fix LDU X blank screen until mode change issue
vmw_ldu_crtc_helper_commit() is not called if drm_atomic_crtc_needs_modeset() decides nothing related to CRTC timing has changed. So a better place for this code is in vmw_ldu_primary_plane_atomic_update() since we will need to update ld->fb every time the FB is updated. 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.c41
1 files changed, 21 insertions, 20 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c b/drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c
index 0a3e6eaa5f97..d3987bcf53f8 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c
@@ -226,24 +226,6 @@ static void vmw_ldu_crtc_helper_prepare(struct drm_crtc *crtc)
*/
static void vmw_ldu_crtc_helper_commit(struct drm_crtc *crtc)
{
- struct vmw_private *dev_priv;
- struct vmw_legacy_display_unit *ldu;
- struct vmw_framebuffer *vfb;
- struct drm_framebuffer *fb;
-
-
- ldu = vmw_crtc_to_ldu(crtc);
- dev_priv = vmw_priv(crtc->dev);
- fb = crtc->primary->state->fb;
-
- vfb = (fb) ? vmw_framebuffer_to_vfb(fb) : NULL;
-
- if (vfb)
- vmw_ldu_add_active(dev_priv, ldu, vfb);
- else
- vmw_ldu_del_active(dev_priv, ldu);
-
- vmw_ldu_commit_list(dev_priv);
}
/**
@@ -310,7 +292,7 @@ drm_connector_helper_funcs vmw_ldu_connector_helper_funcs = {
*/
/**
- * vmw_ldu_primary_plane_cleanup_fb - Unpin fb
+ * vmw_ldu_primary_plane_cleanup_fb - Noop
*
* @plane: display plane
* @old_state: Contains the FB to clean up
@@ -327,7 +309,7 @@ vmw_ldu_primary_plane_cleanup_fb(struct drm_plane *plane,
/**
- * vmw_ldu_primary_plane_prepare_fb -
+ * vmw_ldu_primary_plane_prepare_fb - Noop
*
* @plane: display plane
* @new_state: info on the new plane state, including the FB
@@ -346,6 +328,25 @@ static void
vmw_ldu_primary_plane_atomic_update(struct drm_plane *plane,
struct drm_plane_state *old_state)
{
+ struct vmw_private *dev_priv;
+ struct vmw_legacy_display_unit *ldu;
+ struct vmw_framebuffer *vfb;
+ struct drm_framebuffer *fb;
+ struct drm_crtc *crtc = plane->state->crtc ?: old_state->crtc;
+
+
+ ldu = vmw_crtc_to_ldu(crtc);
+ dev_priv = vmw_priv(plane->dev);
+ fb = plane->state->fb;
+
+ vfb = (fb) ? vmw_framebuffer_to_vfb(fb) : NULL;
+
+ if (vfb)
+ vmw_ldu_add_active(dev_priv, ldu, vfb);
+ else
+ vmw_ldu_del_active(dev_priv, ldu);
+
+ vmw_ldu_commit_list(dev_priv);
}