Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1272761

[PATCH 5/7] drm/fsl-dcu: mask all interrupts on initialization

From Stefan Agner <stefan@agner.ch>
Newsgroups linux.kernel
Subject [PATCH 5/7] drm/fsl-dcu: mask all interrupts on initialization
Date 2015-11-19 03:50 +0100
Message-ID <qwnsl-3hD-9@gated-at.bofh.it> (permalink)
References <qwnsl-3hD-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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>
---
 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c | 5 +----
 1 file changed, 1 insertion(+), 4 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 d37ff0e..e01c813 100644
--- a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c
+++ b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c
@@ -48,7 +48,6 @@ 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);
@@ -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");
 
 	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);
 
-- 
2.6.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/7] drm/fsl-dcu: fixes and enhancements Stefan Agner <stefan@agner.ch> - 2015-11-19 03:50 +0100
  [PATCH 5/7] drm/fsl-dcu: mask all interrupts on initialization Stefan Agner <stefan@agner.ch> - 2015-11-19 03:50 +0100
  [PATCH 1/7] drm/fsl-dcu: specify volatile registers Stefan Agner <stefan@agner.ch> - 2015-11-19 03:50 +0100
  [PATCH 6/7] drm/fsl-dcu: fix alpha blending Stefan Agner <stefan@agner.ch> - 2015-11-19 03:50 +0100
  [PATCH 2/7] drm/fsl-dcu: remove regmap return value checks Stefan Agner <stefan@agner.ch> - 2015-11-19 03:50 +0100
  [PATCH 3/7] drm/fsl-dcu: avoid memory leak on errors Stefan Agner <stefan@agner.ch> - 2015-11-19 03:50 +0100

csiph-web