drm/msm/dpu: Remove dpu_crtc_get_mixer_height
authorJordan Crouse <jcrouse@codeaurora.org>
Mon, 3 Dec 2018 22:47:15 +0000 (15:47 -0700)
committerRob Clark <robdclark@gmail.com>
Tue, 11 Dec 2018 18:10:16 +0000 (13:10 -0500)
dpu_crtc_get_mixer_height() is only used once and the value it
returns can be easily derived from the calling function.

v3: No changes

Reviewed-by: Sean Paul <sean@poorly.run>
Signed-off-by: Jordan Crouse <jcrouse@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_crtc.c
drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.h

index 5404c330d25822f384c976449ca9eac8fedb729f..ffdb90c70c344c2b25571dd7f472899da9d4d903 100644 (file)
@@ -495,7 +495,6 @@ static void _dpu_crtc_setup_mixers(struct drm_crtc *crtc)
 static void _dpu_crtc_setup_lm_bounds(struct drm_crtc *crtc,
                struct drm_crtc_state *state)
 {
-       struct dpu_crtc *dpu_crtc = to_dpu_crtc(crtc);
        struct dpu_crtc_state *cstate = to_dpu_crtc_state(state);
        struct drm_display_mode *adj_mode = &state->adjusted_mode;
        u32 crtc_split_width = _dpu_crtc_get_mixer_width(cstate, adj_mode);
@@ -506,7 +505,7 @@ static void _dpu_crtc_setup_lm_bounds(struct drm_crtc *crtc,
                r->x1 = crtc_split_width * i;
                r->y1 = 0;
                r->x2 = r->x1 + crtc_split_width;
-               r->y2 = dpu_crtc_get_mixer_height(dpu_crtc, cstate, adj_mode);
+               r->y2 = adj_mode->vdisplay;
 
                trace_dpu_crtc_setup_lm_bounds(DRMID(crtc), i, r);
        }
index fc7123573891f52b6fbbff5a7b12a55a01414c45..b84dc5730a0e9e2749ab3a0ff4dbf8f1a1030cad 100644 (file)
@@ -236,19 +236,6 @@ static inline bool dpu_crtc_state_is_stereo(struct dpu_crtc_state *cstate)
        return cstate->num_mixers == CRTC_DUAL_MIXERS;
 }
 
-/**
- * dpu_crtc_get_mixer_height - get the mixer height
- * Mixer height will be same as panel height
- */
-static inline int dpu_crtc_get_mixer_height(struct dpu_crtc *dpu_crtc,
-               struct dpu_crtc_state *cstate, struct drm_display_mode *mode)
-{
-       if (!dpu_crtc || !cstate || !mode)
-               return 0;
-
-       return mode->vdisplay;
-}
-
 /**
  * dpu_crtc_frame_pending - retun the number of pending frames
  * @crtc: Pointer to drm crtc object