| Date | Mon, 25 Aug 2025 20:34:37 +0300 | | From | Dmitry Baryshkov <> | | Subject | Re: [PATCH v3 08/38] drm/msm/dp: move the pixel clock control to its own API |
| |
On Mon, Aug 25, 2025 at 10:15:54PM +0800, Yongxing Mou wrote: > Enable/Disable of DP pixel clock happens in multiple code paths > leading to code duplication. Move it into individual helpers so that > the helpers can be called wherever necessary. > > Signed-off-by: Abhinav Kumar <quic_abhinavk@quicinc.com> > Signed-off-by: Yongxing Mou <yongxing.mou@oss.qualcomm.com> > --- > drivers/gpu/drm/msm/dp/dp_ctrl.c | 77 +++++++++++++++++++++------------------- > 1 file changed, 41 insertions(+), 36 deletions(-) > > @@ -2518,21 +2539,10 @@ int msm_dp_ctrl_on_stream(struct msm_dp_ctrl *msm_dp_ctrl, struct msm_dp_panel * > > drm_dbg_dp(ctrl->drm_dev, "pixel_rate=%lu\n", pixel_rate); > > - ret = clk_set_rate(ctrl->pixel_clk, pixel_rate * 1000); > + ret = msm_dp_ctrl_on_pixel_clk(ctrl, pixel_rate); > if (ret) {
Nit: unused curly brackets.
Other than that:
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> - DRM_ERROR("Failed to set pixel clock rate. ret=%d\n", ret); > - goto end; > - } > - > - if (ctrl->stream_clks_on) { > - drm_dbg_dp(ctrl->drm_dev, "pixel clks already enabled\n"); > - } else { > - ret = clk_prepare_enable(ctrl->pixel_clk); > - if (ret) { > - DRM_ERROR("Failed to start pixel clocks. ret=%d\n", ret); > - goto end; > - } > - ctrl->stream_clks_on = true; > + DRM_ERROR("failed to enable pixel clk\n"); > + return ret; > } >
-- With best wishes Dmitry
|