lkml.org 
[lkml]   [2019]   [Dec]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.3 034/105] drm/sun4i: tcon: Set min division of TCON0_DCLK to 1.
    Date
    From: Yunhao Tian <t123yh@outlook.com>

    [ Upstream commit 0b8e7bbde5e7e2c419567e1ee29587dae3b78ee3 ]

    The datasheet of V3s (and various other chips) wrote
    that TCON0_DCLK_DIV can be >= 1 if only dclk is used,
    and must >= 6 if dclk1 or dclk2 is used. As currently
    neither dclk1 nor dclk2 is used (no writes to these
    bits), let's set minimal division to 1.

    If this minimal division is 6, some common dot clock
    frequencies can't be produced (e.g. 30MHz will not be
    possible and will fallback to 25MHz), which is
    obviously not an expected behaviour.

    Signed-off-by: Yunhao Tian <t123yh@outlook.com>
    Signed-off-by: Maxime Ripard <maxime@cerno.tech>
    Link: https://lore.kernel.org/linux-arm-kernel/MN2PR08MB57905AD8A00C08DA219377C989760@MN2PR08MB5790.namprd08.prod.outlook.com/
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ---
    drivers/gpu/drm/sun4i/sun4i_tcon.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    diff --git a/drivers/gpu/drm/sun4i/sun4i_tcon.c b/drivers/gpu/drm/sun4i/sun4i_tcon.c
    index df0cc8f46d7bd..3491c4c7659e4 100644
    --- a/drivers/gpu/drm/sun4i/sun4i_tcon.c
    +++ b/drivers/gpu/drm/sun4i/sun4i_tcon.c
    @@ -486,7 +486,7 @@ static void sun4i_tcon0_mode_set_rgb(struct sun4i_tcon *tcon,

    WARN_ON(!tcon->quirks->has_channel_0);

    - tcon->dclk_min_div = 6;
    + tcon->dclk_min_div = 1;
    tcon->dclk_max_div = 127;
    sun4i_tcon0_mode_set_common(tcon, mode);

    --
    2.20.1


    \
     
     \ /
      Last update: 2019-12-11 17:06    [W:2.757 / U:0.152 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site