Skip to content

Commit e1e50e1

Browse files
committed
Merge tag 'imx-drm-fixes-2015-07-14' of git://git.pengutronix.de/git/pza/linux into drm-fixes
imx-drm: fixes for parallel-display, imx-tve, and ipu-common These patches fix the parallel-display driver to use the standard OF graph bindings for connecting a drm_panel via device tree instead of an undocumented, driver specific device tree property, take care to disable all IPU interrupts before setting up the irq chip to fix a kexec lockup, and fix VGA output on i.MX53-QSB boards by correcting the media bus format set by the imx-tve driver. * tag 'imx-drm-fixes-2015-07-14' of git://git.pengutronix.de/git/pza/linux: drm/imx: tve: fix media bus format for VGA output GPU: ipu: fix lockup caused by pending chained interrupts drm/imx: parallel-display: fix drm_panel support
2 parents 8f6644c + c03e9a3 commit e1e50e1

File tree

4 files changed

+43
-9
lines changed

4 files changed

+43
-9
lines changed

Documentation/devicetree/bindings/drm/imx/fsl-imx-drm.txt

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,10 @@ Optional properties:
6565
- edid: verbatim EDID data block describing attached display.
6666
- ddc: phandle describing the i2c bus handling the display data
6767
channel
68-
- port: A port node with endpoint definitions as defined in
68+
- port@[0-1]: Port nodes with endpoint definitions as defined in
6969
Documentation/devicetree/bindings/media/video-interfaces.txt.
70+
Port 0 is the input port connected to the IPU display interface,
71+
port 1 is the output port connected to a panel.
7072

7173
example:
7274

@@ -75,9 +77,29 @@ display@di0 {
7577
edid = [edid-data];
7678
interface-pix-fmt = "rgb24";
7779

78-
port {
80+
port@0 {
81+
reg = <0>;
82+
7983
display_in: endpoint {
8084
remote-endpoint = <&ipu_di0_disp0>;
8185
};
8286
};
87+
88+
port@1 {
89+
reg = <1>;
90+
91+
display_out: endpoint {
92+
remote-endpoint = <&panel_in>;
93+
};
94+
};
95+
};
96+
97+
panel {
98+
...
99+
100+
port {
101+
panel_in: endpoint {
102+
remote-endpoint = <&display_out>;
103+
};
104+
};
83105
};

drivers/gpu/drm/imx/imx-tve.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ static void imx_tve_encoder_prepare(struct drm_encoder *encoder)
301301

302302
switch (tve->mode) {
303303
case TVE_MODE_VGA:
304-
imx_drm_set_bus_format_pins(encoder, MEDIA_BUS_FMT_YUV8_1X24,
304+
imx_drm_set_bus_format_pins(encoder, MEDIA_BUS_FMT_GBR888_1X24,
305305
tve->hsync_pin, tve->vsync_pin);
306306
break;
307307
case TVE_MODE_TVOUT:

drivers/gpu/drm/imx/parallel-display.c

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
#include <drm/drm_panel.h>
2222
#include <linux/videodev2.h>
2323
#include <video/of_display_timing.h>
24+
#include <linux/of_graph.h>
2425

2526
#include "imx-drm.h"
2627

@@ -208,7 +209,7 @@ static int imx_pd_bind(struct device *dev, struct device *master, void *data)
208209
{
209210
struct drm_device *drm = data;
210211
struct device_node *np = dev->of_node;
211-
struct device_node *panel_node;
212+
struct device_node *port;
212213
const u8 *edidp;
213214
struct imx_parallel_display *imxpd;
214215
int ret;
@@ -234,11 +235,19 @@ static int imx_pd_bind(struct device *dev, struct device *master, void *data)
234235
imxpd->bus_format = MEDIA_BUS_FMT_RGB666_1X24_CPADHI;
235236
}
236237

237-
panel_node = of_parse_phandle(np, "fsl,panel", 0);
238-
if (panel_node) {
239-
imxpd->panel = of_drm_find_panel(panel_node);
240-
if (!imxpd->panel)
241-
return -EPROBE_DEFER;
238+
/* port@1 is the output port */
239+
port = of_graph_get_port_by_id(np, 1);
240+
if (port) {
241+
struct device_node *endpoint, *remote;
242+
243+
endpoint = of_get_child_by_name(port, "endpoint");
244+
if (endpoint) {
245+
remote = of_graph_get_remote_port_parent(endpoint);
246+
if (remote)
247+
imxpd->panel = of_drm_find_panel(remote);
248+
if (!imxpd->panel)
249+
return -EPROBE_DEFER;
250+
}
242251
}
243252

244253
imxpd->dev = dev;

drivers/gpu/ipu-v3/ipu-common.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1107,6 +1107,9 @@ static int ipu_irq_init(struct ipu_soc *ipu)
11071107
return ret;
11081108
}
11091109

1110+
for (i = 0; i < IPU_NUM_IRQS; i += 32)
1111+
ipu_cm_write(ipu, 0, IPU_INT_CTRL(i / 32));
1112+
11101113
for (i = 0; i < IPU_NUM_IRQS; i += 32) {
11111114
gc = irq_get_domain_generic_chip(ipu->domain, i);
11121115
gc->reg_base = ipu->cm_reg;

0 commit comments

Comments
 (0)