Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c21c1388 authored by Prabhanjan Kandula's avatar Prabhanjan Kandula Committed by Abhijith Desai
Browse files

drm/msm/sde: fix partial update concurrency check with CWB



In sde driver current validation of concurrent writeback with
the partial update rects on crtc, last committed partial-update
roi on CRTC is referred. This restricts usage of partial update
and disable CWB in single frame. This change fixes by referring
user programmed PU roi for current frame. This change also relaxes
modeset check in virtual encoder, to support PU with CWB disable
with out an additional frame in between.

Change-Id: Iaf87271a2c0671a271dd3253200a8dfe323f1fc9
Signed-off-by: default avatarPrabhanjan Kandula <pkandula@codeaurora.org>
Signed-off-by: default avatarAbhijith Desai <desaia@codeaurora.org>
parent e400a8ca
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -950,7 +950,7 @@ static int sde_encoder_virt_atomic_check(
		}
	}

	if (!ret && drm_atomic_crtc_needs_modeset(crtc_state)) {
	if (!ret && (crtc_state->mode_changed || crtc_state->active_changed)) {
		struct sde_rect mode_roi, roi;

		mode_roi.x = 0;
+5 −5
Original line number Diff line number Diff line
@@ -643,6 +643,7 @@ static int _sde_enc_phys_wb_validate_cwb(struct sde_encoder_phys *phys_enc,
{
	struct sde_crtc_state *cstate = to_sde_crtc_state(crtc_state);
	struct sde_rect wb_roi = {0,};
	struct sde_rect pu_roi = {0,};
	int data_pt;
	int ds_outw = 0;
	int ds_outh = 0;
@@ -681,12 +682,11 @@ static int _sde_enc_phys_wb_validate_cwb(struct sde_encoder_phys *phys_enc,
	}

	/* validate conn roi against pu rect */
	if (!sde_kms_rect_is_null(&cstate->crtc_roi)) {
		if (wb_roi.w != cstate->crtc_roi.w ||
				wb_roi.h != cstate->crtc_roi.h) {
	if (cstate->user_roi_list.num_rects) {
		sde_kms_rect_merge_rectangles(&cstate->user_roi_list, &pu_roi);
		if (wb_roi.w != pu_roi.w || wb_roi.h != pu_roi.h) {
			SDE_ERROR("invalid wb roi with pu [%dx%d vs %dx%d]\n",
					wb_roi.w, wb_roi.h, cstate->crtc_roi.w,
					 cstate->crtc_roi.h);
					wb_roi.w, wb_roi.h, pu_roi.w, pu_roi.h);
			ret = -EINVAL;
			goto exit;
		}