summaryrefslogtreecommitdiff
path: root/drivers/gpu
diff options
context:
space:
mode:
authorStefan Agner <stefan@agner.ch>2016-02-11 18:07:42 -0800
committerStefan Agner <stefan@agner.ch>2016-02-11 18:07:42 -0800
commit664a6d3970e698ff7b01a1703e3e496313837692 (patch)
tree4ace2ca5b981ae5459de602131cda9379c801646 /drivers/gpu
parent4781cbb343706f816b3e388574265a4656c30ae0 (diff)
Revert "drm/fsl-dcu: use flat regmap cache"
This reverts commit bf91711ee5661c8cdc516423f32573707703614f.
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c18
-rw-r--r--drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.h6
2 files changed, 9 insertions, 15 deletions
diff --git a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c
index 5be5adfa26e2..76002e4b224e 100644
--- a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c
+++ b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c
@@ -38,11 +38,11 @@ static bool fsl_dcu_drm_is_volatile_reg(struct device *dev, unsigned int reg)
return false;
}
-static struct regmap_config fsl_dcu_regmap_config = {
+static const struct regmap_config fsl_dcu_regmap_config = {
.reg_bits = 32,
.reg_stride = 4,
.val_bits = 32,
- .cache_type = REGCACHE_FLAT,
+ .cache_type = REGCACHE_RBTREE,
.volatile_reg = fsl_dcu_drm_is_volatile_reg,
};
@@ -288,14 +288,12 @@ static const struct fsl_dcu_soc_data fsl_dcu_ls1021a_data = {
.name = "ls1021a",
.total_layer = 16,
.max_layer = 4,
- .max_register = LS1021A_DCU_MAX_REGISTER,
};
static const struct fsl_dcu_soc_data fsl_dcu_vf610_data = {
.name = "vf610",
.total_layer = 64,
.max_layer = 6,
- .max_register = VF610_DCU_MAX_REGISTER,
};
static const struct of_device_id fsl_dcu_of_match[] = {
@@ -361,13 +359,6 @@ static int fsl_dcu_drm_probe(struct platform_device *pdev)
return ret;
}
- id = of_match_node(fsl_dcu_of_match, pdev->dev.of_node);
- if (!id)
- return -ENODEV;
-
- fsl_dev->soc = id->data;
-
- fsl_dcu_regmap_config.max_register = fsl_dev->soc->max_register;
fsl_dev->regmap = devm_regmap_init_mmio(dev, base,
&fsl_dcu_regmap_config);
if (IS_ERR(fsl_dev->regmap)) {
@@ -375,6 +366,11 @@ static int fsl_dcu_drm_probe(struct platform_device *pdev)
return PTR_ERR(fsl_dev->regmap);
}
+ id = of_match_node(fsl_dcu_of_match, pdev->dev.of_node);
+ if (!id)
+ return -ENODEV;
+ fsl_dev->soc = id->data;
+
drm = drm_dev_alloc(driver, dev);
if (!drm)
return -ENOMEM;
diff --git a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.h b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.h
index c883d16f0076..bff6a274f0fc 100644
--- a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.h
+++ b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.h
@@ -114,6 +114,8 @@
#define DCU_UPDATE_MODE_MODE BIT(31)
#define DCU_UPDATE_MODE_READREG BIT(30)
+#define DCU_DCFB_MAX 0x300
+
#define DCU_CTRLDESCLN(layer, reg) (0x200 + (reg - 1) * 4 + (layer) * 0x40)
#define DCU_LAYER_HEIGHT(x) (((x) & 0x7ff) << 16)
@@ -153,9 +155,6 @@
#define DCU_LAYER_POST_SKIP(x) ((x) << 16)
#define DCU_LAYER_PRE_SKIP(x) (x)
-#define VF610_DCU_MAX_REGISTER 0x11fc
-#define LS1021A_DCU_MAX_REGISTER 0x5fc
-
#define FSL_DCU_RGB565 4
#define FSL_DCU_RGB888 5
#define FSL_DCU_ARGB8888 6
@@ -177,7 +176,6 @@ struct fsl_dcu_soc_data {
unsigned int total_layer;
/*max layer number DCU supported*/
unsigned int max_layer;
- unsigned int max_register;
};
struct fsl_dcu_drm_device {