Skip to content

Commit

Permalink
drm/msm/dsi: Use MSM and DRM DSC helper methods
Browse files Browse the repository at this point in the history
Use MSM and DRM DSC helper methods to configure DSC for DSI.

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Marijn Suijten <marijn.suijten@somainline.org>
Signed-off-by: Jessica Zhang <quic_jesszhan@quicinc.com>
Patchwork: https://patchwork.freedesktop.org/patch/539274/
Link: https://lore.kernel.org/r/20230329-rfc-msm-dsc-helper-v14-8-bafc7be95691@quicinc.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
  • Loading branch information
Jessica Zhang authored and Dmitry Baryshkov committed Jun 15, 2023
1 parent c223059 commit ed1498f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/gpu/drm/msm/dsi/dsi_host.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include "dsi.xml.h"
#include "sfpb.xml.h"
#include "dsi_cfg.h"
#include "msm_dsc_helper.h"
#include "msm_kms.h"
#include "msm_gem.h"
#include "phy/dsi_phy.h"
Expand Down Expand Up @@ -845,7 +846,7 @@ static void dsi_update_dsc_timing(struct msm_dsi_host *msm_host, bool is_cmd_mod
/* first calculate dsc parameters and then program
* compress mode registers
*/
slice_per_intf = DIV_ROUND_UP(hdisplay, dsc->slice_width);
slice_per_intf = msm_dsc_get_slices_per_intf(dsc, hdisplay);

/*
* If slice_count is greater than slice_per_intf
Expand Down Expand Up @@ -1756,7 +1757,7 @@ static int dsi_populate_dsc_params(struct msm_dsi_host *msm_host, struct drm_dsc
return ret;
}

dsc->initial_scale_value = 32;
dsc->initial_scale_value = drm_dsc_initial_scale_value(dsc);
dsc->line_buf_depth = dsc->bits_per_component + 1;

return drm_dsc_compute_rc_parameters(dsc);
Expand Down

0 comments on commit ed1498f

Please sign in to comment.