All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm: hdlcd: allow HDLCD to be used without interrupt
@ 2017-07-26 10:05 ` Russell King
  0 siblings, 0 replies; 26+ messages in thread
From: Russell King @ 2017-07-26 10:05 UTC (permalink / raw)
  To: Liviu Dudau
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, David Airlie,
	Rob Herring, Mark Rutland, Brian Starkey, Mali DP Maintainers,
	dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
	devicetree-u79uwXL29TY76Z2rM5mHXA

Some ARM platforms do not wire the HDLCD interrupt.  Allow hdlcd to
initialise without an interrupt present.

Signed-off-by: Russell King <rmk+kernel-I+IVW8TIWO2tmTQ+vhA3Yw@public.gmane.org>
---
 Documentation/devicetree/bindings/display/arm,hdlcd.txt |  6 +++---
 drivers/gpu/drm/arm/hdlcd_drv.c                         | 13 ++++++++-----
 2 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/Documentation/devicetree/bindings/display/arm,hdlcd.txt b/Documentation/devicetree/bindings/display/arm,hdlcd.txt
index 78bc24296f3e..7f78b455c4b2 100644
--- a/Documentation/devicetree/bindings/display/arm,hdlcd.txt
+++ b/Documentation/devicetree/bindings/display/arm,hdlcd.txt
@@ -8,9 +8,6 @@ digital encoder (DVI or HDMI).
 Required properties:
   - compatible: "arm,hdlcd"
   - reg: Physical base address and length of the controller's registers.
-  - interrupts: One interrupt used by the display controller to notify the
-    interrupt controller when any of the interrupt sources programmed in
-    the interrupt mask register have activated.
   - clocks: A list of phandle + clock-specifier pairs, one for each
     entry in 'clock-names'.
   - clock-names: A list of clock names. For HDLCD it should contain:
@@ -22,6 +19,9 @@ digital encoder (DVI or HDMI).
     Documentation/devicetree/bindings/graph.txt.
 
 Optional properties:
+  - interrupts: One interrupt used by the display controller to notify the
+    interrupt controller when any of the interrupt sources programmed in
+    the interrupt mask register have activated.
   - memory-region: phandle to a node describing memory (see
     Documentation/devicetree/bindings/reserved-memory/reserved-memory.txt) to be
     used for the framebuffer; if not present, the framebuffer may be located
diff --git a/drivers/gpu/drm/arm/hdlcd_drv.c b/drivers/gpu/drm/arm/hdlcd_drv.c
index d3da87fbd85a..283c435fe90b 100644
--- a/drivers/gpu/drm/arm/hdlcd_drv.c
+++ b/drivers/gpu/drm/arm/hdlcd_drv.c
@@ -36,7 +36,7 @@ static int hdlcd_load(struct drm_device *drm, unsigned long flags)
 	struct platform_device *pdev = to_platform_device(drm->dev);
 	struct resource *res;
 	u32 version;
-	int ret;
+	int ret, irq;
 
 	hdlcd->clk = devm_clk_get(drm->dev, "pxlclk");
 	if (IS_ERR(hdlcd->clk))
@@ -82,10 +82,13 @@ static int hdlcd_load(struct drm_device *drm, unsigned long flags)
 		goto setup_fail;
 	}
 
-	ret = drm_irq_install(drm, platform_get_irq(pdev, 0));
-	if (ret < 0) {
-		DRM_ERROR("failed to install IRQ handler\n");
-		goto irq_fail;
+	irq = platform_get_irq(pdev, 0);
+	if (irq > 0) {
+		ret = drm_irq_install(drm, irq);
+		if (ret < 0) {
+			DRM_ERROR("failed to install IRQ handler\n");
+			goto irq_fail;
+		}
 	}
 
 	return 0;
-- 
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2017-08-30 11:13 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-26 10:05 [PATCH] drm: hdlcd: allow HDLCD to be used without interrupt Russell King
2017-07-26 10:05 ` Russell King
     [not found] ` <E1daJCF-0003pG-DI-eh5Bv4kxaXIk46pC+1QYvQNdhmdF6hFW@public.gmane.org>
2017-07-26 10:27   ` Russell King - ARM Linux
2017-07-26 10:27     ` Russell King - ARM Linux
     [not found]     ` <20170726102748.GM31807-l+eeeJia6m9URfEZ8mYm6t73F7V6hmMc@public.gmane.org>
2017-07-28 15:23       ` Liviu Dudau
2017-07-28 15:23         ` Liviu Dudau
     [not found]         ` <20170728152311.GA970-A/Nd4k6kWRHZROr8t4l/smS4ubULX0JqMm0uRHvK7Nw@public.gmane.org>
2017-07-28 15:58           ` Russell King - ARM Linux
2017-07-28 15:58             ` Russell King - ARM Linux
     [not found]             ` <20170728155827.GV31807-l+eeeJia6m9URfEZ8mYm6t73F7V6hmMc@public.gmane.org>
2017-07-28 16:32               ` Liviu Dudau
2017-07-28 16:32                 ` Liviu Dudau
2017-08-29 13:33             ` Liviu Dudau
2017-08-29 13:33               ` Liviu Dudau
     [not found]               ` <20170829133351.GK10796-A/Nd4k6kWRHZROr8t4l/smS4ubULX0JqMm0uRHvK7Nw@public.gmane.org>
2017-08-29 16:48                 ` Russell King - ARM Linux
2017-08-29 16:48                   ` Russell King - ARM Linux
     [not found]                   ` <20170829164824.GH20805-l+eeeJia6m9URfEZ8mYm6t73F7V6hmMc@public.gmane.org>
2017-08-30 10:54                     ` Liviu Dudau
2017-08-30 10:54                       ` Liviu Dudau
     [not found]                       ` <20170830105414.GB1310-A/Nd4k6kWRHZROr8t4l/smS4ubULX0JqMm0uRHvK7Nw@public.gmane.org>
2017-08-30 11:13                         ` Russell King - ARM Linux
2017-08-30 11:13                           ` Russell King - ARM Linux
2017-08-10 12:15       ` Vladimir Murzin
2017-08-10 12:15         ` Vladimir Murzin
     [not found]         ` <e68186a4-2435-a969-7eff-21556d6a6b03-5wv7dgnIgG8@public.gmane.org>
2017-08-21 14:45           ` Vladimir Murzin
2017-08-21 14:45             ` Vladimir Murzin
     [not found]             ` <9cdccb9c-83c5-5867-06a5-3b344102d232-5wv7dgnIgG8@public.gmane.org>
2017-08-24 10:16               ` Liviu Dudau
2017-08-24 10:16                 ` Liviu Dudau
2017-08-03 18:55   ` Rob Herring
2017-08-03 18:55     ` Rob Herring

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.