drm/msm/mdp4: get rid of struct mdp4_platform_config
Struct mdp4_platform_config is a relict from the DT-conversion time. Move the max_clk field to the mdp4_kms_init(), the place where it is used and drop the struct mdp4_platform_config and the mdp4_get_config() function. Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com> Patchwork: https://patchwork.freedesktop.org/patch/485050/ Link: https://lore.kernel.org/r/20220505135008.1351533-3-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
This commit is contained in:
@@ -13,8 +13,6 @@
|
||||
#include "msm_mmu.h"
|
||||
#include "mdp4_kms.h"
|
||||
|
||||
static struct mdp4_platform_config *mdp4_get_config(struct platform_device *dev);
|
||||
|
||||
static int mdp4_hw_init(struct msm_kms *kms)
|
||||
{
|
||||
struct mdp4_kms *mdp4_kms = to_mdp4_kms(to_mdp_kms(kms));
|
||||
@@ -386,7 +384,6 @@ static void read_mdp_hw_revision(struct mdp4_kms *mdp4_kms,
|
||||
static int mdp4_kms_init(struct drm_device *dev)
|
||||
{
|
||||
struct platform_device *pdev = to_platform_device(dev->dev);
|
||||
struct mdp4_platform_config *config = mdp4_get_config(pdev);
|
||||
struct msm_drm_private *priv = dev->dev_private;
|
||||
struct mdp4_kms *mdp4_kms;
|
||||
struct msm_kms *kms = NULL;
|
||||
@@ -394,6 +391,10 @@ static int mdp4_kms_init(struct drm_device *dev)
|
||||
struct msm_gem_address_space *aspace;
|
||||
int irq, ret;
|
||||
u32 major, minor;
|
||||
unsigned long max_clk;
|
||||
|
||||
/* TODO: Chips that aren't apq8064 have a 200 Mhz max_clk */
|
||||
max_clk = 266667000;
|
||||
|
||||
mdp4_kms = kzalloc(sizeof(*mdp4_kms), GFP_KERNEL);
|
||||
if (!mdp4_kms) {
|
||||
@@ -461,7 +462,7 @@ static int mdp4_kms_init(struct drm_device *dev)
|
||||
goto fail;
|
||||
}
|
||||
|
||||
clk_set_rate(mdp4_kms->clk, config->max_clk);
|
||||
clk_set_rate(mdp4_kms->clk, max_clk);
|
||||
|
||||
read_mdp_hw_revision(mdp4_kms, &major, &minor);
|
||||
|
||||
@@ -481,7 +482,7 @@ static int mdp4_kms_init(struct drm_device *dev)
|
||||
ret = PTR_ERR(mdp4_kms->lut_clk);
|
||||
goto fail;
|
||||
}
|
||||
clk_set_rate(mdp4_kms->lut_clk, config->max_clk);
|
||||
clk_set_rate(mdp4_kms->lut_clk, max_clk);
|
||||
}
|
||||
|
||||
pm_runtime_enable(dev->dev);
|
||||
@@ -554,16 +555,6 @@ fail:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static struct mdp4_platform_config *mdp4_get_config(struct platform_device *dev)
|
||||
{
|
||||
static struct mdp4_platform_config config = {};
|
||||
|
||||
/* TODO: Chips that aren't apq8064 have a 200 Mhz max_clk */
|
||||
config.max_clk = 266667000;
|
||||
|
||||
return &config;
|
||||
}
|
||||
|
||||
static const struct dev_pm_ops mdp4_pm_ops = {
|
||||
.prepare = msm_pm_prepare,
|
||||
.complete = msm_pm_complete,
|
||||
|
||||
@@ -42,11 +42,6 @@ struct mdp4_kms {
|
||||
};
|
||||
#define to_mdp4_kms(x) container_of(x, struct mdp4_kms, base)
|
||||
|
||||
/* platform config data (ie. from DT, or pdata) */
|
||||
struct mdp4_platform_config {
|
||||
uint32_t max_clk;
|
||||
};
|
||||
|
||||
static inline void mdp4_write(struct mdp4_kms *mdp4_kms, u32 reg, u32 data)
|
||||
{
|
||||
msm_writel(data, mdp4_kms->mmio + reg);
|
||||
|
||||
Reference in New Issue
Block a user