diff options
Diffstat (limited to 'drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c')
| -rw-r--r-- | drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 82 |
1 files changed, 0 insertions, 82 deletions
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c index c2a6e3dacd68..3b9c33e694bf 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c @@ -132,84 +132,6 @@ static struct dpu_kms *_dpu_plane_get_kms(struct drm_plane *plane) } /** - * _dpu_plane_calc_bw - calculate bandwidth required for a plane - * @Plane: Pointer to drm plane. - * Result: Updates calculated bandwidth in the plane state. - * BW Equation: src_w * src_h * bpp * fps * (v_total / v_dest) - * Prefill BW Equation: line src bytes * line_time - */ -static void _dpu_plane_calc_bw(struct drm_plane *plane, - struct drm_framebuffer *fb) -{ - struct dpu_plane *pdpu = to_dpu_plane(plane); - struct dpu_plane_state *pstate; - struct drm_display_mode *mode; - const struct dpu_format *fmt = NULL; - struct dpu_kms *dpu_kms = _dpu_plane_get_kms(plane); - int src_width, src_height, dst_height, fps; - u64 plane_prefill_bw; - u64 plane_bw; - u32 hw_latency_lines; - u32 scale_factor; - int vbp, vpw; - - pstate = to_dpu_plane_state(plane->state); - mode = &plane->state->crtc->mode; - - fmt = dpu_get_dpu_format_ext(fb->format->format, fb->modifier); - - src_width = drm_rect_width(&pdpu->pipe_cfg.src_rect); - src_height = drm_rect_height(&pdpu->pipe_cfg.src_rect); - dst_height = drm_rect_height(&pdpu->pipe_cfg.dst_rect); - fps = drm_mode_vrefresh(mode); - vbp = mode->vtotal - mode->vsync_end; - vpw = mode->vsync_end - mode->vsync_start; - hw_latency_lines = dpu_kms->catalog->perf.min_prefill_lines; - scale_factor = src_height > dst_height ? - mult_frac(src_height, 1, dst_height) : 1; - - plane_bw = - src_width * mode->vtotal * fps * fmt->bpp * scale_factor; - - plane_prefill_bw = - src_width * hw_latency_lines * fps * fmt->bpp * scale_factor; - - plane_prefill_bw = mult_frac(plane_prefill_bw, mode->vtotal, (vbp+vpw)); - - pstate->plane_fetch_bw = max(plane_bw, plane_prefill_bw); -} - - -/** - * _dpu_plane_calc_clk - calculate clock required for a plane - * @Plane: Pointer to drm plane. - * Result: Updates calculated clock in the plane state. - * Clock equation: dst_w * v_total * fps * (src_h / dst_h) - */ -static void _dpu_plane_calc_clk(struct drm_plane *plane) -{ - struct dpu_plane *pdpu = to_dpu_plane(plane); - struct dpu_plane_state *pstate; - struct drm_display_mode *mode; - int dst_width, src_height, dst_height, fps; - - pstate = to_dpu_plane_state(plane->state); - mode = &plane->state->crtc->mode; - - src_height = drm_rect_height(&pdpu->pipe_cfg.src_rect); - dst_width = drm_rect_width(&pdpu->pipe_cfg.dst_rect); - dst_height = drm_rect_height(&pdpu->pipe_cfg.dst_rect); - fps = drm_mode_vrefresh(mode); - - pstate->plane_clk = - dst_width * mode->vtotal * fps; - - if (src_height > dst_height) - pstate->plane_clk = mult_frac(pstate->plane_clk, - src_height, dst_height); -} - -/** * _dpu_plane_calc_fill_level - calculate fill level of the given source format * @plane: Pointer to drm plane * @fmt: Pointer to source buffer format @@ -1180,10 +1102,6 @@ static void dpu_plane_sspp_atomic_update(struct drm_plane *plane) } _dpu_plane_set_qos_remap(plane); - - _dpu_plane_calc_bw(plane, fb); - - _dpu_plane_calc_clk(plane); } static void _dpu_plane_atomic_disable(struct drm_plane *plane) |
