Following the pattern of other interfaces, lets align writeback as well by dropping the dpu_kms parameter in its _dpu_kms_initialize_* function. Signed-off-by: Abhinav Kumar <quic_abhinavk@xxxxxxxxxxx> --- drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c index ab924ac78c9b..382ef4c8e8eb 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c @@ -620,13 +620,12 @@ static int _dpu_kms_initialize_hdmi(struct drm_device *dev, } static int _dpu_kms_initialize_writeback(struct drm_device *dev, - struct msm_drm_private *priv, struct dpu_kms *dpu_kms, + struct msm_drm_private *priv, u32 maxlinewidth, const u32 *wb_formats, int n_formats) { struct drm_encoder *encoder = NULL; struct msm_display_info info; const enum dpu_wb wb_idx = WB_2; - u32 maxlinewidth; int rc; memset(&info, 0, sizeof(info)); @@ -636,8 +635,6 @@ static int _dpu_kms_initialize_writeback(struct drm_device *dev, info.h_tile_instance[0] = wb_idx; info.intf_type = INTF_WB; - maxlinewidth = dpu_rm_get_wb(&dpu_kms->rm, info.h_tile_instance[0])->caps->maxlinewidth; - encoder = dpu_encoder_init(dev, DRM_MODE_ENCODER_VIRTUAL, &info); if (IS_ERR(encoder)) { DPU_ERROR("encoder init failed for dsi display\n"); @@ -690,9 +687,12 @@ static int _dpu_kms_setup_displays(struct drm_device *dev, if (dpu_kms->catalog->wb_count) { for (i = 0; i < dpu_kms->catalog->wb_count; i++) { if (dpu_kms->catalog->wb[i].id == WB_2) { - rc = _dpu_kms_initialize_writeback(dev, priv, dpu_kms, - dpu_kms->catalog->wb[i].format_list, - dpu_kms->catalog->wb[i].num_formats); + u32 wb_maxlinewidth = dpu_kms->catalog->wb[i].maxlinewidth; + const u32 *wb_formats = dpu_kms->catalog->wb[i].format_list; + u32 n_formats = dpu_kms->catalog->wb[i].num_formats; + + rc = _dpu_kms_initialize_writeback(dev, priv, wb_maxlinewidth, + wb_formats, n_formats); if (rc) { DPU_ERROR("initialize_WB failed, rc = %d\n", rc); return rc; -- 2.34.1