Commit 04fc14be authored by Ben Skeggs's avatar Ben Skeggs

drm/nouveau/kms/nv50-: decouple window state changes, and update method submisssion

This will be required to support Volta.
Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent 53e0a3e7
...@@ -1690,6 +1690,14 @@ nv50_disp_atomic_commit_tail(struct drm_atomic_state *state) ...@@ -1690,6 +1690,14 @@ nv50_disp_atomic_commit_tail(struct drm_atomic_state *state)
/* Flush disable. */ /* Flush disable. */
if (interlock[NV50_DISP_INTERLOCK_CORE]) { if (interlock[NV50_DISP_INTERLOCK_CORE]) {
if (atom->flush_disable) { if (atom->flush_disable) {
for_each_new_plane_in_state(state, plane, new_plane_state, i) {
struct nv50_wndw *wndw = nv50_wndw(plane);
if (interlock[wndw->interlock.type] & wndw->interlock.data) {
if (wndw->func->update)
wndw->func->update(wndw, interlock);
}
}
nv50_disp_atomic_commit_core(drm, interlock); nv50_disp_atomic_commit_core(drm, interlock);
memset(interlock, 0x00, sizeof(interlock)); memset(interlock, 0x00, sizeof(interlock));
} }
...@@ -1751,6 +1759,14 @@ nv50_disp_atomic_commit_tail(struct drm_atomic_state *state) ...@@ -1751,6 +1759,14 @@ nv50_disp_atomic_commit_tail(struct drm_atomic_state *state)
} }
/* Flush update. */ /* Flush update. */
for_each_new_plane_in_state(state, plane, new_plane_state, i) {
struct nv50_wndw *wndw = nv50_wndw(plane);
if (interlock[wndw->interlock.type] & wndw->interlock.data) {
if (wndw->func->update)
wndw->func->update(wndw, interlock);
}
}
if (interlock[NV50_DISP_INTERLOCK_CORE]) { if (interlock[NV50_DISP_INTERLOCK_CORE]) {
if (interlock[NV50_DISP_INTERLOCK_BASE] || if (interlock[NV50_DISP_INTERLOCK_BASE] ||
!atom->state.legacy_cursor_update) !atom->state.legacy_cursor_update)
......
...@@ -119,8 +119,6 @@ nv50_wndw_flush_clr(struct nv50_wndw *wndw, u32 *interlock, bool flush, ...@@ -119,8 +119,6 @@ nv50_wndw_flush_clr(struct nv50_wndw *wndw, u32 *interlock, bool flush,
if (clr.image) wndw->func->image_clr(wndw); if (clr.image) wndw->func->image_clr(wndw);
interlock[wndw->interlock.type] |= wndw->interlock.data; interlock[wndw->interlock.type] |= wndw->interlock.data;
if (flush)
wndw->func->update(wndw, interlock);
} }
void void
...@@ -142,8 +140,6 @@ nv50_wndw_flush_set(struct nv50_wndw *wndw, u32 *interlock, ...@@ -142,8 +140,6 @@ nv50_wndw_flush_set(struct nv50_wndw *wndw, u32 *interlock,
} }
interlock[wndw->interlock.type] |= wndw->interlock.data; interlock[wndw->interlock.type] |= wndw->interlock.data;
if (wndw->func->update)
wndw->func->update(wndw, interlock);
} }
void void
......
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