Skip to content

Commit

Permalink
drm/fsl-dcu: mask all interrupts on initialization
Browse files Browse the repository at this point in the history
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: Stefan Agner <stefan@agner.ch>
  • Loading branch information
Stefan Agner committed Feb 26, 2016
1 parent 7566e24 commit 638c93f
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,14 @@ static const struct regmap_config fsl_dcu_regmap_config = {
static int fsl_dcu_drm_irq_init(struct drm_device *dev)
{
struct fsl_dcu_drm_device *fsl_dev = dev->dev_private;
unsigned int value;
int ret;

ret = drm_irq_install(dev, fsl_dev->irq);
if (ret < 0)
dev_err(dev->dev, "failed to install IRQ handler\n");

regmap_write(fsl_dev->regmap, DCU_INT_STATUS, 0);
regmap_read(fsl_dev->regmap, DCU_INT_MASK, &value);
value &= DCU_INT_MASK_VBLANK;
regmap_write(fsl_dev->regmap, DCU_INT_MASK, value);
regmap_write(fsl_dev->regmap, DCU_INT_MASK, ~0);
regmap_write(fsl_dev->regmap, DCU_UPDATE_MODE,
DCU_UPDATE_MODE_READREG);

Expand Down

0 comments on commit 638c93f

Please sign in to comment.