]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/msm: dpu: Remove impossible checks
authorSean Paul <seanpaul@chromium.org>
Wed, 12 Sep 2018 13:54:53 +0000 (09:54 -0400)
committerRob Clark <robdclark@gmail.com>
Thu, 4 Oct 2018 00:24:52 +0000 (20:24 -0400)
This patch removes some checks which are impossible to hit. As a result,
we can move some of the local var assignments into the declarations.

Changes in v2:
- None

Reviewed-by: Jeykumar Sankaran <jsanka@codeaurora.org>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c

index eab05c78168da8e5859ded9a28f0978819cca5d7..2c63c2693750575cc0389366998f4c6dd0bdecb7 100644 (file)
@@ -1082,30 +1082,13 @@ static int dpu_plane_sspp_atomic_check(struct drm_plane *plane,
                struct drm_plane_state *state)
 {
        int ret = 0;
-       struct dpu_plane *pdpu;
-       struct dpu_plane_state *pstate;
+       struct dpu_plane *pdpu = to_dpu_plane(plane);
        const struct dpu_format *fmt;
        struct drm_rect src, dst, fb_rect = { 0 };
        uint32_t max_upscale = 1, max_downscale = 1;
        uint32_t min_src_size, max_linewidth;
        int hscale = 1, vscale = 1;
 
-       if (!plane || !state) {
-               DPU_ERROR("invalid arg(s), plane %d state %d\n",
-                               plane != 0, state != 0);
-               ret = -EINVAL;
-               goto exit;
-       }
-
-       pdpu = to_dpu_plane(plane);
-       pstate = to_dpu_plane_state(state);
-
-       if (!pdpu->pipe_sblk) {
-               DPU_ERROR_PLANE(pdpu, "invalid catalog\n");
-               ret = -EINVAL;
-               goto exit;
-       }
-
        src.x1 = state->src_x >> 16;
        src.y1 = state->src_y >> 16;
        src.x2 = src.x1 + (state->src_w >> 16);