Skip to content

Commit f1e2dae

Browse files
mattropedanvet
authored andcommitted
drm/i915: Clear crtc atomic flags at beginning of transaction
Once we have full atomic modeset, these kind of flags should be in a real intel_crtc_state that's tracked properly. In the meantime, make sure we clear out any old flags at the beginning of a transaction so that we don't wind up seeing leftover flags from old transactions that were checked, but never went to the commit step. At the moment, a failed check or prepare could leave stale flags behind that interfere with the next atomic transaction. v2: Just do a memset; the series this patch was originally part of placed additional fields into the structure that shouldn't be cleared, but that's no longer the case. Signed-off-by: Matt Roper <[email protected]> Signed-off-by: Daniel Vetter <[email protected]>
1 parent 70a101f commit f1e2dae

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/gpu/drm/i915/intel_atomic.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ int intel_atomic_check(struct drm_device *dev,
7676
state->allow_modeset = false;
7777
for (i = 0; i < ncrtcs; i++) {
7878
struct intel_crtc *crtc = to_intel_crtc(state->crtcs[i]);
79+
if (crtc)
80+
memset(&crtc->atomic, 0, sizeof(crtc->atomic));
7981
if (crtc && crtc->pipe != nuclear_pipe)
8082
not_nuclear = true;
8183
}

0 commit comments

Comments
 (0)