drm/msm: dpu: Consolidate atomic_check functions()
authorSean Paul <seanpaul@chromium.org>
Wed, 12 Sep 2018 13:54:55 +0000 (09:54 -0400)
committerRob Clark <robdclark@gmail.com>
Thu, 4 Oct 2018 00:24:52 +0000 (20:24 -0400)
dpu_plane_atomic_check() is a very thin wrapper around
dpu_plane_sspp_atomic_check(). All it does is a NULL-check of state->fb,
which is already done by drm_atomic_helper_check_plane_state(). Further,
the helper sets state->visible = false when this is true. So remove
dpu_plane_atomic_check() and just use dpu_plane_sspp_atomic_check()
directly.

Changes in v2:
- Fix spelling mistake in Subject (Jeykumar)

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 244b47f023bd49d2296324dff212e6e290a0fc61..3aca46cc341e515d25087fd896b149e86716cab8 100644 (file)
@@ -1078,8 +1078,8 @@ static bool dpu_plane_validate_src(struct drm_rect *src,
                drm_rect_equals(fb_rect, src);
 }
 
-static int dpu_plane_sspp_atomic_check(struct drm_plane *plane,
-               struct drm_plane_state *state)
+static int dpu_plane_atomic_check(struct drm_plane *plane,
+                                 struct drm_plane_state *state)
 {
        int ret = 0, min_scale;
        struct dpu_plane *pdpu = to_dpu_plane(plane);
@@ -1158,17 +1158,6 @@ static int dpu_plane_sspp_atomic_check(struct drm_plane *plane,
        return ret;
 }
 
-static int dpu_plane_atomic_check(struct drm_plane *plane,
-               struct drm_plane_state *state)
-{
-       if (!state->fb)
-               return 0;
-
-       DPU_DEBUG_PLANE(to_dpu_plane(plane), "\n");
-
-       return dpu_plane_sspp_atomic_check(plane, state);
-}
-
 void dpu_plane_flush(struct drm_plane *plane)
 {
        struct dpu_plane *pdpu;