[PATCH 02/12] vop2: rk3588: pass clock to rk3588_calc_cru_cfg()
Sascha Hauer
s.hauer at pengutronix.de
Mon Oct 28 07:19:47 PDT 2024
crtc_clock was initialized to 0 just to make the driver compile.
Initialize to the real value, needed for RK3588.
Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
drivers/video/rockchip/rockchip_drm_vop2.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/video/rockchip/rockchip_drm_vop2.c b/drivers/video/rockchip/rockchip_drm_vop2.c
index 3a1c951ec7..b211be39c7 100644
--- a/drivers/video/rockchip/rockchip_drm_vop2.c
+++ b/drivers/video/rockchip/rockchip_drm_vop2.c
@@ -743,11 +743,10 @@ static unsigned long rk3588_calc_dclk(unsigned long child_clk, unsigned long max
*/
static unsigned long rk3588_calc_cru_cfg(struct vop2_video_port *vp, int id,
int *dclk_core_div, int *dclk_out_div,
- int *if_pixclk_div, int *if_dclk_div)
+ int *if_pixclk_div, int *if_dclk_div, unsigned int clock)
{
struct vop2 *vop2 = vp->vop2;
- u32 crtc_clock = 0;
- unsigned long v_pixclk = crtc_clock * 1000LL; /* video timing pixclk */
+ unsigned long v_pixclk = clock; /* video timing pixclk */
unsigned long dclk_core_rate = v_pixclk >> 2;
unsigned long dclk_rate = v_pixclk;
unsigned long dclk_out_rate;
@@ -856,7 +855,7 @@ static unsigned long rk3588_set_intf_mux(struct vop2_video_port *vp, int id, u32
u32 die, dip, div, vp_clk_div, val;
clock = rk3588_calc_cru_cfg(vp, id, &dclk_core_div, &dclk_out_div,
- &if_pixclk_div, &if_dclk_div);
+ &if_pixclk_div, &if_dclk_div, clock);
if (!clock)
return 0;
--
2.39.5
More information about the barebox
mailing list