Commit 5923005d authored by Sean Paul's avatar Sean Paul Committed by Rob Clark

drm/msm: dpu: Don't continue after error in atomic_check

There's no benefit in falling out of the if, just return directly.

Changes in v2:
- None
Reviewed-by: default avatarJeykumar Sankaran <jsanka@codeaurora.org>
Signed-off-by: default avatarSean Paul <seanpaul@chromium.org>
Signed-off-by: default avatarRob Clark <robdclark@gmail.com>
parent 2682cefe
...@@ -1115,13 +1115,13 @@ static int dpu_plane_atomic_check(struct drm_plane *plane, ...@@ -1115,13 +1115,13 @@ static int dpu_plane_atomic_check(struct drm_plane *plane,
| BIT(DPU_SSPP_CSC_10BIT))))) { | BIT(DPU_SSPP_CSC_10BIT))))) {
DPU_ERROR_PLANE(pdpu, DPU_ERROR_PLANE(pdpu,
"plane doesn't have scaler/csc for yuv\n"); "plane doesn't have scaler/csc for yuv\n");
ret = -EINVAL; return -EINVAL;
/* check src bounds */ /* check src bounds */
} else if (!dpu_plane_validate_src(&src, &fb_rect, min_src_size)) { } else if (!dpu_plane_validate_src(&src, &fb_rect, min_src_size)) {
DPU_ERROR_PLANE(pdpu, "invalid source " DRM_RECT_FMT "\n", DPU_ERROR_PLANE(pdpu, "invalid source " DRM_RECT_FMT "\n",
DRM_RECT_ARG(&src)); DRM_RECT_ARG(&src));
ret = -E2BIG; return -E2BIG;
/* valid yuv image */ /* valid yuv image */
} else if (DPU_FORMAT_IS_YUV(fmt) && } else if (DPU_FORMAT_IS_YUV(fmt) &&
...@@ -1130,22 +1130,22 @@ static int dpu_plane_atomic_check(struct drm_plane *plane, ...@@ -1130,22 +1130,22 @@ static int dpu_plane_atomic_check(struct drm_plane *plane,
drm_rect_height(&src) & 0x1)) { drm_rect_height(&src) & 0x1)) {
DPU_ERROR_PLANE(pdpu, "invalid yuv source " DRM_RECT_FMT "\n", DPU_ERROR_PLANE(pdpu, "invalid yuv source " DRM_RECT_FMT "\n",
DRM_RECT_ARG(&src)); DRM_RECT_ARG(&src));
ret = -EINVAL; return -EINVAL;
/* min dst support */ /* min dst support */
} else if (drm_rect_width(&dst) < 0x1 || drm_rect_height(&dst) < 0x1) { } else if (drm_rect_width(&dst) < 0x1 || drm_rect_height(&dst) < 0x1) {
DPU_ERROR_PLANE(pdpu, "invalid dest rect " DRM_RECT_FMT "\n", DPU_ERROR_PLANE(pdpu, "invalid dest rect " DRM_RECT_FMT "\n",
DRM_RECT_ARG(&dst)); DRM_RECT_ARG(&dst));
ret = -EINVAL; return -EINVAL;
/* check decimated source width */ /* check decimated source width */
} else if (drm_rect_width(&src) > max_linewidth) { } else if (drm_rect_width(&src) > max_linewidth) {
DPU_ERROR_PLANE(pdpu, "invalid src " DRM_RECT_FMT " line:%u\n", DPU_ERROR_PLANE(pdpu, "invalid src " DRM_RECT_FMT " line:%u\n",
DRM_RECT_ARG(&src), max_linewidth); DRM_RECT_ARG(&src), max_linewidth);
ret = -E2BIG; return -E2BIG;
} }
return ret; return 0;
} }
void dpu_plane_flush(struct drm_plane *plane) void dpu_plane_flush(struct drm_plane *plane)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment