forked from Minki/linux
drm/msm/mdp5: Add optional TBU and TBU_RT clocks
Some SoCs, like MSM8956/8976 (and APQ variants), do feature these clocks and we need to enable them in order to get both of the hw (mdp5/rot) Translation Buffer Units (TBUs) to properly work. Signed-off-by: AngeloGioacchino Del Regno <kholk11@gmail.com> Signed-off-by: Rob Clark <robdclark@chromium.org>
This commit is contained in:
parent
abdfd18fe0
commit
1c2a9f254c
@ -309,6 +309,10 @@ int mdp5_disable(struct mdp5_kms *mdp5_kms)
|
||||
mdp5_kms->enable_count--;
|
||||
WARN_ON(mdp5_kms->enable_count < 0);
|
||||
|
||||
if (mdp5_kms->tbu_rt_clk)
|
||||
clk_disable_unprepare(mdp5_kms->tbu_rt_clk);
|
||||
if (mdp5_kms->tbu_clk)
|
||||
clk_disable_unprepare(mdp5_kms->tbu_clk);
|
||||
clk_disable_unprepare(mdp5_kms->ahb_clk);
|
||||
clk_disable_unprepare(mdp5_kms->axi_clk);
|
||||
clk_disable_unprepare(mdp5_kms->core_clk);
|
||||
@ -329,6 +333,10 @@ int mdp5_enable(struct mdp5_kms *mdp5_kms)
|
||||
clk_prepare_enable(mdp5_kms->core_clk);
|
||||
if (mdp5_kms->lut_clk)
|
||||
clk_prepare_enable(mdp5_kms->lut_clk);
|
||||
if (mdp5_kms->tbu_clk)
|
||||
clk_prepare_enable(mdp5_kms->tbu_clk);
|
||||
if (mdp5_kms->tbu_rt_clk)
|
||||
clk_prepare_enable(mdp5_kms->tbu_rt_clk);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -965,6 +973,8 @@ static int mdp5_init(struct platform_device *pdev, struct drm_device *dev)
|
||||
|
||||
/* optional clocks: */
|
||||
get_clk(pdev, &mdp5_kms->lut_clk, "lut", false);
|
||||
get_clk(pdev, &mdp5_kms->tbu_clk, "tbu", false);
|
||||
get_clk(pdev, &mdp5_kms->tbu_rt_clk, "tbu_rt", false);
|
||||
|
||||
/* we need to set a default rate before enabling. Set a safe
|
||||
* rate first, then figure out hw revision, and then set a
|
||||
|
@ -53,6 +53,8 @@ struct mdp5_kms {
|
||||
struct clk *ahb_clk;
|
||||
struct clk *core_clk;
|
||||
struct clk *lut_clk;
|
||||
struct clk *tbu_clk;
|
||||
struct clk *tbu_rt_clk;
|
||||
struct clk *vsync_clk;
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user