Skip to content

Commit

Permalink
drm/i915/fbc: Remember to update FBC state even when not reallocating…
Browse files Browse the repository at this point in the history
… CFB

We mustn't forget to update our FBC state even if we don't have
to reallocate the CFB. Otherwise we won't refresh our notion
of what eg. the new fence or the new override CFB stride
should be. Using the wrong CFB stride in particular can cause
underruns and could even corrupt other stuff in stolen.

Fixes: f4cfdbb ("drm/i915/fbc: Nuke state_cache")
Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/4774
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20211216110822.8461-1-ville.syrjala@linux.intel.com
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
(cherry picked from commit 798c5da)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
  • Loading branch information
Ville Syrjälä authored and Jani Nikula committed Dec 27, 2021
1 parent 040bf2a commit c65fe9c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/gpu/drm/i915/display/intel_fbc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1384,8 +1384,10 @@ static void __intel_fbc_enable(struct intel_atomic_state *state,
if (fbc->state.plane != plane)
return;

if (intel_fbc_is_ok(plane_state))
if (intel_fbc_is_ok(plane_state)) {
intel_fbc_update_state(state, crtc, plane);
return;
}

__intel_fbc_disable(fbc);
}
Expand Down

0 comments on commit c65fe9c

Please sign in to comment.