aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/vc4
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/vc4')
-rw-r--r--drivers/gpu/drm/vc4/vc4_kms.c6
-rw-r--r--drivers/gpu/drm/vc4/vc4_plane.c15
2 files changed, 19 insertions, 2 deletions
diff --git a/drivers/gpu/drm/vc4/vc4_kms.c b/drivers/gpu/drm/vc4/vc4_kms.c
index 127468785f74..1f94b9affe4b 100644
--- a/drivers/gpu/drm/vc4/vc4_kms.c
+++ b/drivers/gpu/drm/vc4/vc4_kms.c
@@ -214,6 +214,12 @@ static int vc4_atomic_commit(struct drm_device *dev,
214 return 0; 214 return 0;
215 } 215 }
216 216
217 /* We know for sure we don't want an async update here. Set
218 * state->legacy_cursor_update to false to prevent
219 * drm_atomic_helper_setup_commit() from auto-completing
220 * commit->flip_done.
221 */
222 state->legacy_cursor_update = false;
217 ret = drm_atomic_helper_setup_commit(state, nonblock); 223 ret = drm_atomic_helper_setup_commit(state, nonblock);
218 if (ret) 224 if (ret)
219 return ret; 225 return ret;
diff --git a/drivers/gpu/drm/vc4/vc4_plane.c b/drivers/gpu/drm/vc4/vc4_plane.c
index 1728fb7d00ba..c3ded0ba0441 100644
--- a/drivers/gpu/drm/vc4/vc4_plane.c
+++ b/drivers/gpu/drm/vc4/vc4_plane.c
@@ -854,7 +854,7 @@ void vc4_plane_async_set_fb(struct drm_plane *plane, struct drm_framebuffer *fb)
854static void vc4_plane_atomic_async_update(struct drm_plane *plane, 854static void vc4_plane_atomic_async_update(struct drm_plane *plane,
855 struct drm_plane_state *state) 855 struct drm_plane_state *state)
856{ 856{
857 struct vc4_plane_state *vc4_state = to_vc4_plane_state(plane->state); 857 struct vc4_plane_state *vc4_state, *new_vc4_state;
858 858
859 if (plane->state->fb != state->fb) { 859 if (plane->state->fb != state->fb) {
860 vc4_plane_async_set_fb(plane, state->fb); 860 vc4_plane_async_set_fb(plane, state->fb);
@@ -875,7 +875,18 @@ static void vc4_plane_atomic_async_update(struct drm_plane *plane,
875 plane->state->src_y = state->src_y; 875 plane->state->src_y = state->src_y;
876 876
877 /* Update the display list based on the new crtc_x/y. */ 877 /* Update the display list based on the new crtc_x/y. */
878 vc4_plane_atomic_check(plane, plane->state); 878 vc4_plane_atomic_check(plane, state);
879
880 new_vc4_state = to_vc4_plane_state(state);
881 vc4_state = to_vc4_plane_state(plane->state);
882
883 /* Update the current vc4_state pos0, pos2 and ptr0 dlist entries. */
884 vc4_state->dlist[vc4_state->pos0_offset] =
885 new_vc4_state->dlist[vc4_state->pos0_offset];
886 vc4_state->dlist[vc4_state->pos2_offset] =
887 new_vc4_state->dlist[vc4_state->pos2_offset];
888 vc4_state->dlist[vc4_state->ptr0_offset] =
889 new_vc4_state->dlist[vc4_state->ptr0_offset];
879 890
880 /* Note that we can't just call vc4_plane_write_dlist() 891 /* Note that we can't just call vc4_plane_write_dlist()
881 * because that would smash the context data that the HVS is 892 * because that would smash the context data that the HVS is