Skip to content

Commit a19effb

Browse files
wqyoungpinchartl
authored andcommitted
drm: xlnx: zynqmp_dpsub: Call pm_runtime_get_sync before setting pixel clock
The Runtime PM subsystem will force the device "fd4a0000.zynqmp-display" to enter suspend state while booting if the following conditions are met: - the usage counter is zero (pm_runtime_get_sync hasn't been called yet) - no 'active' children (no zynqmp-dp-snd-xx node under dpsub node) - no other device in the same power domain (dpdma node has no "power-domains = <&zynqmp_firmware PD_DP>" property) So there is a scenario as below: 1) DP device enters suspend state <- call zynqmp_gpd_power_off 2) zynqmp_disp_crtc_setup_clock <- configurate register VPLL_FRAC_CFG 3) pm_runtime_get_sync <- call zynqmp_gpd_power_on and clear previous VPLL_FRAC_CFG configuration 4) clk_prepare_enable(disp->pclk) <- enable failed since VPLL_FRAC_CFG configuration is corrupted From above, we can see that pm_runtime_get_sync may clear register VPLL_FRAC_CFG configuration and result the failure of clk enabling. Putting pm_runtime_get_sync at the very beginning of the function zynqmp_disp_crtc_atomic_enable can resolve this issue. Signed-off-by: Quanyang Wang <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Signed-off-by: Laurent Pinchart <[email protected]>
1 parent 49f7844 commit a19effb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/gpu/drm/xlnx/zynqmp_disp.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1452,9 +1452,10 @@ zynqmp_disp_crtc_atomic_enable(struct drm_crtc *crtc,
14521452
struct drm_display_mode *adjusted_mode = &crtc->state->adjusted_mode;
14531453
int ret, vrefresh;
14541454

1455+
pm_runtime_get_sync(disp->dev);
1456+
14551457
zynqmp_disp_crtc_setup_clock(crtc, adjusted_mode);
14561458

1457-
pm_runtime_get_sync(disp->dev);
14581459
ret = clk_prepare_enable(disp->pclk);
14591460
if (ret) {
14601461
dev_err(disp->dev, "failed to enable a pixel clock\n");

0 commit comments

Comments
 (0)