Skip to content

Commit 413fd0e

Browse files
committed
Merge tag 'fbdev-3.19' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux
Pull fbdev updates from Tomi Valkeinen: - support for mx6sl and mx6sx - OMAP HDMI audio rewrite to make it finally work - OMAP video PLL work to prepare for new DRA7xx SoCs - simplefb DT related improvements * tag 'fbdev-3.19' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux: (81 commits) video: uvesafb: Deletion of an unnecessary check before the function call "platform_device_put" video: fbdev-VIA: Deletion of an unnecessary check before the function call "framebuffer_release" video: fbdev-MMP: Deletion of an unnecessary check before the function call "mmp_unregister_path" video: mx3fb: Deletion of an unnecessary check before the function call "backlight_device_unregister" video: fbdev-OMAP2: Deletion of unnecessary checks before the function call "i2c_put_adapter" video: fbdev-SIS: Deletion of unnecessary checks before the function call "pci_dev_put" video: smscufx: Deletion of unnecessary checks before the function call "vfree" video: udlfb: Deletion of unnecessary checks before the function call "vfree" video: uvesafb: Deletion of an unnecessary check before the function call "uvesafb_free" video: fbdev-LCDC: Deletion of an unnecessary check before the function call "vfree" video: fbdev: arkfb: suppress build warning video: fbdev: s3fb: suppress build warning video: fbdev: vt8623fb: suppress build warning OMAPDSS: hdmi5: Fix bit field for IEC958_AES2_CON_SOURCE OMAPDSS: hdmi: Remove __exit qualifier from hdmi_uninit_output() OMAPDSS: hdmi5: Change hdmi_wp idlemode to to no_idle for audio playback OMAPDSS: Remove all references to obsolete HDMI audio callbacks ASoC: omap: Remove obsolete HDMI audio code and Kconfig options OMAPDSS: hdmi5: Register ASoC platform device for omap hdmi audio OMAPDSS: hdmi5: Remove callbacks for the old ASoC DAI driver ...
2 parents 6b9e2ce + 3315764 commit 413fd0e

Some content is hidden

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

58 files changed

+2398
-2156
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
@@ -8586,6 +8586,14 @@ F: drivers/media/usb/siano/
85868586
F: drivers/media/usb/siano/
85878587
F: drivers/media/mmc/siano/
85888588

8589+
SIMPLEFB FB DRIVER
8590+
M: Hans de Goede <[email protected]>
8591+
8592+
S: Maintained
8593+
F: Documentation/devicetree/bindings/video/simple-framebuffer.txt
8594+
F: drivers/video/fbdev/simplefb.c
8595+
F: include/linux/platform_data/simplefb.h
8596+
85898597
SH_VEU V4L2 MEM2MEM DRIVER
85908598
85918599
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/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2408,7 +2408,7 @@ config FB_JZ4740
24082408

24092409
config FB_MXS
24102410
tristate "MXS LCD framebuffer support"
2411-
depends on FB && ARCH_MXS
2411+
depends on FB && (ARCH_MXS || ARCH_MXC)
24122412
select FB_CFB_FILLRECT
24132413
select FB_CFB_COPYAREA
24142414
select FB_CFB_IMAGEBLIT

drivers/video/fbdev/amba-clcd.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
#include <linux/bitops.h>
2828
#include <linux/clk.h>
2929
#include <linux/hardirq.h>
30-
#include <linux/dma-mapping.h>
3130
#include <linux/of.h>
3231
#include <linux/of_address.h>
3332
#include <linux/of_graph.h>

drivers/video/fbdev/arkfb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1016,7 +1016,7 @@ static int ark_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
10161016

10171017
pcibios_bus_to_resource(dev->bus, &vga_res, &bus_reg);
10181018

1019-
par->state.vgabase = (void __iomem *) vga_res.start;
1019+
par->state.vgabase = (void __iomem *) (unsigned long) vga_res.start;
10201020

10211021
/* FIXME get memsize */
10221022
regval = vga_rseq(par->state.vgabase, 0x10);

drivers/video/fbdev/mmp/core.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -223,10 +223,10 @@ struct mmp_path *mmp_register_path(struct mmp_path_info *info)
223223
EXPORT_SYMBOL_GPL(mmp_register_path);
224224

225225
/*
226-
* mmp_unregister_path - unregister and destory path
227-
* @p: path to be destoried.
226+
* mmp_unregister_path - unregister and destroy path
227+
* @p: path to be destroyed.
228228
*
229-
* this function registers path and destorys it.
229+
* this function registers path and destroys it.
230230
*/
231231
void mmp_unregister_path(struct mmp_path *path)
232232
{

drivers/video/fbdev/mmp/hw/mmp_ctrl.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -441,8 +441,7 @@ static void path_deinit(struct mmphw_path_plat *path_plat)
441441
if (!path_plat)
442442
return;
443443

444-
if (path_plat->path)
445-
mmp_unregister_path(path_plat->path);
444+
mmp_unregister_path(path_plat->path);
446445
}
447446

448447
static int mmphw_probe(struct platform_device *pdev)

drivers/video/fbdev/mx3fb.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -334,8 +334,7 @@ static void mx3fb_init_backlight(struct mx3fb_data *fbd)
334334

335335
static void mx3fb_exit_backlight(struct mx3fb_data *fbd)
336336
{
337-
if (fbd->bl)
338-
backlight_device_unregister(fbd->bl);
337+
backlight_device_unregister(fbd->bl);
339338
}
340339

341340
static void mx3fb_dma_done(void *);

drivers/video/fbdev/mxsfb.c

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,8 @@ struct mxsfb_info {
172172
struct fb_info fb_info;
173173
struct platform_device *pdev;
174174
struct clk *clk;
175+
struct clk *clk_axi;
176+
struct clk *clk_disp_axi;
175177
void __iomem *base; /* registers */
176178
unsigned allocated_size;
177179
int enabled;
@@ -331,6 +333,11 @@ static void mxsfb_enable_controller(struct fb_info *fb_info)
331333
}
332334
}
333335

336+
if (host->clk_axi)
337+
clk_prepare_enable(host->clk_axi);
338+
339+
if (host->clk_disp_axi)
340+
clk_prepare_enable(host->clk_disp_axi);
334341
clk_prepare_enable(host->clk);
335342
clk_set_rate(host->clk, PICOS2KHZ(fb_info->var.pixclock) * 1000U);
336343

@@ -374,6 +381,10 @@ static void mxsfb_disable_controller(struct fb_info *fb_info)
374381
writel(reg & ~VDCTRL4_SYNC_SIGNALS_ON, host->base + LCDC_VDCTRL4);
375382

376383
clk_disable_unprepare(host->clk);
384+
if (host->clk_disp_axi)
385+
clk_disable_unprepare(host->clk_disp_axi);
386+
if (host->clk_axi)
387+
clk_disable_unprepare(host->clk_axi);
377388

378389
host->enabled = 0;
379390

@@ -867,6 +878,14 @@ static int mxsfb_probe(struct platform_device *pdev)
867878
goto fb_release;
868879
}
869880

881+
host->clk_axi = devm_clk_get(&host->pdev->dev, "axi");
882+
if (IS_ERR(host->clk_axi))
883+
host->clk_axi = NULL;
884+
885+
host->clk_disp_axi = devm_clk_get(&host->pdev->dev, "disp_axi");
886+
if (IS_ERR(host->clk_disp_axi))
887+
host->clk_disp_axi = NULL;
888+
870889
host->reg_lcd = devm_regulator_get(&pdev->dev, "lcd");
871890
if (IS_ERR(host->reg_lcd))
872891
host->reg_lcd = NULL;

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

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -262,8 +262,7 @@ static int dvic_probe_pdata(struct platform_device *pdev)
262262

263263
in = omap_dss_find_output(pdata->source);
264264
if (in == NULL) {
265-
if (ddata->i2c_adapter)
266-
i2c_put_adapter(ddata->i2c_adapter);
265+
i2c_put_adapter(ddata->i2c_adapter);
267266

268267
dev_err(&pdev->dev, "Failed to find video source\n");
269268
return -EPROBE_DEFER;
@@ -352,8 +351,7 @@ static int dvic_probe(struct platform_device *pdev)
352351
err_reg:
353352
omap_dss_put_device(ddata->in);
354353

355-
if (ddata->i2c_adapter)
356-
i2c_put_adapter(ddata->i2c_adapter);
354+
i2c_put_adapter(ddata->i2c_adapter);
357355

358356
return r;
359357
}
@@ -371,8 +369,7 @@ static int __exit dvic_remove(struct platform_device *pdev)
371369

372370
omap_dss_put_device(in);
373371

374-
if (ddata->i2c_adapter)
375-
i2c_put_adapter(ddata->i2c_adapter);
372+
i2c_put_adapter(ddata->i2c_adapter);
376373

377374
return 0;
378375
}

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)

0 commit comments

Comments
 (0)