Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 377214
b: refs/heads/master
c: f757731
h: refs/heads/master
v: v3
  • Loading branch information
David Daney authored and Tony Luck committed Jun 17, 2013
1 parent 335d1e3 commit b0a81f7
Show file tree
Hide file tree
Showing 51 changed files with 224 additions and 318 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4c3577c58f7efcddeaa269e7ddbe75e8acfbb7de
refs/heads/master: f75773103d24faaa75323597c2804edfb4a48a52
35 changes: 13 additions & 22 deletions trunk/Documentation/DocBook/media/v4l/dev-codec.xml
Original file line number Diff line number Diff line change
@@ -1,27 +1,18 @@
<title>Codec Interface</title>

<para>A V4L2 codec can compress, decompress, transform, or otherwise
convert video data from one format into another format, in memory. Typically
such devices are memory-to-memory devices (i.e. devices with the
<constant>V4L2_CAP_VIDEO_M2M</constant> or <constant>V4L2_CAP_VIDEO_M2M_MPLANE</constant>
capability set).
</para>
<note>
<title>Suspended</title>

<para>A memory-to-memory video node acts just like a normal video node, but it
supports both output (sending frames from memory to the codec hardware) and
capture (receiving the processed frames from the codec hardware into memory)
stream I/O. An application will have to setup the stream
I/O for both sides and finally call &VIDIOC-STREAMON; for both capture and output
to start the codec.</para>
<para>This interface has been be suspended from the V4L2 API
implemented in Linux 2.6 until we have more experience with codec
device interfaces.</para>
</note>

<para>Video compression codecs use the MPEG controls to setup their codec parameters
(note that the MPEG controls actually support many more codecs than just MPEG).
See <xref linkend="mpeg-controls"></xref>.</para>
<para>A V4L2 codec can compress, decompress, transform, or otherwise
convert video data from one format into another format, in memory.
Applications send data to be converted to the driver through a
&func-write; call, and receive the converted data through a
&func-read; call. For efficiency a driver may also support streaming
I/O.</para>

<para>Memory-to-memory devices can often be used as a shared resource: you can
open the video node multiple times, each application setting up their own codec properties
that are local to the file handle, and each can use it independently from the others.
The driver will arbitrate access to the codec and reprogram it whenever another file
handler gets access. This is different from the usual video node behavior where the video properties
are global to the device (i.e. changing something through one file handle is visible
through another file handle).</para>
<para>[to do]</para>
2 changes: 1 addition & 1 deletion trunk/Documentation/DocBook/media/v4l/v4l2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ and discussions on the V4L mailing list.</revremark>
</partinfo>

<title>Video for Linux Two API Specification</title>
<subtitle>Revision 3.10</subtitle>
<subtitle>Revision 3.9</subtitle>

<chapter id="common">
&sub-common;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Exynos4x12/Exynos5 SoC series camera host interface (FIMC-LITE)

Required properties:

- compatible : should be "samsung,exynos4212-fimc-lite" for Exynos4212 and
- compatible : should be "samsung,exynos4212-fimc" for Exynos4212 and
Exynos4412 SoCs;
- reg : physical base address and size of the device memory mapped
registers;
Expand Down
3 changes: 0 additions & 3 deletions trunk/Documentation/sound/alsa/HD-Audio-Models.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ ALC269/270/275/276/280/282
alc271-dmic Enable ALC271X digital mic workaround
inv-dmic Inverted internal mic workaround
lenovo-dock Enables docking station I/O for some Lenovos
dell-headset-multi Headset jack, which can also be used as mic-in
dell-headset-dock Headset jack (without mic-in), and also dock I/O

ALC662/663/272
==============
Expand All @@ -44,7 +42,6 @@ ALC662/663/272
asus-mode7 ASUS
asus-mode8 ASUS
inv-dmic Inverted internal mic workaround
dell-headset-multi Headset jack, which can also be used as mic-in

ALC680
======
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/ia64/include/asm/irqflags.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#define _ASM_IA64_IRQFLAGS_H

#include <asm/pal.h>
#include <asm/kregs.h>

#ifdef CONFIG_IA64_DEBUG_IRQ
extern unsigned long last_cli_ip;
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/clk/clk.c
Original file line number Diff line number Diff line change
Expand Up @@ -1955,7 +1955,6 @@ int clk_notifier_unregister(struct clk *clk, struct notifier_block *nb)
/* XXX the notifier code should handle this better */
if (!cn->notifier_head.head) {
srcu_cleanup_notifier_head(&cn->notifier_head);
list_del(&cn->node);
kfree(cn);
}

Expand Down
10 changes: 5 additions & 5 deletions trunk/drivers/clk/samsung/clk-exynos5250.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ static __initdata unsigned long exynos5250_clk_regs[] = {

/* list of all parent clock list */
PNAME(mout_apll_p) = { "fin_pll", "fout_apll", };
PNAME(mout_cpu_p) = { "mout_apll", "sclk_mpll", };
PNAME(mout_cpu_p) = { "mout_apll", "mout_mpll", };
PNAME(mout_mpll_fout_p) = { "fout_mplldiv2", "fout_mpll" };
PNAME(mout_mpll_p) = { "fin_pll", "mout_mpll_fout" };
PNAME(mout_bpll_fout_p) = { "fout_bplldiv2", "fout_bpll" };
Expand Down Expand Up @@ -208,10 +208,10 @@ struct samsung_fixed_factor_clock exynos5250_fixed_factor_clks[] __initdata = {
};

struct samsung_mux_clock exynos5250_mux_clks[] __initdata = {
MUX_A(none, "mout_apll", mout_apll_p, SRC_CPU, 0, 1, "mout_apll"),
MUX_A(none, "mout_cpu", mout_cpu_p, SRC_CPU, 16, 1, "mout_cpu"),
MUX(none, "mout_apll", mout_apll_p, SRC_CPU, 0, 1),
MUX(none, "mout_cpu", mout_cpu_p, SRC_CPU, 16, 1),
MUX(none, "mout_mpll_fout", mout_mpll_fout_p, PLL_DIV2_SEL, 4, 1),
MUX_A(none, "sclk_mpll", mout_mpll_p, SRC_CORE1, 8, 1, "mout_mpll"),
MUX(none, "sclk_mpll", mout_mpll_p, SRC_CORE1, 8, 1),
MUX(none, "mout_bpll_fout", mout_bpll_fout_p, PLL_DIV2_SEL, 0, 1),
MUX(none, "sclk_bpll", mout_bpll_p, SRC_CDREX, 0, 1),
MUX(none, "mout_vpllsrc", mout_vpllsrc_p, SRC_TOP2, 0, 1),
Expand Down Expand Up @@ -378,7 +378,7 @@ struct samsung_gate_clock exynos5250_gate_clks[] __initdata = {
GATE(hsi2c3, "hsi2c3", "aclk66", GATE_IP_PERIC, 31, 0, 0),
GATE(chipid, "chipid", "aclk66", GATE_IP_PERIS, 0, 0, 0),
GATE(sysreg, "sysreg", "aclk66", GATE_IP_PERIS, 1, 0, 0),
GATE(pmu, "pmu", "aclk66", GATE_IP_PERIS, 2, CLK_IGNORE_UNUSED, 0),
GATE(pmu, "pmu", "aclk66", GATE_IP_PERIS, 2, 0, 0),
GATE(tzpc0, "tzpc0", "aclk66", GATE_IP_PERIS, 6, 0, 0),
GATE(tzpc1, "tzpc1", "aclk66", GATE_IP_PERIS, 7, 0, 0),
GATE(tzpc2, "tzpc2", "aclk66", GATE_IP_PERIS, 8, 0, 0),
Expand Down
5 changes: 2 additions & 3 deletions trunk/drivers/clk/samsung/clk-pll.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,16 +111,15 @@ static unsigned long samsung_pll36xx_recalc_rate(struct clk_hw *hw,
unsigned long parent_rate)
{
struct samsung_clk_pll36xx *pll = to_clk_pll36xx(hw);
u32 mdiv, pdiv, sdiv, pll_con0, pll_con1;
s16 kdiv;
u32 mdiv, pdiv, sdiv, kdiv, pll_con0, pll_con1;
u64 fvco = parent_rate;

pll_con0 = __raw_readl(pll->con_reg);
pll_con1 = __raw_readl(pll->con_reg + 4);
mdiv = (pll_con0 >> PLL36XX_MDIV_SHIFT) & PLL36XX_MDIV_MASK;
pdiv = (pll_con0 >> PLL36XX_PDIV_SHIFT) & PLL36XX_PDIV_MASK;
sdiv = (pll_con0 >> PLL36XX_SDIV_SHIFT) & PLL36XX_SDIV_MASK;
kdiv = (s16)(pll_con1 & PLL36XX_KDIV_MASK);
kdiv = pll_con1 & PLL36XX_KDIV_MASK;

fvco *= (mdiv << 16) + kdiv;
do_div(fvco, (pdiv << sdiv));
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/clk/spear/spear3xx_clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ static void __init spear320_clk_init(void __iomem *soc_config_base)
clk_register_clkdev(clk, NULL, "60100000.serial");
}
#else
static inline void spear320_clk_init(void __iomem *soc_config_base) { }
static inline void spear320_clk_init(void) { }
#endif

void __init spear3xx_clk_init(void __iomem *misc_base, void __iomem *soc_config_base)
Expand Down
11 changes: 5 additions & 6 deletions trunk/drivers/clk/tegra/clk-tegra30.c
Original file line number Diff line number Diff line change
Expand Up @@ -1598,12 +1598,6 @@ static void __init tegra30_periph_clk_init(void)
clk_register_clkdev(clk, "afi", "tegra-pcie");
clks[afi] = clk;

/* pciex */
clk = tegra_clk_register_periph_gate("pciex", "pll_e", 0, clk_base, 0,
74, &periph_u_regs, periph_clk_enb_refcnt);
clk_register_clkdev(clk, "pciex", "tegra-pcie");
clks[pciex] = clk;

/* kfuse */
clk = tegra_clk_register_periph_gate("kfuse", "clk_m",
TEGRA_PERIPH_ON_APB,
Expand Down Expand Up @@ -1722,6 +1716,11 @@ static void __init tegra30_fixed_clk_init(void)
1, 0, &cml_lock);
clk_register_clkdev(clk, "cml1", NULL);
clks[cml1] = clk;

/* pciex */
clk = clk_register_fixed_rate(NULL, "pciex", "pll_e", 0, 100000000);
clk_register_clkdev(clk, "pciex", NULL);
clks[pciex] = clk;
}

static void __init tegra30_osc_clk_init(void)
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/media/i2c/s5c73m3/s5c73m3-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -956,7 +956,7 @@ static int s5c73m3_oif_enum_frame_interval(struct v4l2_subdev *sd,

if (fie->pad != OIF_SOURCE_PAD)
return -EINVAL;
if (fie->index >= ARRAY_SIZE(s5c73m3_intervals))
if (fie->index > ARRAY_SIZE(s5c73m3_intervals))
return -EINVAL;

mutex_lock(&state->lock);
Expand Down
7 changes: 4 additions & 3 deletions trunk/drivers/media/pci/cx88/cx88-alsa.c
Original file line number Diff line number Diff line change
Expand Up @@ -615,7 +615,7 @@ static int snd_cx88_volume_put(struct snd_kcontrol *kcontrol,
int changed = 0;
u32 old;

if (core->sd_wm8775)
if (core->board.audio_chip == V4L2_IDENT_WM8775)
snd_cx88_wm8775_volume_put(kcontrol, value);

left = value->value.integer.value[0] & 0x3f;
Expand Down Expand Up @@ -682,7 +682,8 @@ static int snd_cx88_switch_put(struct snd_kcontrol *kcontrol,
vol ^= bit;
cx_swrite(SHADOW_AUD_VOL_CTL, AUD_VOL_CTL, vol);
/* Pass mute onto any WM8775 */
if (core->sd_wm8775 && ((1<<6) == bit))
if ((core->board.audio_chip == V4L2_IDENT_WM8775) &&
((1<<6) == bit))
wm8775_s_ctrl(core, V4L2_CID_AUDIO_MUTE, 0 != (vol & bit));
ret = 1;
}
Expand Down Expand Up @@ -902,7 +903,7 @@ static int cx88_audio_initdev(struct pci_dev *pci,
goto error;

/* If there's a wm8775 then add a Line-In ALC switch */
if (core->sd_wm8775)
if (core->board.audio_chip == V4L2_IDENT_WM8775)
snd_ctl_add(card, snd_ctl_new1(&snd_cx88_alc_switch, chip));

strcpy (card->driver, "CX88x");
Expand Down
8 changes: 5 additions & 3 deletions trunk/drivers/media/pci/cx88/cx88-video.c
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,8 @@ int cx88_video_mux(struct cx88_core *core, unsigned int input)
/* The wm8775 module has the "2" route hardwired into
the initialization. Some boards may use different
routes for different inputs. HVR-1300 surely does */
if (core->sd_wm8775) {
if (core->board.audio_chip &&
core->board.audio_chip == V4L2_IDENT_WM8775) {
call_all(core, audio, s_routing,
INPUT(input).audioroute, 0, 0);
}
Expand Down Expand Up @@ -770,7 +771,8 @@ static int video_open(struct file *file)
cx_write(MO_GP1_IO, core->board.radio.gpio1);
cx_write(MO_GP2_IO, core->board.radio.gpio2);
if (core->board.radio.audioroute) {
if (core->sd_wm8775) {
if(core->board.audio_chip &&
core->board.audio_chip == V4L2_IDENT_WM8775) {
call_all(core, audio, s_routing,
core->board.radio.audioroute, 0, 0);
}
Expand Down Expand Up @@ -957,7 +959,7 @@ static int cx8800_s_aud_ctrl(struct v4l2_ctrl *ctrl)
u32 value,mask;

/* Pass changes onto any WM8775 */
if (core->sd_wm8775) {
if (core->board.audio_chip == V4L2_IDENT_WM8775) {
switch (ctrl->id) {
case V4L2_CID_AUDIO_MUTE:
wm8775_s_ctrl(core, ctrl->id, ctrl->val);
Expand Down
9 changes: 0 additions & 9 deletions trunk/drivers/media/platform/coda.c
Original file line number Diff line number Diff line change
Expand Up @@ -576,14 +576,6 @@ static int vidioc_dqbuf(struct file *file, void *priv, struct v4l2_buffer *buf)
return v4l2_m2m_dqbuf(file, ctx->m2m_ctx, buf);
}

static int vidioc_create_bufs(struct file *file, void *priv,
struct v4l2_create_buffers *create)
{
struct coda_ctx *ctx = fh_to_ctx(priv);

return v4l2_m2m_create_bufs(file, ctx->m2m_ctx, create);
}

static int vidioc_streamon(struct file *file, void *priv,
enum v4l2_buf_type type)
{
Expand Down Expand Up @@ -618,7 +610,6 @@ static const struct v4l2_ioctl_ops coda_ioctl_ops = {

.vidioc_qbuf = vidioc_qbuf,
.vidioc_dqbuf = vidioc_dqbuf,
.vidioc_create_bufs = vidioc_create_bufs,

.vidioc_streamon = vidioc_streamon,
.vidioc_streamoff = vidioc_streamoff,
Expand Down
15 changes: 0 additions & 15 deletions trunk/drivers/media/platform/davinci/vpbe_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -916,21 +916,6 @@ static int vpbe_display_s_fmt(struct file *file, void *priv,
other video window */

layer->pix_fmt = *pixfmt;
if (pixfmt->pixelformat == V4L2_PIX_FMT_NV12) {
struct vpbe_layer *otherlayer;

otherlayer = _vpbe_display_get_other_win_layer(disp_dev, layer);
/* if other layer is available, only
* claim it, do not configure it
*/
ret = osd_device->ops.request_layer(osd_device,
otherlayer->layer_info.id);
if (ret < 0) {
v4l2_err(&vpbe_dev->v4l2_dev,
"Display Manager failed to allocate layer\n");
return -EBUSY;
}
}

/* Get osd layer config */
osd_device->ops.get_layer_config(osd_device,
Expand Down
3 changes: 2 additions & 1 deletion trunk/drivers/media/platform/davinci/vpfe_capture.c
Original file line number Diff line number Diff line change
Expand Up @@ -1837,7 +1837,7 @@ static int vpfe_probe(struct platform_device *pdev)
if (NULL == ccdc_cfg) {
v4l2_err(pdev->dev.driver,
"Memory allocation failed for ccdc_cfg\n");
goto probe_free_dev_mem;
goto probe_free_lock;
}

mutex_lock(&ccdc_lock);
Expand Down Expand Up @@ -1991,6 +1991,7 @@ static int vpfe_probe(struct platform_device *pdev)
free_irq(vpfe_dev->ccdc_irq0, vpfe_dev);
probe_free_ccdc_cfg_mem:
kfree(ccdc_cfg);
probe_free_lock:
mutex_unlock(&ccdc_lock);
probe_free_dev_mem:
kfree(vpfe_dev);
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/media/platform/exynos4-is/fimc-is-regs.c
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ int fimc_is_hw_change_mode(struct fimc_is *is)
HIC_CAPTURE_STILL, HIC_CAPTURE_VIDEO,
};

if (WARN_ON(is->config_index >= ARRAY_SIZE(cmd)))
if (WARN_ON(is->config_index > ARRAY_SIZE(cmd)))
return -EINVAL;

mcuctl_write(cmd[is->config_index], is, MCUCTL_REG_ISSR(0));
Expand Down
22 changes: 12 additions & 10 deletions trunk/drivers/media/platform/exynos4-is/fimc-is.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ static char *fimc_is_clocks[ISS_CLKS_MAX] = {
[ISS_CLK_LITE0] = "lite0",
[ISS_CLK_LITE1] = "lite1",
[ISS_CLK_MPLL] = "mpll",
[ISS_CLK_SYSREG] = "sysreg",
[ISS_CLK_ISP] = "isp",
[ISS_CLK_DRC] = "drc",
[ISS_CLK_FD] = "fd",
Expand All @@ -70,6 +71,7 @@ static void fimc_is_put_clocks(struct fimc_is *is)
for (i = 0; i < ISS_CLKS_MAX; i++) {
if (IS_ERR(is->clocks[i]))
continue;
clk_unprepare(is->clocks[i]);
clk_put(is->clocks[i]);
is->clocks[i] = ERR_PTR(-EINVAL);
}
Expand All @@ -88,14 +90,20 @@ static int fimc_is_get_clocks(struct fimc_is *is)
ret = PTR_ERR(is->clocks[i]);
goto err;
}
ret = clk_prepare(is->clocks[i]);
if (ret < 0) {
clk_put(is->clocks[i]);
is->clocks[i] = ERR_PTR(-EINVAL);
goto err;
}
}

return 0;
err:
fimc_is_put_clocks(is);
dev_err(&is->pdev->dev, "failed to get clock: %s\n",
fimc_is_clocks[i]);
return ret;
return -ENXIO;
}

static int fimc_is_setup_clocks(struct fimc_is *is)
Expand Down Expand Up @@ -136,7 +144,7 @@ int fimc_is_enable_clocks(struct fimc_is *is)
for (i = 0; i < ISS_GATE_CLKS_MAX; i++) {
if (IS_ERR(is->clocks[i]))
continue;
ret = clk_prepare_enable(is->clocks[i]);
ret = clk_enable(is->clocks[i]);
if (ret < 0) {
dev_err(&is->pdev->dev, "clock %s enable failed\n",
fimc_is_clocks[i]);
Expand All @@ -155,7 +163,7 @@ void fimc_is_disable_clocks(struct fimc_is *is)

for (i = 0; i < ISS_GATE_CLKS_MAX; i++) {
if (!IS_ERR(is->clocks[i])) {
clk_disable_unprepare(is->clocks[i]);
clk_disable(is->clocks[i]);
pr_debug("disabled clock: %s\n", fimc_is_clocks[i]);
}
}
Expand Down Expand Up @@ -318,11 +326,6 @@ int fimc_is_start_firmware(struct fimc_is *is)
struct device *dev = &is->pdev->dev;
int ret;

if (is->fw.f_w == NULL) {
dev_err(dev, "firmware is not loaded\n");
return -EINVAL;
}

memcpy(is->memory.vaddr, is->fw.f_w->data, is->fw.f_w->size);
wmb();

Expand Down Expand Up @@ -938,8 +941,7 @@ static int fimc_is_remove(struct platform_device *pdev)
vb2_dma_contig_cleanup_ctx(is->alloc_ctx);
fimc_is_put_clocks(is);
fimc_is_debugfs_remove(is);
if (is->fw.f_w)
release_firmware(is->fw.f_w);
release_firmware(is->fw.f_w);
fimc_is_free_cpu_memory(is);

return 0;
Expand Down
Loading

0 comments on commit b0a81f7

Please sign in to comment.