mirror of
				https://xff.cz/git/u-boot/
				synced 2025-10-27 08:33:10 +01:00 
			
		
		
		
	sunxi: video: HDMI: Fix LCD clock divider
Currently we may end up with an LCD clock divider that differs from
the HDMI PHY clock divider if we can't exactly match the pixel clock.
Fix this by using DIV_ROUND_UP to calculate the divider.  This works
since the PLL is chosen such that the resulting pixel clock is
never higher than the requested pixel clock.
Fixes: 1feed358ed ("sunxi: video: HDMI: Fix clock setup")
Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
			
			
This commit is contained in:
		
				
					committed by
					
						 Anatolij Gustschin
						Anatolij Gustschin
					
				
			
			
				
	
			
			
			
						parent
						
							d2a8271c88
						
					
				
				
					commit
					f34e7fc29b
				
			| @@ -254,7 +254,7 @@ static void sunxi_dw_hdmi_lcdc_init(int mux, const struct display_timing *edid, | ||||
| { | ||||
| 	struct sunxi_ccm_reg * const ccm = | ||||
| 		(struct sunxi_ccm_reg *)SUNXI_CCM_BASE; | ||||
| 	int div = clock_get_pll3() / edid->pixelclock.typ; | ||||
| 	int div = DIV_ROUND_UP(clock_get_pll3(), edid->pixelclock.typ); | ||||
| 	struct sunxi_lcdc_reg *lcdc; | ||||
|  | ||||
| 	if (mux == 0) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user