Skip to content

Commit 3315764

Browse files
committed
Merge branches '3.19/omapdss' and '3.19/simplefb' into fbdev
Merge fbdev topic branches.
3 parents 3468562 + f3b7d0e + b14c992 commit 3315764

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+2352
-2111
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
Sunxi specific Simple Framebuffer bindings
2+
3+
This binding documents sunxi specific extensions to the simple-framebuffer
4+
bindings. The sunxi simplefb u-boot code relies on the devicetree containing
5+
pre-populated simplefb nodes.
6+
7+
These extensions are intended so that u-boot can select the right node based
8+
on which pipeline is being used. As such they are solely intended for
9+
firmware / bootloader use, and the OS should ignore them.
10+
11+
Required properties:
12+
- compatible: "allwinner,simple-framebuffer"
13+
- allwinner,pipeline, one of:
14+
"de_be0-lcd0"
15+
"de_be1-lcd1"
16+
"de_be0-lcd0-hdmi"
17+
"de_be1-lcd1-hdmi"
18+
19+
Example:
20+
21+
chosen {
22+
#address-cells = <1>;
23+
#size-cells = <1>;
24+
ranges;
25+
26+
framebuffer@0 {
27+
compatible = "allwinner,simple-framebuffer", "simple-framebuffer";
28+
allwinner,pipeline = "de_be0-lcd0-hdmi";
29+
clocks = <&pll5 1>, <&ahb_gates 36>, <&ahb_gates 43>,
30+
<&ahb_gates 44>;
31+
status = "disabled";
32+
};
33+
};
Lines changed: 64 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,40 @@
11
Simple Framebuffer
22

3-
A simple frame-buffer describes a raw memory region that may be rendered to,
4-
with the assumption that the display hardware has already been set up to scan
5-
out from that buffer.
3+
A simple frame-buffer describes a frame-buffer setup by firmware or
4+
the bootloader, with the assumption that the display hardware has already
5+
been set up to scan out from the memory pointed to by the reg property.
6+
7+
Since simplefb nodes represent runtime information they must be sub-nodes of
8+
the chosen node (*). Simplefb nodes must be named "framebuffer@<address>".
9+
10+
If the devicetree contains nodes for the display hardware used by a simplefb,
11+
then the simplefb node must contain a property called "display", which
12+
contains a phandle pointing to the primary display hw node, so that the OS
13+
knows which simplefb to disable when handing over control to a driver for the
14+
real hardware. The bindings for the hw nodes must specify which node is
15+
considered the primary node.
16+
17+
It is advised to add display# aliases to help the OS determine how to number
18+
things. If display# aliases are used, then if the simplefb node contains a
19+
"display" property then the /aliases/display# path must point to the display
20+
hw node the "display" property points to, otherwise it must point directly
21+
to the simplefb node.
22+
23+
If a simplefb node represents the preferred console for user interaction,
24+
then the chosen node's stdout-path property should point to it, or to the
25+
primary display hw node, as with display# aliases. If display aliases are
26+
used then it should be set to the alias instead.
27+
28+
It is advised that devicetree files contain pre-filled, disabled framebuffer
29+
nodes, so that the firmware only needs to update the mode information and
30+
enable them. This way if e.g. later on support for more display clocks get
31+
added, the simplefb nodes will already contain this info and the firmware
32+
does not need to be updated.
33+
34+
If pre-filled framebuffer nodes are used, the firmware may need extra
35+
information to find the right node. In that case an extra platform specific
36+
compatible and platform specific properties should be used and documented,
37+
see e.g. simple-framebuffer-sunxi.txt .
638

739
Required properties:
840
- compatible: "simple-framebuffer"
@@ -14,13 +46,41 @@ Required properties:
1446
- r5g6b5 (16-bit pixels, d[15:11]=r, d[10:5]=g, d[4:0]=b).
1547
- a8b8g8r8 (32-bit pixels, d[31:24]=a, d[23:16]=b, d[15:8]=g, d[7:0]=r).
1648

49+
Optional properties:
50+
- clocks : List of clocks used by the framebuffer. Clocks listed here
51+
are expected to already be configured correctly. The OS must
52+
ensure these clocks are not modified or disabled while the
53+
simple framebuffer remains active.
54+
- display : phandle pointing to the primary display hardware node
55+
1756
Example:
1857

19-
framebuffer {
58+
aliases {
59+
display0 = &lcdc0;
60+
}
61+
62+
chosen {
63+
framebuffer0: framebuffer@1d385000 {
2064
compatible = "simple-framebuffer";
2165
reg = <0x1d385000 (1600 * 1200 * 2)>;
2266
width = <1600>;
2367
height = <1200>;
2468
stride = <(1600 * 2)>;
2569
format = "r5g6b5";
70+
clocks = <&ahb_gates 36>, <&ahb_gates 43>, <&ahb_gates 44>;
71+
display = <&lcdc0>;
72+
};
73+
stdout-path = "display0";
74+
};
75+
76+
soc@01c00000 {
77+
lcdc0: lcdc@1c0c000 {
78+
compatible = "allwinner,sun4i-a10-lcdc";
79+
...
2680
};
81+
};
82+
83+
84+
*) Older devicetree files may have a compatible = "simple-framebuffer" node
85+
in a different place, operating systems must first enumerate any compatible
86+
nodes found under chosen and then check for other compatible nodes.

MAINTAINERS

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8442,6 +8442,14 @@ F: drivers/media/usb/siano/
84428442
F: drivers/media/usb/siano/
84438443
F: drivers/media/mmc/siano/
84448444

8445+
SIMPLEFB FB DRIVER
8446+
M: Hans de Goede <[email protected]>
8447+
8448+
S: Maintained
8449+
F: Documentation/devicetree/bindings/video/simple-framebuffer.txt
8450+
F: drivers/video/fbdev/simplefb.c
8451+
F: include/linux/platform_data/simplefb.h
8452+
84458453
SH_VEU V4L2 MEM2MEM DRIVER
84468454
84478455
S: Orphan

drivers/video/console/fbcon.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3624,7 +3624,7 @@ static int __init fb_console_init(void)
36243624
return 0;
36253625
}
36263626

3627-
module_init(fb_console_init);
3627+
fs_initcall(fb_console_init);
36283628

36293629
#ifdef MODULE
36303630

drivers/video/fbdev/omap2/displays-new/connector-hdmi.c

Lines changed: 0 additions & 99 deletions
Original file line numberDiff line numberDiff line change
@@ -170,98 +170,6 @@ static bool hdmic_detect(struct omap_dss_device *dssdev)
170170
return in->ops.hdmi->detect(in);
171171
}
172172

173-
static int hdmic_audio_enable(struct omap_dss_device *dssdev)
174-
{
175-
struct panel_drv_data *ddata = to_panel_data(dssdev);
176-
struct omap_dss_device *in = ddata->in;
177-
int r;
178-
179-
/* enable audio only if the display is active */
180-
if (!omapdss_device_is_enabled(dssdev))
181-
return -EPERM;
182-
183-
r = in->ops.hdmi->audio_enable(in);
184-
if (r)
185-
return r;
186-
187-
dssdev->audio_state = OMAP_DSS_AUDIO_ENABLED;
188-
189-
return 0;
190-
}
191-
192-
static void hdmic_audio_disable(struct omap_dss_device *dssdev)
193-
{
194-
struct panel_drv_data *ddata = to_panel_data(dssdev);
195-
struct omap_dss_device *in = ddata->in;
196-
197-
in->ops.hdmi->audio_disable(in);
198-
199-
dssdev->audio_state = OMAP_DSS_AUDIO_DISABLED;
200-
}
201-
202-
static int hdmic_audio_start(struct omap_dss_device *dssdev)
203-
{
204-
struct panel_drv_data *ddata = to_panel_data(dssdev);
205-
struct omap_dss_device *in = ddata->in;
206-
int r;
207-
208-
/*
209-
* No need to check the panel state. It was checked when trasitioning
210-
* to AUDIO_ENABLED.
211-
*/
212-
if (dssdev->audio_state != OMAP_DSS_AUDIO_ENABLED)
213-
return -EPERM;
214-
215-
r = in->ops.hdmi->audio_start(in);
216-
if (r)
217-
return r;
218-
219-
dssdev->audio_state = OMAP_DSS_AUDIO_PLAYING;
220-
221-
return 0;
222-
}
223-
224-
static void hdmic_audio_stop(struct omap_dss_device *dssdev)
225-
{
226-
struct panel_drv_data *ddata = to_panel_data(dssdev);
227-
struct omap_dss_device *in = ddata->in;
228-
229-
in->ops.hdmi->audio_stop(in);
230-
231-
dssdev->audio_state = OMAP_DSS_AUDIO_ENABLED;
232-
}
233-
234-
static bool hdmic_audio_supported(struct omap_dss_device *dssdev)
235-
{
236-
struct panel_drv_data *ddata = to_panel_data(dssdev);
237-
struct omap_dss_device *in = ddata->in;
238-
239-
if (!omapdss_device_is_enabled(dssdev))
240-
return false;
241-
242-
return in->ops.hdmi->audio_supported(in);
243-
}
244-
245-
static int hdmic_audio_config(struct omap_dss_device *dssdev,
246-
struct omap_dss_audio *audio)
247-
{
248-
struct panel_drv_data *ddata = to_panel_data(dssdev);
249-
struct omap_dss_device *in = ddata->in;
250-
int r;
251-
252-
/* config audio only if the display is active */
253-
if (!omapdss_device_is_enabled(dssdev))
254-
return -EPERM;
255-
256-
r = in->ops.hdmi->audio_config(in, audio);
257-
if (r)
258-
return r;
259-
260-
dssdev->audio_state = OMAP_DSS_AUDIO_CONFIGURED;
261-
262-
return 0;
263-
}
264-
265173
static int hdmic_set_hdmi_mode(struct omap_dss_device *dssdev, bool hdmi_mode)
266174
{
267175
struct panel_drv_data *ddata = to_panel_data(dssdev);
@@ -296,13 +204,6 @@ static struct omap_dss_driver hdmic_driver = {
296204
.detect = hdmic_detect,
297205
.set_hdmi_mode = hdmic_set_hdmi_mode,
298206
.set_hdmi_infoframe = hdmic_set_infoframe,
299-
300-
.audio_enable = hdmic_audio_enable,
301-
.audio_disable = hdmic_audio_disable,
302-
.audio_start = hdmic_audio_start,
303-
.audio_stop = hdmic_audio_stop,
304-
.audio_supported = hdmic_audio_supported,
305-
.audio_config = hdmic_audio_config,
306207
};
307208

308209
static int hdmic_probe_pdata(struct platform_device *pdev)

drivers/video/fbdev/omap2/displays-new/encoder-tfp410.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,7 @@ static int tfp410_probe(struct platform_device *pdev)
249249
dssdev->output_type = OMAP_DISPLAY_TYPE_DVI;
250250
dssdev->owner = THIS_MODULE;
251251
dssdev->phy.dpi.data_lines = ddata->data_lines;
252+
dssdev->port_num = 1;
252253

253254
r = omapdss_register_output(dssdev);
254255
if (r) {

drivers/video/fbdev/omap2/displays-new/encoder-tpd12s015.c

Lines changed: 1 addition & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -193,55 +193,6 @@ static bool tpd_detect(struct omap_dss_device *dssdev)
193193
return gpio_get_value_cansleep(ddata->hpd_gpio);
194194
}
195195

196-
static int tpd_audio_enable(struct omap_dss_device *dssdev)
197-
{
198-
struct panel_drv_data *ddata = to_panel_data(dssdev);
199-
struct omap_dss_device *in = ddata->in;
200-
201-
return in->ops.hdmi->audio_enable(in);
202-
}
203-
204-
static void tpd_audio_disable(struct omap_dss_device *dssdev)
205-
{
206-
struct panel_drv_data *ddata = to_panel_data(dssdev);
207-
struct omap_dss_device *in = ddata->in;
208-
209-
in->ops.hdmi->audio_disable(in);
210-
}
211-
212-
static int tpd_audio_start(struct omap_dss_device *dssdev)
213-
{
214-
struct panel_drv_data *ddata = to_panel_data(dssdev);
215-
struct omap_dss_device *in = ddata->in;
216-
217-
return in->ops.hdmi->audio_start(in);
218-
}
219-
220-
static void tpd_audio_stop(struct omap_dss_device *dssdev)
221-
{
222-
struct panel_drv_data *ddata = to_panel_data(dssdev);
223-
struct omap_dss_device *in = ddata->in;
224-
225-
in->ops.hdmi->audio_stop(in);
226-
}
227-
228-
static bool tpd_audio_supported(struct omap_dss_device *dssdev)
229-
{
230-
struct panel_drv_data *ddata = to_panel_data(dssdev);
231-
struct omap_dss_device *in = ddata->in;
232-
233-
return in->ops.hdmi->audio_supported(in);
234-
}
235-
236-
static int tpd_audio_config(struct omap_dss_device *dssdev,
237-
struct omap_dss_audio *audio)
238-
{
239-
struct panel_drv_data *ddata = to_panel_data(dssdev);
240-
struct omap_dss_device *in = ddata->in;
241-
242-
return in->ops.hdmi->audio_config(in, audio);
243-
}
244-
245196
static int tpd_set_infoframe(struct omap_dss_device *dssdev,
246197
const struct hdmi_avi_infoframe *avi)
247198
{
@@ -275,13 +226,6 @@ static const struct omapdss_hdmi_ops tpd_hdmi_ops = {
275226
.detect = tpd_detect,
276227
.set_infoframe = tpd_set_infoframe,
277228
.set_hdmi_mode = tpd_set_hdmi_mode,
278-
279-
.audio_enable = tpd_audio_enable,
280-
.audio_disable = tpd_audio_disable,
281-
.audio_start = tpd_audio_start,
282-
.audio_stop = tpd_audio_stop,
283-
.audio_supported = tpd_audio_supported,
284-
.audio_config = tpd_audio_config,
285229
};
286230

287231
static int tpd_probe_pdata(struct platform_device *pdev)
@@ -409,6 +353,7 @@ static int tpd_probe(struct platform_device *pdev)
409353
dssdev->type = OMAP_DISPLAY_TYPE_HDMI;
410354
dssdev->output_type = OMAP_DISPLAY_TYPE_HDMI;
411355
dssdev->owner = THIS_MODULE;
356+
dssdev->port_num = 1;
412357

413358
in = ddata->in;
414359

drivers/video/fbdev/omap2/dss/Kconfig

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,6 @@ config OMAP4_DSS_HDMI
7474
help
7575
HDMI support for OMAP4 based SoCs.
7676

77-
config OMAP4_DSS_HDMI_AUDIO
78-
bool
79-
8077
config OMAP5_DSS_HDMI
8178
bool "HDMI support for OMAP5"
8279
default n
@@ -86,10 +83,6 @@ config OMAP5_DSS_HDMI
8683
Definition Multimedia Interface. See http://www.hdmi.org/ for HDMI
8784
specification.
8885

89-
config OMAP5_DSS_HDMI_AUDIO
90-
depends on OMAP5_DSS_HDMI
91-
bool
92-
9386
config OMAP2_DSS_SDI
9487
bool "SDI support"
9588
default n

drivers/video/fbdev/omap2/dss/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ obj-$(CONFIG_OMAP2_DSS_INIT) += omapdss-boot-init.o
22
obj-$(CONFIG_OMAP2_DSS) += omapdss.o
33
# Core DSS files
44
omapdss-y := core.o dss.o dss_features.o dispc.o dispc_coefs.o display.o \
5-
output.o dss-of.o
5+
output.o dss-of.o pll.o
66
# DSS compat layer files
77
omapdss-y += manager.o manager-sysfs.o overlay.o overlay-sysfs.o apply.o \
88
dispc-compat.o display-sysfs.o

0 commit comments

Comments
 (0)