aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/sh_mobile_hdmi.c
Commit message (Collapse)AuthorAgeFilesLines
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/fbdev-2.6Linus Torvalds2011-01-131-38/+59
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.kernel.org/pub/scm/linux/kernel/git/lethal/fbdev-2.6: (29 commits) video: move SH_MIPI_DSI/SH_LCD_MIPI_DSI to the top of menu fbdev: Implement simple blanking in pseudocolor modes for vt8500lcdfb video: imx: Update the manufacturer's name nuc900fb: don't treat NULL clk as an error s3c2410fb: don't treat NULL clk as an error video: tidy up modedb formatting. video: matroxfb: Correct video option in comments and kernel config help. fbdev: sh_mobile_hdmi: simplify pointer handling fbdev: sh_mobile_hdmi: framebuffer notifiers have to be registered fbdev: sh_mobile_hdmi: add command line option to use the preferred EDID mode OMAP: DSS2: Introduce omap_channel as an omap_dss_device parameter, add new overlay manager. OMAP: DSS2: Use dss_features to handle DISPC bits removed on OMAP4 OMAP: DSS2: LCD2 Channel Changes for DISPC OMAP: DSS2: Change remaining DISPC functions for new omap_channel argument OMAP: DSS2: Introduce omap_channel argument to DISPC functions used by interface drivers OMAP: DSS2: Represent DISPC register defines with channel as parameter OMAP: DSS2: Add dss_features for omap4 and overlay manager related features OMAP: DSS2: Clean up DISPC color mode validation checks OMAP: DSS2: Add back authors of panel-generic.c based drivers OMAP: DSS2: remove generic DPI panel driver duplicated panel drivers ...
| * fbdev: sh_mobile_hdmi: simplify pointer handlingGuennadi Liakhovetski2011-01-111-9/+9
| | | | | | | | | | Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * fbdev: sh_mobile_hdmi: framebuffer notifiers have to be registeredGuennadi Liakhovetski2011-01-111-10/+9
| | | | | | | | | | | | | | | | | | | | A previous patch added a framebuffer notifier to sh_mobile_hdmi.c, but did not register it with the framebuffer core. This patch adds such a registration and moves the notifier block into dynamically allocated per-device private data. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * fbdev: sh_mobile_hdmi: add command line option to use the preferred EDID modeGuennadi Liakhovetski2011-01-111-19/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, if no command-line option is specified, the sh_mobile_hdmi will use the default 720p video mode. If a command line option of the form "video=sh_mobile_lcdc:<width>x<height>@<refresh>" is provided, the driver will look for that mode among those, available in the monitor EDID. This patch adds the ability to request the driver to use monitor's preferred mode by specifying 0 as width and hight in the above string. If that mode is not supported by the system, the driver will continue scanning through EDID modes, until it finds a suitable one. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | Merge branch 'for-linus' of ↵Linus Torvalds2011-01-131-0/+1
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: (348 commits) ALSA: hda - Fix NULL-derefence with a single mic in STAC auto-mic detection ALSA: hda - Add missing NID 0x19 fixup for Sony VAIO ALSA: hda - Fix ALC275 enable hardware EQ for SONY VAIO ALSA: oxygen: fix Xonar DG input ALSA: hda - Fix EAPD on Lenovo NB ALC269 to low ALSA: hda - Fix missing EAPD for Acer 4930G ALSA: hda: Disable 4/6 channels on some NVIDIA GPUs. ALSA: hda - Add static_hdmi_pcm option to HDMI codec parser ALSA: hda - Don't refer ELD when unplugged ASoC: tpa6130a2: Fix compiler warning ASoC: tlv320dac33: Add DAPM selection for LOM invert ASoC: DMIC codec: Adding a generic DMIC codec ALSA: snd-usb-us122l: Fix missing NULL checks ALSA: snd-usb-us122l: Fix MIDI output ASoC: soc-cache: Fix invalid memory access during snd_soc_lzo_cache_sync() ASoC: Fix section mismatch in wm8995.c ALSA: oxygen: add S/PDIF source selection for Claro cards ALSA: oxygen: fix CD/MIDI for X-Meridian (2G) ASoC: fix migor audio build ALSA: include delay.h for msleep in Xonar DG support ...
| * Merge branch 'topic/asoc' into for-linusTakashi Iwai2011-01-131-0/+1
| |\
| | * fbdev: sh_mobile_hdmi: fixup compile errorKuninori Morimoto2010-12-291-0/+1
| | | | | | | | | | | | | | | Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | | Merge branch 'master' of ↵Paul Mundt2011-01-061-3/+13
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6 Conflicts: drivers/video/sh_mobile_lcdcfb.c Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * | fbdev: sh-mobile: retrieve and propagate display sizes from EDIDGuennadi Liakhovetski2010-12-221-3/+13
| |/ | | | | | | | | | | | | | | Monitor EDID contains information about physical display sizes. Retrieve it and propagate to the framebuffer driver. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | fbdev: sh_mobile_hdmi: add support for E-EDID parsingGuennadi Liakhovetski2010-11-151-11/+49
| | | | | | | | | | | | | | | | | | Many HDMI clients implement enhanced EDID blocks, which often contain additional supported video modes. This patch implements parsing of such E-EDID blocks. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | fbdev: sh_mobile_hdmi: fix up compiler warnings.Paul Mundt2010-11-101-2/+0
| | | | | | | | | | | | | | | | | | | | CC drivers/video/sh_mobile_hdmi.o drivers/video/sh_mobile_hdmi.c: In function 'sh_hdmi_avi_infoframe_setup': drivers/video/sh_mobile_hdmi.c:539: warning: unused variable 'var' drivers/video/sh_mobile_hdmi.c: In function 'sh_hdmi_clk_configure': drivers/video/sh_mobile_hdmi.c:1021: warning: unused variable 'pdata' Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | fbdev: sh_mobile_hdmi: add support for 1080p modesGuennadi Liakhovetski2010-11-101-21/+36
| | | | | | | | | | | | | | Add support for 3 more preprogrammed video modes: 1080p at 24, 50, and 60Hz. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | fbdev: sh_mobile_hdmi: improve support for more video modesGuennadi Liakhovetski2010-11-101-4/+10
| | | | | | | | | | | | | | | | Configure pre-programmed VIC modes for VGA (640x480@60) and 720x576@50 modes, change PHY mode selection to be based on pixel clock frequency. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | fbdev: sh_mobile_hdmi: add support for more precise HDMI clock configurationGuennadi Liakhovetski2010-11-101-44/+68
|/ | | | | | | | | | | The HDMI clock has to be reconfigured for different video modes. However, the precision of the supplying SoC clock on SH-Mobile systems is often insufficient. This patch allows to additionally reconfigure the parent clock to achieve the optimal HDMI clock frequency, in case this is supported by the platform. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* fbdev: sh_mobile_hdmi: properly clean up modedb on monitor unplugGuennadi Liakhovetski2010-11-101-1/+4
| | | | | | | | Even though this is not a problem currently, it is better to clear the freed pointer and nullify the length of the freed memory. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* Merge master.kernel.org:/pub/scm/linux/kernel/git/lethal/genesis-2.6 into ↵Russell King2010-10-281-224/+405
|\ | | | | | | | | | | | | devel-stable Conflicts: drivers/video/sh_mobile_hdmi.c
| * fbdev: sh_mobile_hdmi: add support for the "video=" kernel command line optionGuennadi Liakhovetski2010-10-151-50/+88
| | | | | | | | | | | | | | | | | | | | | | Add support for specifying video modes on the kernel command line. Mode selection priorities are also changed such, that only exact matches of specified modes with monitor modes from EDID are accepted, at least in width and height. If none found - fall back to framebuffer default setting, if available. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * fbdev: sh_mobile_lcdc: make platform videomode table optionalGuennadi Liakhovetski2010-10-151-1/+2
| | | | | | | | | | | | | | | | Add a default 720p mode to the sh_mobile_lcdc driver to be used, when no videomode is specified in the platform data. This can be used, e.g., with HDMI. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * fbdev: sh_mobile_hdmi: support hot-plugging of different HDMI / DVI displaysGuennadi Liakhovetski2010-09-141-39/+164
| | | | | | | | | | | | | | | | | | | | | | | | | | With this patch hot-plugging of an HDMI or a DVI monitor can select a different video mode and reconfigure the LCDC and HDMI controllers accordingly. Due to a lack of a standard API to inform framebuffer users of a changed video mode, the framebuffer configuration is preserved regardless of a specific mode, selected for the monitor. As described in a previous patch, this leads to smaller framebuffers being displayed on larger monitors or a part of a larger framebuffer being displayed on a smaller resolution monitor. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * fbdev: sh_mobile_hdmi: improve HDMI PHY parameters for high resolutionsGuennadi Liakhovetski2010-09-141-2/+2
| | | | | | | | | | | | | | | | High monitor resolutions also require higher clock frequencies, current HDMI PHY parameters do not work well for resolutions higher than 720p. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * fbdev: sh_mobile_hdmi: cosmetic improvementsGuennadi Liakhovetski2010-09-141-37/+45
| | | | | | | | | | | | | | Improve comments, unify function names, replace pr_debug with dev_dbg. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * fbdev: sh_mobile_lcdcfb: separate display variable data from framebuffer dataGuennadi Liakhovetski2010-09-141-2/+6
| | | | | | | | | | | | | | | | | | This is a preparation for a patch, that shall allow displaying of a smaller framebuffer on a bigger display and of a part of a bigger framebuffer on a smaller display. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * fbdev: sh_mobile_hdmi: implement lockingGuennadi Liakhovetski2010-09-141-16/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | The SH-Mobile HDMI driver runs in several contexts: ISR, delayed work-queue, task context, when called from the sh_mobile_lcdc framebuffer driver. This creates ample race possibilities. Even though most these races are purely theoretical, it is better to close them. To trace fb_info validity we install a notification callback in the HDMI driver, and the only way for it to get to driver internal data is by using struct sh_mobile_lcdc_chan, therefore it had to be extracted into a separate common header. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * fbdev: sh_mobile_hdmi: enable "external" modeGuennadi Liakhovetski2010-09-141-1/+12
| | | | | | | | | | | | | | | | | | | | The SH-Mobile HDMI controller supports two configuration modes: using pre-programmed VICs and the "external" mode - specifying video parameters explicitly. The driver already contains code, necessary to configure HDMI manually, this patch actually enables it. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * fbdev: sh_mobile_hdmi: add initial support for modes, other than 720pGuennadi Liakhovetski2010-09-141-20/+62
| | | | | | | | | | | | | | | | To support standard video modes, other than 720p, the HDMI PHY configuration has to be adjusted and the VIC has to be sent to the display. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * fbdev: sh_mobile_lcdcfb: Support multiple video modes in platform dataGuennadi Liakhovetski2010-09-141-1/+2
| | | | | | | | | | | | | | | | | | | | | | This is a preparation for HDMI hotplug support. This patch just moves all platform defined video modes for the sh_mobile_lcdcfb driver to separate arrays and switches all users to use element 0 of that array, so, this patch doesn't introduce any functional changes and as such should not cause any regressions. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * fbdev: sh_mobile_hdmi: simplify the EDID reading procedureGuennadi Liakhovetski2010-09-141-20/+3
| | | | | | | | | | | | | | | | | | | | | | The present SH-Mobile HDMI driver reads and parses the EDID block into a variable screeninfo object, but since it is still unable to dynamically reconfigure the framebuffer, it overwrites the EDID information with preset values again. This patch just uses a temporary variable to store the EDID timing information instead. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * fbdev: sh-mobile_hdmi: remove un-necessity settingsKuninori Morimoto2010-09-141-106/+0
| | | | | | | | | | | | | | | | | | | | Current gamut, acp, isrc1, isrc2 settings are wrong, and not necessary for now. Tested-by: Takanari Hayama <taki@igel.co.jp> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Tested-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | fbdev: sh_mobile_hdmi: add new label for sound error pathKuninori Morimoto2010-09-101-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch solve below report from Guennadi > /* External video parameter settings */ > static void hdmi_external_video_param(struct sh_hdmi *hdmi) > { > @@ -804,6 +862,11 @@ static int __init sh_hdmi_probe(struct platform_device *pdev) > return -ENOMEM; > } > > + ret = snd_soc_register_codec(&pdev->dev, > + &soc_codec_dev_sh_hdmi, &sh_hdmi_dai, 1); > + if (ret < 0) > + goto egetclk; > + > hdmi->dev = &pdev->dev; > > hdmi->hdmi_clk = clk_get(&pdev->dev, "ick"); NAK. This breaks the error path and has to be fixed. Firstly, please, use a new label like "esndreg," secondly, you have to add clk_disable(hdmi->hdmi_clk); erate: clk_put(hdmi->hdmi_clk); egetclk: + snd_soc_unregister_codec(&pdev->dev); +esndreg: mutex_destroy(&hdmi->mutex); kfree(hdmi); Reported-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | fbdev: sh_mobile_hdmi: modify snd_soc_dai_driver settingsKuninori Morimoto2010-09-101-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch solve below report from Guennadi > +static struct snd_soc_dai_driver sh_hdmi_dai = { > + .name = "sh_mobile_hdmi-hifi", > + .playback = { > + .stream_name = "Playback", > + .channels_min = 1, Can it actually do mono? Maybe at probe time you could look at audio flags from your previous patch and, e.g., for SPDIF set channels_min to 2? > + .channels_max = 2, That's the "smallest max," yes. With some other interfaces (I2S, DSD) it can support up to 8 channels... > + .rates = SNDRV_PCM_RATE_8000_48000, Hm, in the datasheet I see supported frequencies 32kHz to 192kHz. And if you promise support for multiple frequencies, don't you want to implement .hw_params? Besides, not all of these frequencies will be available, depending on your supplied clock and your willingness to implement downsampling. Reported-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | fbdev: sh_mobile_hdmi: modify flags name to more specificKuninori Morimoto2010-09-101-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch solve below report from Guennadi 1) > +/* Audio source select */ > +#define HDMI_SRC_MASK (0xF << 0) > +#define HDMI_SRC_I2S (0 << 0) /* default */ > +#define HDMI_SRC_SPDIF (1 << 0) > +#define HDMI_SRC_DSD (2 << 0) > +#define HDMI_SRC_HBR (3 << 0) I would be more specific with these macro names, i.e., include "AUDIO" or "SND" or something similar in them, e.g., HDMI_AUDIO_SRC_I2S. 2) > + case HDMI_SRC_I2S: > + data = (0x0 << 3); > + break; > + case HDMI_SRC_SPDIF: > + data = (0x1 << 3); > + break; > + case HDMI_SRC_DSD: > + data = (0x2 << 3); > + break; > + case HDMI_SRC_HBR: > + data = (0x3 << 3); In all above cases parenthesis are superfluous. Reported-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | fbdev: sh_mobile_hdmi: modify noisy comment outKuninori Morimoto2010-09-101-14/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch solve below report from Guennadi 1) > - hdmi_write(hdmi, 0x00, HDMI_AUDIO_SETTING_1); > + switch (pdata->flags & HDMI_SRC_MASK) { > + default: > + /* FALL THROUGH */ I'm not sure I like the capitalisation here - no reason to shout;) 2) > +/************************************************************************ > + > + > + HDMI sound > + > + > +************************************************************************/ I don't think this comment deserves 7 lines of text, besides breaking the multiline comment style. If you think, one line like /* HDMI sound */ is not enough how about just /* * HDMI sound */ 3) > +/************************************************************************ > + > + > + HDMI video > + > + > +************************************************************************/ See above - 7 lines seem to be an overkill to me. Reported-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: Add sh_mobile_hdmi sound supportKuninori Morimoto2010-09-011-0/+65
| | | | | | | | | | | | Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | fbdev: sh-mobile: Add HDMI sound type selectionKuninori Morimoto2010-09-011-1/+20
|/ | | | | | Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* fbdev: sh-mobile: HDMI support for SH-Mobile SoCsGuennadi Liakhovetski2010-08-041-0/+1028
Some SH-Mobile SoCs have an HDMI controller and a PHY, attached to one of their LCDC interfaces. This patch adds a preliminary static support for such controllers, this means, that only the 720p mode is handled ATM. Support for more modes and a dynamic switching between them will be added by a follow up patch. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Acked-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>