diff mbox

[PATCHv3,03/30] drm/omap: remove divider constraint from hsdiv

Message ID 1490706496-4959-4-git-send-email-tomi.valkeinen@ti.com (mailing list archive)
State New, archived
Headers show

Commit Message

Tomi Valkeinen March 28, 2017, 1:07 p.m. UTC
The driver only uses even dividers for hsdiv when pclk >= 100MHz, as odd
dividers can create uneven duty cycle. However, while this holds true
for some dividers like DISPC's LCK and PCK dividers, it is not actually
true for hsdiv.

hsdiv always produces even duty cycle, so the constraint can be removed.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 drivers/gpu/drm/omapdrm/dss/dpi.c | 8 --------
 1 file changed, 8 deletions(-)

Comments

Laurent Pinchart March 29, 2017, 8:09 a.m. UTC | #1
Hi Tomi,

Thank you for the patch.

On Tuesday 28 Mar 2017 16:07:49 Tomi Valkeinen wrote:
> The driver only uses even dividers for hsdiv when pclk >= 100MHz, as odd
> dividers can create uneven duty cycle. However, while this holds true
> for some dividers like DISPC's LCK and PCK dividers, it is not actually
> true for hsdiv.
> 
> hsdiv always produces even duty cycle, so the constraint can be removed.
> 
> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>

Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
>  drivers/gpu/drm/omapdrm/dss/dpi.c | 8 --------
>  1 file changed, 8 deletions(-)
> 
> diff --git a/drivers/gpu/drm/omapdrm/dss/dpi.c
> b/drivers/gpu/drm/omapdrm/dss/dpi.c index e75162d26ac0..e0b0c5c24c55 100644
> --- a/drivers/gpu/drm/omapdrm/dss/dpi.c
> +++ b/drivers/gpu/drm/omapdrm/dss/dpi.c
> @@ -170,14 +170,6 @@ static bool dpi_calc_hsdiv_cb(int m_dispc, unsigned
> long dispc, {
>  	struct dpi_clk_calc_ctx *ctx = data;
> 
> -	/*
> -	 * Odd dividers give us uneven duty cycle, causing problem when level
> -	 * shifted. So skip all odd dividers when the pixel clock is on the
> -	 * higher side.
> -	 */
> -	if (m_dispc > 1 && m_dispc % 2 != 0 && ctx->pck_min >= 100000000)
> -		return false;
> -
>  	ctx->pll_cinfo.mX[ctx->clkout_idx] = m_dispc;
>  	ctx->pll_cinfo.clkout[ctx->clkout_idx] = dispc;
diff mbox

Patch

diff --git a/drivers/gpu/drm/omapdrm/dss/dpi.c b/drivers/gpu/drm/omapdrm/dss/dpi.c
index e75162d26ac0..e0b0c5c24c55 100644
--- a/drivers/gpu/drm/omapdrm/dss/dpi.c
+++ b/drivers/gpu/drm/omapdrm/dss/dpi.c
@@ -170,14 +170,6 @@  static bool dpi_calc_hsdiv_cb(int m_dispc, unsigned long dispc,
 {
 	struct dpi_clk_calc_ctx *ctx = data;
 
-	/*
-	 * Odd dividers give us uneven duty cycle, causing problem when level
-	 * shifted. So skip all odd dividers when the pixel clock is on the
-	 * higher side.
-	 */
-	if (m_dispc > 1 && m_dispc % 2 != 0 && ctx->pck_min >= 100000000)
-		return false;
-
 	ctx->pll_cinfo.mX[ctx->clkout_idx] = m_dispc;
 	ctx->pll_cinfo.clkout[ctx->clkout_idx] = dispc;