Commit 638c93f6 authored by Stefan Agner's avatar Stefan Agner

drm/fsl-dcu: mask all interrupts on initialization

The state of the interrupt mask register on initialization is
unknown, e.g. U-Boot could already used the DCU. So depending on
the boot loader, the outcome of the interrupt mask register could
be different. A defined state is much more preferable. Also, there
is no value in keeping interrupts enabled which we don't need.
Therefor, mask all interrupts on initialization.
Signed-off-by: default avatarStefan Agner <stefan@agner.ch>
parent 7566e247
...@@ -48,7 +48,6 @@ static const struct regmap_config fsl_dcu_regmap_config = { ...@@ -48,7 +48,6 @@ static const struct regmap_config fsl_dcu_regmap_config = {
static int fsl_dcu_drm_irq_init(struct drm_device *dev) static int fsl_dcu_drm_irq_init(struct drm_device *dev)
{ {
struct fsl_dcu_drm_device *fsl_dev = dev->dev_private; struct fsl_dcu_drm_device *fsl_dev = dev->dev_private;
unsigned int value;
int ret; int ret;
ret = drm_irq_install(dev, fsl_dev->irq); ret = drm_irq_install(dev, fsl_dev->irq);
...@@ -56,9 +55,7 @@ static int fsl_dcu_drm_irq_init(struct drm_device *dev) ...@@ -56,9 +55,7 @@ static int fsl_dcu_drm_irq_init(struct drm_device *dev)
dev_err(dev->dev, "failed to install IRQ handler\n"); dev_err(dev->dev, "failed to install IRQ handler\n");
regmap_write(fsl_dev->regmap, DCU_INT_STATUS, 0); regmap_write(fsl_dev->regmap, DCU_INT_STATUS, 0);
regmap_read(fsl_dev->regmap, DCU_INT_MASK, &value); regmap_write(fsl_dev->regmap, DCU_INT_MASK, ~0);
value &= DCU_INT_MASK_VBLANK;
regmap_write(fsl_dev->regmap, DCU_INT_MASK, value);
regmap_write(fsl_dev->regmap, DCU_UPDATE_MODE, regmap_write(fsl_dev->regmap, DCU_UPDATE_MODE,
DCU_UPDATE_MODE_READREG); DCU_UPDATE_MODE_READREG);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment