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

Commit 9563bb19 authored by Lloyd Atkinson's avatar Lloyd Atkinson Committed by Gerrit - the friendly Code Review server
Browse files

drm/msm/sde: adjust dim layer for partial update roi



Adjust the dim layer coordinates to take into account the
CRTC partial update ROI.

Change-Id: Ie8429e484a762e4e469697c49ecff0d4f838ab97
Signed-off-by: default avatarLloyd Atkinson <latkinso@codeaurora.org>
parent ab2cc234
Loading
Loading
Loading
Loading
+19 −2
Original line number Diff line number Diff line
@@ -741,7 +741,7 @@ static void _sde_crtc_setup_dim_layer_cfg(struct drm_crtc *crtc,
	for (i = 0; i < sde_crtc->num_mixers; i++) {
		split_dim_layer.flags = dim_layer->flags;

		sde_kms_rect_intersect(&cstate->lm_bounds[i], &dim_layer->rect,
		sde_kms_rect_intersect(&cstate->lm_roi[i], &dim_layer->rect,
					&split_dim_layer.rect);
		if (sde_kms_rect_is_null(&split_dim_layer.rect)) {
			/*
@@ -764,9 +764,26 @@ static void _sde_crtc_setup_dim_layer_cfg(struct drm_crtc *crtc,
		} else {
			split_dim_layer.rect.x =
					split_dim_layer.rect.x -
						cstate->lm_bounds[i].x;
						cstate->lm_roi[i].x;
			split_dim_layer.rect.y =
					split_dim_layer.rect.y -
						cstate->lm_roi[i].y;
		}

		SDE_EVT32_VERBOSE(DRMID(crtc),
				cstate->lm_roi[i].x,
				cstate->lm_roi[i].y,
				cstate->lm_roi[i].w,
				cstate->lm_roi[i].h,
				dim_layer->rect.x,
				dim_layer->rect.y,
				dim_layer->rect.w,
				dim_layer->rect.h,
				split_dim_layer.rect.x,
				split_dim_layer.rect.y,
				split_dim_layer.rect.w,
				split_dim_layer.rect.h);

		SDE_DEBUG("split_dim_layer - LM:%d, rect:{%d,%d,%d,%d}}\n",
			i, split_dim_layer.rect.x, split_dim_layer.rect.y,
			split_dim_layer.rect.w, split_dim_layer.rect.h);