disp: msm: sde: clear cached rectangles when PU ROI is set

clear cached rectangles when PU ROI is set to avoid incorrect
cached rois when two subsequent state duplications occur due
to timing. This will lead to commit N and commit N+1 to have
same cached ROIs as commit N-1. This results in issues when
commit N-1 is PU, N is full frame and N+1 is PU with same
ROI as N-1.

Change-Id: I3bb9390e500d327e703e41d64f7aaae5e5f1b4f2
Signed-off-by: Anjaneya Prasad Musunuri <quic_aprasad@quicinc.com>
This commit is contained in:
Anjaneya Prasad Musunuri
2022-12-22 18:11:04 +05:30
committed by Gerrit - the friendly Code Review server
parent 2d90a7d4a2
commit 95e583e413

View File

@@ -952,6 +952,7 @@ static int _sde_crtc_set_roi_v1(struct drm_crtc_state *state,
crtc = cstate->base.crtc; crtc = cstate->base.crtc;
memset(&cstate->user_roi_list, 0, sizeof(cstate->user_roi_list)); memset(&cstate->user_roi_list, 0, sizeof(cstate->user_roi_list));
memset(&cstate->cached_user_roi_list, 0, sizeof(cstate->cached_user_roi_list));
if (!usr_ptr) { if (!usr_ptr) {
SDE_DEBUG("crtc%d: rois cleared\n", DRMID(crtc)); SDE_DEBUG("crtc%d: rois cleared\n", DRMID(crtc));