mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-15 23:41:35 -04:00
drm/msm/mdp4: Consistently use the "mdp4_" namespace
Functions and other stuff all start with "mdp4_", except a few ones that start with "mpd4_" (d and p switched) Make things consistent and use "mdp4_" everywhere. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Patchwork: https://patchwork.freedesktop.org/patch/661306/ Link: https://lore.kernel.org/r/6b9076268548c52ec371e9ed35fee0dd8fcb46ef.1751044672.git.christophe.jaillet@wanadoo.fr Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
This commit is contained in:
committed by
Dmitry Baryshkov
parent
3cf6147f2b
commit
bffa3a03e7
@@ -202,6 +202,6 @@ static inline struct drm_encoder *mdp4_dsi_encoder_init(struct drm_device *dev)
|
||||
}
|
||||
#endif
|
||||
|
||||
struct clk *mpd4_get_lcdc_clock(struct drm_device *dev);
|
||||
struct clk *mdp4_get_lcdc_clock(struct drm_device *dev);
|
||||
|
||||
#endif /* __MDP4_KMS_H__ */
|
||||
|
||||
@@ -375,7 +375,7 @@ struct drm_encoder *mdp4_lcdc_encoder_init(struct drm_device *dev)
|
||||
|
||||
drm_encoder_helper_add(encoder, &mdp4_lcdc_encoder_helper_funcs);
|
||||
|
||||
mdp4_lcdc_encoder->lcdc_clk = mpd4_get_lcdc_clock(dev);
|
||||
mdp4_lcdc_encoder->lcdc_clk = mdp4_get_lcdc_clock(dev);
|
||||
if (IS_ERR(mdp4_lcdc_encoder->lcdc_clk)) {
|
||||
DRM_DEV_ERROR(dev->dev, "failed to get lvds_clk\n");
|
||||
return ERR_CAST(mdp4_lcdc_encoder->lcdc_clk);
|
||||
|
||||
@@ -54,7 +54,7 @@ static const struct pll_rate *find_rate(unsigned long rate)
|
||||
return &freqtbl[i-1];
|
||||
}
|
||||
|
||||
static int mpd4_lvds_pll_enable(struct clk_hw *hw)
|
||||
static int mdp4_lvds_pll_enable(struct clk_hw *hw)
|
||||
{
|
||||
struct mdp4_lvds_pll *lvds_pll = to_mdp4_lvds_pll(hw);
|
||||
struct mdp4_kms *mdp4_kms = get_kms(lvds_pll);
|
||||
@@ -80,7 +80,7 @@ static int mpd4_lvds_pll_enable(struct clk_hw *hw)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void mpd4_lvds_pll_disable(struct clk_hw *hw)
|
||||
static void mdp4_lvds_pll_disable(struct clk_hw *hw)
|
||||
{
|
||||
struct mdp4_lvds_pll *lvds_pll = to_mdp4_lvds_pll(hw);
|
||||
struct mdp4_kms *mdp4_kms = get_kms(lvds_pll);
|
||||
@@ -91,21 +91,21 @@ static void mpd4_lvds_pll_disable(struct clk_hw *hw)
|
||||
mdp4_write(mdp4_kms, REG_MDP4_LVDS_PHY_PLL_CTRL_0, 0x0);
|
||||
}
|
||||
|
||||
static unsigned long mpd4_lvds_pll_recalc_rate(struct clk_hw *hw,
|
||||
static unsigned long mdp4_lvds_pll_recalc_rate(struct clk_hw *hw,
|
||||
unsigned long parent_rate)
|
||||
{
|
||||
struct mdp4_lvds_pll *lvds_pll = to_mdp4_lvds_pll(hw);
|
||||
return lvds_pll->pixclk;
|
||||
}
|
||||
|
||||
static long mpd4_lvds_pll_round_rate(struct clk_hw *hw, unsigned long rate,
|
||||
static long mdp4_lvds_pll_round_rate(struct clk_hw *hw, unsigned long rate,
|
||||
unsigned long *parent_rate)
|
||||
{
|
||||
const struct pll_rate *pll_rate = find_rate(rate);
|
||||
return pll_rate->rate;
|
||||
}
|
||||
|
||||
static int mpd4_lvds_pll_set_rate(struct clk_hw *hw, unsigned long rate,
|
||||
static int mdp4_lvds_pll_set_rate(struct clk_hw *hw, unsigned long rate,
|
||||
unsigned long parent_rate)
|
||||
{
|
||||
struct mdp4_lvds_pll *lvds_pll = to_mdp4_lvds_pll(hw);
|
||||
@@ -114,26 +114,26 @@ static int mpd4_lvds_pll_set_rate(struct clk_hw *hw, unsigned long rate,
|
||||
}
|
||||
|
||||
|
||||
static const struct clk_ops mpd4_lvds_pll_ops = {
|
||||
.enable = mpd4_lvds_pll_enable,
|
||||
.disable = mpd4_lvds_pll_disable,
|
||||
.recalc_rate = mpd4_lvds_pll_recalc_rate,
|
||||
.round_rate = mpd4_lvds_pll_round_rate,
|
||||
.set_rate = mpd4_lvds_pll_set_rate,
|
||||
static const struct clk_ops mdp4_lvds_pll_ops = {
|
||||
.enable = mdp4_lvds_pll_enable,
|
||||
.disable = mdp4_lvds_pll_disable,
|
||||
.recalc_rate = mdp4_lvds_pll_recalc_rate,
|
||||
.round_rate = mdp4_lvds_pll_round_rate,
|
||||
.set_rate = mdp4_lvds_pll_set_rate,
|
||||
};
|
||||
|
||||
static const struct clk_parent_data mpd4_lvds_pll_parents[] = {
|
||||
static const struct clk_parent_data mdp4_lvds_pll_parents[] = {
|
||||
{ .fw_name = "pxo", .name = "pxo", },
|
||||
};
|
||||
|
||||
static struct clk_init_data pll_init = {
|
||||
.name = "mpd4_lvds_pll",
|
||||
.ops = &mpd4_lvds_pll_ops,
|
||||
.parent_data = mpd4_lvds_pll_parents,
|
||||
.num_parents = ARRAY_SIZE(mpd4_lvds_pll_parents),
|
||||
.name = "mdp4_lvds_pll",
|
||||
.ops = &mdp4_lvds_pll_ops,
|
||||
.parent_data = mdp4_lvds_pll_parents,
|
||||
.num_parents = ARRAY_SIZE(mdp4_lvds_pll_parents),
|
||||
};
|
||||
|
||||
static struct clk_hw *mpd4_lvds_pll_init(struct drm_device *dev)
|
||||
static struct clk_hw *mdp4_lvds_pll_init(struct drm_device *dev)
|
||||
{
|
||||
struct mdp4_lvds_pll *lvds_pll;
|
||||
int ret;
|
||||
@@ -156,14 +156,14 @@ static struct clk_hw *mpd4_lvds_pll_init(struct drm_device *dev)
|
||||
return &lvds_pll->pll_hw;
|
||||
}
|
||||
|
||||
struct clk *mpd4_get_lcdc_clock(struct drm_device *dev)
|
||||
struct clk *mdp4_get_lcdc_clock(struct drm_device *dev)
|
||||
{
|
||||
struct clk_hw *hw;
|
||||
struct clk *clk;
|
||||
|
||||
|
||||
/* TODO: do we need different pll in other cases? */
|
||||
hw = mpd4_lvds_pll_init(dev);
|
||||
hw = mdp4_lvds_pll_init(dev);
|
||||
if (IS_ERR(hw)) {
|
||||
DRM_DEV_ERROR(dev->dev, "failed to register LVDS PLL\n");
|
||||
return ERR_CAST(hw);
|
||||
|
||||
Reference in New Issue
Block a user