Merge "drm: msm: sde: fix decimation validation in plane atomic_check"
diff --git a/drivers/gpu/drm/msm/sde/sde_plane.c b/drivers/gpu/drm/msm/sde/sde_plane.c
index dc55ad5..3621fb2 100644
--- a/drivers/gpu/drm/msm/sde/sde_plane.c
+++ b/drivers/gpu/drm/msm/sde/sde_plane.c
@@ -1088,6 +1088,12 @@
&& (src_w == dst_w))
return;
+ SDE_DEBUG_PLANE(psde,
+ "setting bilinear: src:%dx%d dst:%dx%d chroma:%dx%d fmt:%x\n",
+ src_w, src_h, dst_w, dst_h,
+ chroma_subsmpl_v, chroma_subsmpl_h,
+ fmt->base.pixel_format);
+
scale_cfg->dst_width = dst_w;
scale_cfg->dst_height = dst_h;
scale_cfg->y_rgb_filter_cfg = SDE_SCALE_BIL;
@@ -3574,17 +3580,16 @@
ret = -EINVAL;
/* decimation validation */
- } else if (deci_w || deci_h) {
- if ((deci_w > psde->pipe_sblk->maxhdeciexp) ||
- (deci_h > psde->pipe_sblk->maxvdeciexp)) {
- SDE_ERROR_PLANE(psde,
- "too much decimation requested\n");
- ret = -EINVAL;
- } else if (fmt->fetch_mode != SDE_FETCH_LINEAR) {
- SDE_ERROR_PLANE(psde,
- "decimation requires linear fetch\n");
- ret = -EINVAL;
- }
+ } else if ((deci_w || deci_h)
+ && ((deci_w > psde->pipe_sblk->maxhdeciexp)
+ || (deci_h > psde->pipe_sblk->maxvdeciexp))) {
+ SDE_ERROR_PLANE(psde, "too much decimation requested\n");
+ ret = -EINVAL;
+
+ } else if ((deci_w || deci_h)
+ && (fmt->fetch_mode != SDE_FETCH_LINEAR)) {
+ SDE_ERROR_PLANE(psde, "decimation requires linear fetch\n");
+ ret = -EINVAL;
} else if (!(psde->features & SDE_SSPP_SCALER) &&
((src.w != dst.w) || (src.h != dst.h))) {