Merge "disp: msm: sde: avoid demura layers validation against crtc w/h"
This commit is contained in:

committed by
Gerrit - the friendly Code Review server

commit
0a3a317bf1
@@ -5685,20 +5685,22 @@ static int _sde_crtc_check_get_pstates(struct drm_crtc *crtc,
|
|||||||
|
|
||||||
(*cnt)++;
|
(*cnt)++;
|
||||||
|
|
||||||
if (CHECK_LAYER_BOUNDS(pstate->crtc_y, pstate->crtc_h, crtc_height) ||
|
/* for demura layers, validate against mode resolution */
|
||||||
|
if (blend_type == SDE_DRM_BLEND_OP_SKIP) {
|
||||||
|
if (CHECK_LAYER_BOUNDS(pstate->crtc_y, pstate->crtc_h, mode->vdisplay) ||
|
||||||
|
CHECK_LAYER_BOUNDS(pstate->crtc_x, pstate->crtc_w, mode->hdisplay)) {
|
||||||
|
SDE_ERROR("invalid dest - y:%d h:%d vdisp:%d x:%d w:%d hdisp:%d\n",
|
||||||
|
pstate->crtc_y, pstate->crtc_h, mode->vdisplay,
|
||||||
|
pstate->crtc_x, pstate->crtc_w, mode->hdisplay);
|
||||||
|
return -E2BIG;
|
||||||
|
}
|
||||||
|
} else if (CHECK_LAYER_BOUNDS(pstate->crtc_y, pstate->crtc_h, crtc_height) ||
|
||||||
CHECK_LAYER_BOUNDS(pstate->crtc_x, pstate->crtc_w, crtc_width)) {
|
CHECK_LAYER_BOUNDS(pstate->crtc_x, pstate->crtc_w, crtc_width)) {
|
||||||
SDE_ERROR("invalid dest - y:%d h:%d crtc_h:%d x:%d w:%d crtc_w:%d\n",
|
SDE_ERROR("invalid dest - y:%d h:%d crtc_h:%d x:%d w:%d crtc_w:%d\n",
|
||||||
pstate->crtc_y, pstate->crtc_h, crtc_height,
|
pstate->crtc_y, pstate->crtc_h, crtc_height,
|
||||||
pstate->crtc_x, pstate->crtc_w, crtc_width);
|
pstate->crtc_x, pstate->crtc_w, crtc_width);
|
||||||
return -E2BIG;
|
return -E2BIG;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (blend_type != SDE_DRM_BLEND_OP_SKIP && cstate->num_ds_enabled &&
|
|
||||||
((pstate->crtc_h > crtc_height) || (pstate->crtc_w > crtc_width))) {
|
|
||||||
SDE_ERROR("plane w/h:%x*%x > mixer w/h:%x*%x\n",
|
|
||||||
pstate->crtc_w, pstate->crtc_h, crtc_width, crtc_height);
|
|
||||||
return -E2BIG;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 1; i < SSPP_MAX; i++) {
|
for (i = 1; i < SSPP_MAX; i++) {
|
||||||
|
Reference in New Issue
Block a user