[PATCH v9 4/7] ASoC: hdmi-codec: Add audio abort() callback for video side to use

2016-03-31 Thread Jyri Sarha
Add audio abort() callback, that is provided at audio stream start, for video side. This is for video side to use in case there is a pressing need to tear down the audio playback for some reason. Signed-off-by: Jyri Sarha --- include/sound/hdmi-codec.h| 8 ++-- sound/soc/codecs/hdmi

[PATCH v9 3/7] ASoC: hdmi-codec: Add hdmi-codec for external HDMI-encoders

2016-03-31 Thread Jyri Sarha
opies of similar structures in ASoC headers. This is on purpose to avoid direct dependencies to ASoC structures in video side driver. Signed-off-by: Jyri Sarha --- include/sound/hdmi-codec.h| 100 +++ sound/soc/codecs/Kconfig | 6 + sound/soc/codecs/Makefile | 2 + soun

[PATCH v9 2/7] ALSA: pcm: Allow 32 bit sample format in IEC958 channel status helper

2016-03-31 Thread Jyri Sarha
Treat 32 bit sample width as if it was 24 bits when generating IEC958 channel status bits. On some platforms 24 sample width is problematic and to get full 24 bit precision a 32 bit format, using only the 24 most significant bits, may have to be used. Signed-off-by: Jyri Sarha --- sound/core

[PATCH v9 1/7] ALSA: pcm: add IEC958 channel status helper for hw_params

2016-03-31 Thread Jyri Sarha
Add IEC958 channel status helper that gets the audio properties from snd_pcm_hw_params instead of snd_pcm_runtime. This is needed to produce the channel status bits already in audio stream configuration phase. Signed-off-by: Jyri Sarha --- include/sound/pcm_iec958.h | 2 ++ sound/core

[PATCH v9 0/7] Implement generic ASoC HDMI codec and use it in tda998x

2016-03-31 Thread Jyri Sarha
related private data members to be more descriptive - Require audio configuration trough ASoC hdmi-codec if HDMI audio is configured trough DT binding. DTS: - Increase McASP fifo usage form 1 to 32 Jyri Sarha (7): ALSA: pcm: add IEC958 channel status helper for hw_params ALSA: pc

[PATCH v8 1/6] ALSA: pcm: add IEC958 channel status helper for hw_params

2016-03-30 Thread Jyri Sarha
On 03/30/16 09:21, Takashi Iwai wrote: > On Tue, 29 Mar 2016 19:23:12 +0200, > Russell King - ARM Linux wrote: >> >> On Tue, Mar 29, 2016 at 10:54:08AM +0200, Takashi Iwai wrote: >>> On Thu, 17 Mar 2016 13:22:29 +0100, >>> Jyri Sarha wrote: >>>> >

[PATCH v8 6/6] ARM: dts: am335x-boneblack: Add HDMI audio support

2016-03-21 Thread Jyri Sarha
On 03/19/16 08:39, Jean-Francois Moine wrote: > On Thu, 17 Mar 2016 14:22:34 +0200 > Jyri Sarha wrote: > >> @@ -76,16 +87,22 @@ >> }; >> >> &i2c0 { >> -tda19988 { >> +tda19988: tda19988 { >>

[PATCH v8 6/6] ARM: dts: am335x-boneblack: Add HDMI audio support

2016-03-17 Thread Jyri Sarha
Add HDMI audio support. Adds mcasp0_pins, clk_mcasp0_fixed, clk_mcasp0, mcasp0, sound node, and updates the tda19988 node to follow the new binding. Signed-off-by: Jyri Sarha --- arch/arm/boot/dts/am335x-boneblack.dts | 71 -- 1 file changed, 67 insertions(+), 4

[PATCH v8 5/6] drm/i2c: tda998x: Register ASoC hdmi-codec and add audio DT binding

2016-03-17 Thread Jyri Sarha
[2]. There may still be some identical lines left from the original patch and some of the ideas have come from there. [1] Documentation/devicetree/bindings/display/bridge/tda998x.txt [2] http://mailman.alsa-project.org/pipermail/alsa-devel/2015-July/095255.html Signed-off-by: Jyri Sarha ---

[PATCH v8 4/6] drm/i2c: tda998x: Improve tda998x_configure_audio() audio related pdata

2016-03-17 Thread Jyri Sarha
Define struct tda998x_audio_params in include/drm/i2c/tda998x.h and use it in pdata and for tda998x_configure_audio() parameters. Also updates tda998x_write_aif() to take struct hdmi_audio_infoframe * directly as a parameter. Signed-off-by: Jyri Sarha --- drivers/gpu/drm/i2c/tda998x_drv.c | 77

[PATCH v8 3/6] ASoC: hdmi-codec: Add audio abort() callback for video side to use

2016-03-17 Thread Jyri Sarha
Add audio abort() callback, that is provided at audio stream start, for video side. This is for video side to use in case there is a pressing need to tear down the audio playback for some reason. Signed-off-by: Jyri Sarha --- include/sound/hdmi-codec.h| 8 ++-- sound/soc/codecs/hdmi

[PATCH v8 2/6] ASoC: hdmi-codec: Add hdmi-codec for external HDMI-encoders

2016-03-17 Thread Jyri Sarha
opies of similar structures in ASoC headers. This is on purpose to avoid direct dependencies to ASoC structures in video side driver. Signed-off-by: Jyri Sarha Acked-by: Arnaud Pouliquen Tested-by: Philipp Zabel --- include/sound/hdmi-codec.h| 100 +++ sound/soc/codecs/Kconfig

[PATCH v8 1/6] ALSA: pcm: add IEC958 channel status helper for hw_params

2016-03-17 Thread Jyri Sarha
Add IEC958 channel status helper that gets the audio properties from snd_pcm_hw_params instead of snd_pcm_runtime. This is needed to produce the channel status bits already in audio stream configuration phase. Signed-off-by: Jyri Sarha --- include/sound/pcm_iec958.h | 2 ++ sound/core

[PATCH v8 0/6] Implement generic ASoC HDMI codec and use it in tda998x

2016-03-17 Thread Jyri Sarha
e tda998x audio parameters in pdata to more generic, that can be readily used in tda998x_audio_config() - Rename and restructure audio port related private data members to be more descriptive - Require audio configuration trough ASoC hdmi-codec if HDMI audio is configured trough DT bindin

[PATCH v7 6/6] ARM: dts: am335x-boneblack: Add HDMI audio support

2016-03-17 Thread Jyri Sarha
Add HDMI audio support. Adds mcasp0_pins, clk_mcasp0_fixed, clk_mcasp0, mcasp0, sound node, and updates the tda19988 node to follow the new binding. Signed-off-by: Jyri Sarha --- arch/arm/boot/dts/am335x-boneblack.dts | 71 -- 1 file changed, 67 insertions(+), 4

[PATCH v7 5/6] drm/i2c: tda998x: Register ASoC hdmi-codec and add audio DT binding

2016-03-17 Thread Jyri Sarha
[2]. There may still be some identical lines left from the original patch and some of the ideas have come from there. [1] Documentation/devicetree/bindings/display/bridge/tda998x.txt [2] http://mailman.alsa-project.org/pipermail/alsa-devel/2015-July/095255.html Signed-off-by: Jyri Sarha ---

[PATCH v7 4/6] drm/i2c: tda998x: Improve tda998x_configure_audio() audio related pdata

2016-03-17 Thread Jyri Sarha
Define struct tda998x_audio_params in include/drm/i2c/tda998x.h and use it in pdata and for tda998x_configure_audio() parameters. Also updates tda998x_write_aif() to take struct hdmi_audio_infoframe * directly as a parameter. Signed-off-by: Jyri Sarha --- drivers/gpu/drm/i2c/tda998x_drv.c | 77

[PATCH v7 3/6] ASoC: hdmi-codec: Add audio abort() callback for video side to use

2016-03-17 Thread Jyri Sarha
Add audio abort() callback, that is provided at audio stream start, for video side. This is for video side to use in case there is a pressing need to tear down the audio playback for some reason. Signed-off-by: Jyri Sarha --- include/sound/hdmi-codec.h| 8 ++-- sound/soc/codecs/hdmi

[PATCH v7 2/6] ASoC: hdmi-codec: Add hdmi-codec for external HDMI-encoders

2016-03-17 Thread Jyri Sarha
opies of similar structures in ASoC headers. This is on purpose to avoid direct dependencies to ASoC structures in video side driver. Signed-off-by: Jyri Sarha Acked-by: Arnaud Pouliquen Tested-by: Philipp Zabel --- include/sound/hdmi-codec.h| 100 +++ sound/soc/codecs/Kconfig

[PATCH v7 1/6] ALSA: pcm: add IEC958 channel status helper for hw_params

2016-03-17 Thread Jyri Sarha
Add IEC958 channel status helper that gets the audio properties from snd_pcm_hw_params instead of snd_pcm_runtime. This is needed to produce the channel status bits already in audio stream configuration phase. Signed-off-by: Jyri Sarha --- include/sound/pcm_iec958.h | 2 ++ sound/core

[PATCH v7 0/6] Implement generic ASoC HDMI codec and use it in tda998x

2016-03-17 Thread Jyri Sarha
- Fix tda998x get_eld() locking - Change tda998x audio parameters in pdata to more generic, that can be readily used in tda998x_audio_config() - Rename and restructure audio port related private data members to be more descriptive - Require audio configuration trough ASoC hdmi-codec if HDMI audi

[PATCH v6 5/6] drm/i2c: tda998x: Register ASoC hdmi-codec and add audio DT binding

2016-03-10 Thread Jyri Sarha
> https://github.com/0day-ci/linux/commits/Jyri-Sarha/Implement-generic-ASoC-HDMI-codec-and-use-it-in-tda998x/20160309-041821 > base: git://people.freedesktop.org/~airlied/linux.git drm-next > config: x86_64-rhel (attached as .config) > reproduce: > # save the attached .con

[PATCH v6 1/6] ALSA: pcm: add IEC958 channel status helper for hw_params

2016-03-09 Thread Jyri Sarha
On 03/09/16 12:08, Arnaud Pouliquen wrote: > Hello Jyri, > > Acked-by: Arnaud Pouliquen > > With few nitpicking remarks on form. > > Regards > Arnaud > > On 03/08/2016 09:14 PM, Jyri Sarha wrote: >> Add IEC958 channel status helper that gets the audio properti

[PATCH v6 6/6] ARM: dts: am335x-boneblack: Add HDMI audio support

2016-03-08 Thread Jyri Sarha
Add HDMI audio support. Adds mcasp0_pins, clk_mcasp0_fixed, clk_mcasp0, mcasp0, sound node, and updates the tda19988 node to follow the new binding. Signed-off-by: Jyri Sarha --- arch/arm/boot/dts/am335x-boneblack.dts | 71 -- 1 file changed, 67 insertions(+), 4

[PATCH v6 5/6] drm/i2c: tda998x: Register ASoC hdmi-codec and add audio DT binding

2016-03-08 Thread Jyri Sarha
[2]. There may still be some identical lines left from the original patch and some of the ideas have come from there. [1] Documentation/devicetree/bindings/display/bridge/tda998x.txt [2] http://mailman.alsa-project.org/pipermail/alsa-devel/2015-July/095255.html Signed-off-by: Jyri Sarha ---

[PATCH v6 4/6] drm/i2c: tda998x: Improve tda998x_configure_audio() audio related pdata

2016-03-08 Thread Jyri Sarha
Define struct tda998x_audio_params in include/drm/i2c/tda998x.h and use it in pdata and for tda998x_configure_audio() parameters. Also updates tda998x_write_aif() to take struct hdmi_audio_infoframe * directly as a parameter. Signed-off-by: Jyri Sarha --- drivers/gpu/drm/i2c/tda998x_drv.c | 77

[PATCH v6 3/6] ASoC: hdmi-codec: Add audio abort() callback for video side to use

2016-03-08 Thread Jyri Sarha
Add audio abort() callback, that is provided at audio stream start, for video side. This is for video side to use in case there is a pressing need to tear down the audio playback for some reason. Signed-off-by: Jyri Sarha --- include/sound/hdmi-codec.h| 8 ++-- sound/soc/codecs/hdmi

[PATCH v6 2/6] ASoC: hdmi-codec: Add hdmi-codec for external HDMI-encoders

2016-03-08 Thread Jyri Sarha
opies of similar structures in ASoC headers. This is on purpose to avoid direct dependencies to ASoC structures in video side driver. Signed-off-by: Jyri Sarha --- include/sound/hdmi-codec.h| 100 +++ sound/soc/codecs/Kconfig | 6 + sound/soc/codecs/Makefile | 2 + soun

[PATCH v6 1/6] ALSA: pcm: add IEC958 channel status helper for hw_params

2016-03-08 Thread Jyri Sarha
Add IEC958 channel status helper that gets the audio properties from snd_pcm_hw_params instead of snd_pcm_runtime. This is needed to produce the channel status bits already in audio stream configuration phase. Signed-off-by: Jyri Sarha --- include/sound/pcm_iec958.h | 2 ++ sound/core

[PATCH v6 0/6] Implement generic ASoC HDMI codec and use it in tda998x

2016-03-08 Thread Jyri Sarha
port related private data members to be more descriptive - Require audio configuration trough ASoC hdmi-codec if HDMI audio is configured trough DT binding. DTS: - Increase McASP fifo usage form 1 to 32 Jyri Sarha (6): ALSA: pcm: add IEC958 channel status helper for hw_params ASoC: hdmi-co

[PATCH] drm/i2c: tda998x: Choose between atomic or non atomic dpms helper

2016-03-07 Thread Jyri Sarha
I do to get it there? Best regards, Jyri On 01/16/16 22:17, Jyri Sarha wrote: > Choose between atomic or non atomic connector dpms helper. If tda998x > is connected to a drm driver that does not support atomic modeset > calling drm_atomic_helper_connector_dpms() causes a crash

[GIT PULL Resend] tilcdc changes for 4.6

2016-03-07 Thread Jyri Sarha
error when !CONFIG_CPU_FREQ Jyri Sarha (8): drm/tilcdc: Implement dma-buf support for tilcdc drm/tilcdc: Allocate register storage based on the actual number registers drm/tilcdc: Fix interrupt enable/disable code for version 2 tilcdc drm/tilcdc: Remove the

Alternative binding proposal for tda998x audio (Was: Re: [PATCH RFC v5 4/8] drm/i2c: tda998x: Add support of a DT graph of ports)

2016-03-02 Thread Jyri Sarha
On 03/01/16 21:26, Jean-Francois Moine wrote: > On Tue, 1 Mar 2016 20:29:17 +0200 > Jyri Sarha wrote: > >> I understand the short comings of simple-card and it's binding. However, >> the binding is documented and it is feasible to extract the audio >> connection

Alternative binding proposal for tda998x audio (Was: Re: [PATCH RFC v5 4/8] drm/i2c: tda998x: Add support of a DT graph of ports)

2016-03-01 Thread Jyri Sarha
On 03/01/16 18:16, Jean-Francois Moine wrote: > On Tue, 1 Mar 2016 17:51:09 +0200 > Jyri Sarha wrote: > >> I know that it works, I have used it myself until now, but it is not >> needed and there is no driver that parses audio port endpoints. I see no >> point specifyi

Alternative binding proposal for tda998x audio (Was: Re: [PATCH RFC v5 4/8] drm/i2c: tda998x: Add support of a DT graph of ports)

2016-03-01 Thread Jyri Sarha
On 03/01/16 17:35, Jean-Francois Moine wrote: > On Tue, 1 Mar 2016 16:26:50 +0200 > Jyri Sarha wrote: > >> Ok, here is just one more simple alternative for tda998x audio binding. >> I feel that the graph ports binding for audio does not make sense >> without a grap

Alternative binding proposal for tda998x audio (Was: Re: [PATCH RFC v5 4/8] drm/i2c: tda998x: Add support of a DT graph of ports)

2016-03-01 Thread Jyri Sarha
Ok, here is just one more simple alternative for tda998x audio binding. I feel that the graph ports binding for audio does not make sense without a graph based ASoC machine driver implementation. The ASoC simple-card is already here and it so widely used that there is no getting rid of that any

[PATCH RFC v5 4/8] drm/i2c: tda998x: Add support of a DT graph of ports

2016-02-29 Thread Jyri Sarha
On 02/26/16 13:21, Russell King - ARM Linux wrote: > On Fri, Feb 26, 2016 at 12:14:44PM +0200, Jyri Sarha wrote: >> On 02/26/16 02:43, Russell King - ARM Linux wrote: >>> On Thu, Feb 25, 2016 at 03:42:50PM +0200, Jyri Sarha wrote: >>>> On 02/18/16 16:35, Rob Herri

[PATCH RFC v5 4/8] drm/i2c: tda998x: Add support of a DT graph of ports

2016-02-26 Thread Jyri Sarha
On 02/26/16 02:43, Russell King - ARM Linux wrote: > On Thu, Feb 25, 2016 at 03:42:50PM +0200, Jyri Sarha wrote: >> On 02/18/16 16:35, Rob Herring wrote: >>> This should be implied from the port unit address. In other words, >>> port at 0 is defined to be the rgb p

[GIT PULL] drm/tilcdc: Accumulated fixes over the past couple of years

2016-02-25 Thread Jyri Sarha
roller/dma engine when suspend invoked Dave Gerlach (1): drm/tilcdc: adopt pinctrl support Grygorii Strashko (1): drm/tilcdc: fix build error when !CONFIG_CPU_FREQ Jyri Sarha (8): drm/tilcdc: Implement dma-buf support for tilcdc drm/tilcdc: Allocate register storage based on the act

[PATCH RFC v5 4/8] drm/i2c: tda998x: Add support of a DT graph of ports

2016-02-25 Thread Jyri Sarha
On 02/18/16 16:35, Rob Herring wrote: > On Wed, Feb 17, 2016 at 04:49:05PM +0200, Jyri Sarha wrote: >> From: Jean-Francois Moine >> >> Two kinds of ports may be declared in a DT graph of ports: video and audio. >> This patch accepts the port value from a video port

[PATCH] drm/i2c: tda998x: Choose between atomic or non atomic dpms helper

2016-02-25 Thread Jyri Sarha
s a > driver specific connector dpms helper that calls > drm_atomic_helper_connector_dpms() if driver supports DRIVER_ATOMIC > and otherwise it calls the legacy drm_helper_connector_dpms(). > > Fixes commit 9736e988d328 ("drm/i2c: tda998x: Add support for atomic > modesetti

[PATCH v4 22/22] drm/tilcdc: Use devm_kzalloc() and devm_kcalloc() for private data

2016-02-24 Thread Jyri Sarha
Use devm_kzalloc() and devm_kcalloc() for private data allocation at driver load time. Signed-off-by: Jyri Sarha --- drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 4 +--- drivers/gpu/drm/tilcdc/tilcdc_drv.c| 19 +++ drivers/gpu/drm/tilcdc/tilcdc_panel.c | 20

[PATCH v4 21/22] drm/tilcdc: Initialize crtc->port

2016-02-24 Thread Jyri Sarha
itialized for drm_of_find_possible_crtcs() to work. Signed-off-by: Jyri Sarha --- drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 20 1 file changed, 20 insertions(+) diff --git a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c index 248e3ea..5f4da8c 100644 --- a/drivers/g

[PATCH v4 20/22] drm/tilcdc: Disable sync lost interrupt if it fires on every frame

2016-02-24 Thread Jyri Sarha
Disable the sync lost interrupt if it fires on every frame for 50 consecutive frames in a row. This is relatively sure sign of the sync lost interrupt being stuck and firing on every frame even if the display otherwise appears to work OK. Signed-off-by: Jyri Sarha --- drivers/gpu/drm/tilcdc

[PATCH v4 19/22] drm/tilcdc: Add prints on sync lost and FIFO underrun interrupts

2016-02-24 Thread Jyri Sarha
Add ratelimited prints on sync lost and FIFO underrun interrupts. Signed-off-by: Jyri Sarha --- drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 8 drivers/gpu/drm/tilcdc/tilcdc_drv.c | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c

[PATCH v4 18/22] drm/tilcdc: Remove the duplicate LCDC_INT_ENABLE_SET_REG in registers[]

2016-02-24 Thread Jyri Sarha
Removes the duplicate LCDC_INT_ENABLE_SET_REG-entry in registers array. Signed-off-by: Jyri Sarha --- drivers/gpu/drm/tilcdc/tilcdc_drv.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.c b/drivers/gpu/drm/tilcdc/tilcdc_drv.c index

[PATCH v4 17/22] drm/tilcdc: Fix interrupt enable/disable code for version 2 tilcdc

2016-02-24 Thread Jyri Sarha
writing 0 does not have any effect. The "bug" that is fixed here does not really do any harm since the interrupts are enabled only once in the power up and disabled before power down. Signed-off-by: Jyri Sarha --- drivers/gpu/drm/tilcdc/tilcdc_drv.c | 11 ++- 1 file changed, 6

[PATCH v4 16/22] drm/tilcdc: Do not update the next frame buffer close to vertical blank

2016-02-24 Thread Jyri Sarha
: Jyri Sarha --- drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 61 +++- 1 file changed, 53 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c index 32572285..b1df046 100644 --- a/drivers/gpu/drm/tilcdc

[PATCH v4 15/22] drm/tilcdc: Get rid of complex ping-pong mechanism

2016-02-24 Thread Jyri Sarha
. There are two registers defining the framebuffer dma area and things may break if the dma address is fetched in while the registers are are being updated. Signed-off-by: Tomi Valkeinen [Added description to the patch] Signed-off-by: Jyri Sarha --- drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 121

[PATCH v4 14/22] drm/tilcdc: cleanup irq handling

2016-02-24 Thread Jyri Sarha
From: Tomi Valkeinen Cleanup irq handling. Clear the irq status unconditionally and restructure the status bit conditions. Signed-off-by: Tomi Valkeinen [Added description to the patch] Signed-off-by: Jyri Sarha --- drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 9 + 1 file changed, 5

[PATCH v4 13/22] drm/tilcdc: remove broken error handling

2016-02-24 Thread Jyri Sarha
the error looks weird. Signed-off-by: Tomi Valkeinen [Added description to the patch] Signed-off-by: Jyri Sarha --- drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c b/drivers/gpu/drm/tilcdc

[PATCH v4 12/22] drm/tilcdc: split reset to a separate function

2016-02-24 Thread Jyri Sarha
From: Tomi Valkeinen Split reset to a separate function and use usleep_range(250, 1000) instead of msleep(1) to to keep the reset bit on long enough. Signed-off-by: Tomi Valkeinen [Added description to the patch, changed mdelay(500) to usleep_range(250, 1000)] Signed-off-by: Jyri Sarha

[PATCH v4 11/22] drm/tilcdc: disable crtc on unload

2016-02-24 Thread Jyri Sarha
From: Tomi Valkeinen Disable crtc on unload. Call tilcdc_crtc_dpms() with DRM_MODE_DPMS_OFF in the beginning of unload function. Signed-off-by: Tomi Valkeinen [Added description to the patch] Signed-off-by: Jyri Sarha --- drivers/gpu/drm/tilcdc/tilcdc_drv.c | 2 ++ 1 file changed, 2

[PATCH v4 10/22] drm/tilcdc: cleanup runtime PM handling

2016-02-24 Thread Jyri Sarha
have pm_runtime_forbid/allow calls any more and pm_runtime_irq_safe() is not set anymore. Signed-off-by: Tomi Valkeinen [Added description to the patch] Signed-off-by: Jyri Sarha --- drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 19 +++ drivers/gpu/drm/tilcdc/tilcdc_drv.c | 1 - 2

[PATCH v4 09/22] drm/tilcdc: Allocate register storage based on the actual number registers

2016-02-24 Thread Jyri Sarha
Allocate suspend/resume register storage based on the actual number registers the driver is aware of. The static allocation for register storage had fallen behind badly. Reported-by: Michael Bode Signed-off-by: Jyri Sarha --- drivers/gpu/drm/tilcdc/tilcdc_drv.c | 21

[PATCH v4 08/22] drm/tilcdc: fix build error when !CONFIG_CPU_FREQ

2016-02-24 Thread Jyri Sarha
y: Grygorii Strashko Signed-off-by: Jyri Sarha --- drivers/gpu/drm/tilcdc/tilcdc_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.c b/drivers/gpu/drm/tilcdc/tilcdc_drv.c index c204359..977c843 100644 --- a/drivers/gpu/drm/tilcdc/tilcdc_drv

[PATCH v4 07/22] drm/tilcdc: Implement dma-buf support for tilcdc

2016-02-24 Thread Jyri Sarha
There is nothing special about tilcdc HW when the video memory is concerned. Just using the standard drm helpers for implementation is enough. Signed-off-by: Jyri Sarha --- drivers/gpu/drm/tilcdc/tilcdc_drv.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a

[PATCH v4 06/22] drm/tilcdc: disable the lcd controller/dma engine when suspend invoked

2016-02-24 Thread Jyri Sarha
complete as part of the suspend handler for this driver. Signed-off-by: Darren Etheridge Tested-by: Dave Gerlach Signed-off-by: Jyri Sarha --- drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 3 +-- drivers/gpu/drm/tilcdc/tilcdc_drv.c | 3 +++ drivers/gpu/drm/tilcdc/tilcdc_drv.h | 1 + 3 files changed

[PATCH v4 05/22] drm/tilcdc: make frame_done interrupt active at all times

2016-02-24 Thread Jyri Sarha
always enabled during these operations. Signed-off-by: Darren Etheridge Tested-by: Dave Gerlach Signed-off-by: Jyri Sarha --- drivers/gpu/drm/tilcdc/tilcdc_drv.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.c b/drivers/gpu/drm/tilcdc

[PATCH v4 04/22] drm/tilcdc: fix kernel panic on suspend when no hdmi monitor connected

2016-02-24 Thread Jyri Sarha
the registers on resume if they were saved off during suspend. Signed-off-by: Darren Etheridge Tested-by: Dave Gerlach Acked-by: Felipe Balbi Signed-off-by: Jyri Sarha --- drivers/gpu/drm/tilcdc/tilcdc_drv.c | 23 +-- drivers/gpu/drm/tilcdc/tilcdc_drv.h | 1 + 2 files chan

[PATCH v4 03/22] drm/tilcdc: adopt pinctrl support

2016-02-24 Thread Jyri Sarha
prevent the IP from driving pins output in an uncontrolled manner, which may happen if the power domain drops the domain regulator. Signed-off-by: Dave Gerlach Signed-off-by: Darren Etheridge Signed-off-by: Jyri Sarha --- drivers/gpu/drm/tilcdc/tilcdc_drv.c | 8 1 file changed, 8 inse

[PATCH v4 02/22] drm/tilcdc: verify fb pitch

2016-02-24 Thread Jyri Sarha
with non-32 bpp modes. As modetest always allocated 4 bytes per pixel, it implies a bigger pitch for 16 or 24 bpp modes. This patch adds a check to reject pitches the hardware cannot support. Signed-off-by: Tomi Valkeinen Signed-off-by: Darren Etheridge Signed-off-by: Jyri Sarha --- drivers/gp

[PATCH v4 01/22] drm/tilcdc: rewrite pixel clock calculation

2016-02-24 Thread Jyri Sarha
*2, as the LCD controller has an internal divider which we set to 2. Signed-off-by: Darren Etheridge [Rewrapped description] Signed-off-by: Jyri Sarha --- drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 16 drivers/gpu/drm/tilcdc/tilcdc_drv.c | 11 +-- drivers/gpu/drm/tilcdc

[PATCH v4 00/22] drm/ticdc: Accumulated fixes over the past couple of years

2016-02-24 Thread Jyri Sarha
rewrite pixel clock calculation drm/tilcdc: fix kernel panic on suspend when no hdmi monitor connected drm/tilcdc: make frame_done interrupt active at all times drm/tilcdc: disable the lcd controller/dma engine when suspend invoked Dave Gerlach (1): drm/tilcdc: adopt pinctrl support Grygorii S

[PATCH v3 22/22] drm/tilcdc: Use devm_kzalloc() and devm_kcalloc() for private data

2016-02-24 Thread Jyri Sarha
On 02/24/16 14:38, Tomi Valkeinen wrote: > > On 23/02/16 17:03, Jyri Sarha wrote: >> Use devm_kzalloc() and devm_kcalloc() for private data allocation at >> driver load time. >> >> Signed-off-by: Jyri Sarha >> --- >> drivers/gpu/drm/tilcdc/tilcdc_crtc

[PATCH v3 21/22] drm/tilcdc: Initialize crtc->port

2016-02-23 Thread Jyri Sarha
On 02/23/16 17:32, Tomi Valkeinen wrote: > On 23/02/16 17:26, Jyri Sarha wrote: > >>> You didn't comment on why this is not an error? Why should the driver >>> continue even if crtc->port is missing? >>> >> >> At least for the time being if

[PATCH v3 21/22] drm/tilcdc: Initialize crtc->port

2016-02-23 Thread Jyri Sarha
On 02/23/16 17:19, Tomi Valkeinen wrote: > > > On 23/02/16 17:03, Jyri Sarha wrote: >> Initialize port device node pointer in the tilcdc crtc. Fixes "Falling >> back to first CRTC" warning from tda998x driver. >> >> The tda998x encoder driver calls dr

[PATCH v3 22/22] drm/tilcdc: Use devm_kzalloc() and devm_kcalloc() for private data

2016-02-23 Thread Jyri Sarha
Use devm_kzalloc() and devm_kcalloc() for private data allocation at driver load time. Signed-off-by: Jyri Sarha --- drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 4 +--- drivers/gpu/drm/tilcdc/tilcdc_drv.c| 19 +++ drivers/gpu/drm/tilcdc/tilcdc_panel.c | 20

[PATCH v3 21/22] drm/tilcdc: Initialize crtc->port

2016-02-23 Thread Jyri Sarha
itialized for drm_of_find_possible_crtcs() to work. Signed-off-by: Jyri Sarha --- drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 16 1 file changed, 16 insertions(+) diff --git a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c index 248e3ea..1eb4e0e 100644 --- a/drivers/g

[PATCH v3 20/22] drm/tilcdc: Disable sync lost interrupt if it fires on every frame

2016-02-23 Thread Jyri Sarha
Disable the sync lost interrupt if it fires on every frame for 50 consecutive frames in a row. This is relatively sure sign of the sync lost interrupt being stuck and firing on every frame even if the display otherwise appears to work OK. Signed-off-by: Jyri Sarha --- drivers/gpu/drm/tilcdc

[PATCH v3 19/22] drm/tilcdc: Add prints on sync lost and FIFO underrun interrupts

2016-02-23 Thread Jyri Sarha
Add ratelimited prints on sync lost and FIFO underrun interrupts. Signed-off-by: Jyri Sarha --- drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 8 drivers/gpu/drm/tilcdc/tilcdc_drv.c | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c

[PATCH v3 18/22] drm/tilcdc: Remove the duplicate LCDC_INT_ENABLE_SET_REG in registers[]

2016-02-23 Thread Jyri Sarha
Removes the duplicate LCDC_INT_ENABLE_SET_REG-entry in registers array. Signed-off-by: Jyri Sarha --- drivers/gpu/drm/tilcdc/tilcdc_drv.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.c b/drivers/gpu/drm/tilcdc/tilcdc_drv.c index

[PATCH v3 17/22] drm/tilcdc: Fix interrupt enable/disable code for version 2 tilcdc

2016-02-23 Thread Jyri Sarha
writing 0 does not have any effect. The "bug" that is fixed here does not really do any harm since the interrupts are enabled only once in the power up and disabled before power down. Signed-off-by: Jyri Sarha --- drivers/gpu/drm/tilcdc/tilcdc_drv.c | 11 ++- 1 file changed, 6

[PATCH v3 16/22] drm/tilcdc: Do not update the next frame buffer close to vertical blank

2016-02-23 Thread Jyri Sarha
: Jyri Sarha --- drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 61 +++- 1 file changed, 53 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c index 32572285..b1df046 100644 --- a/drivers/gpu/drm/tilcdc

[PATCH v3 15/22] drm/tilcdc: Get rid of complex ping-pong mechanism

2016-02-23 Thread Jyri Sarha
. There are two registers defining the framebuffer dma area and things may break if the dma address is fetched in while the registers are are being updated. Signed-off-by: Tomi Valkeinen [Added description to the patch] Signed-off-by: Jyri Sarha --- drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 121

[PATCH v3 14/22] drm/tilcdc: cleanup irq handling

2016-02-23 Thread Jyri Sarha
From: Tomi Valkeinen Cleanup irq handling. Clear the irq status unconditionally and restructure the status bit conditions. Signed-off-by: Tomi Valkeinen [Added description to the patch] Signed-off-by: Jyri Sarha --- drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 9 + 1 file changed, 5

[PATCH v3 13/22] drm/tilcdc: remove broken error handling

2016-02-23 Thread Jyri Sarha
the error looks weird. Signed-off-by: Tomi Valkeinen [Added description to the patch] Signed-off-by: Jyri Sarha --- drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c b/drivers/gpu/drm/tilcdc

[PATCH v3 12/22] drm/tilcdc: split reset to a separate function

2016-02-23 Thread Jyri Sarha
From: Tomi Valkeinen Split reset to a separate function and use usleep_range(250, 1000) instead of msleep(1) to to keep the reset bit on long enough. Signed-off-by: Tomi Valkeinen [Added description to the patch, changed mdelay(500) to usleep_range(250, 1000)] Signed-off-by: Jyri Sarha

[PATCH v3 11/22] drm/tilcdc: disable crtc on unload

2016-02-23 Thread Jyri Sarha
From: Tomi Valkeinen Disable crtc on unload. Call tilcdc_crtc_dpms() with DRM_MODE_DPMS_OFF in the beginning of unload function. Signed-off-by: Tomi Valkeinen [Added description to the patch] Signed-off-by: Jyri Sarha --- drivers/gpu/drm/tilcdc/tilcdc_drv.c | 2 ++ 1 file changed, 2

[PATCH v3 10/22] drm/tilcdc: cleanup runtime PM handling

2016-02-23 Thread Jyri Sarha
have pm_runtime_forbid/allow calls any more and pm_runtime_irq_safe() is not set anymore. Signed-off-by: Tomi Valkeinen [Added description to the patch] Signed-off-by: Jyri Sarha --- drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 19 +++ drivers/gpu/drm/tilcdc/tilcdc_drv.c | 1 - 2

[PATCH v3 09/22] drm/tilcdc: Allocate register storage based on the actual number registers

2016-02-23 Thread Jyri Sarha
Allocate suspend/resume register storage based on the actual number registers the driver is aware of. The static allocation for register storage had fallen behind badly. Reported-by: Michael Bode Signed-off-by: Jyri Sarha --- drivers/gpu/drm/tilcdc/tilcdc_drv.c | 21

[PATCH v3 08/22] drm/tilcdc: fix build error when !CONFIG_CPU_FREQ

2016-02-23 Thread Jyri Sarha
y: Grygorii Strashko Signed-off-by: Jyri Sarha --- drivers/gpu/drm/tilcdc/tilcdc_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.c b/drivers/gpu/drm/tilcdc/tilcdc_drv.c index c204359..977c843 100644 --- a/drivers/gpu/drm/tilcdc/tilcdc_drv

[PATCH v3 07/22] drm/tilcdc: Implement dma-buf support for tilcdc

2016-02-23 Thread Jyri Sarha
There is nothing special about tilcdc HW when the video memory is concerned. Just using the standard drm helpers for implementation is enough. Signed-off-by: Jyri Sarha --- drivers/gpu/drm/tilcdc/tilcdc_drv.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a

[PATCH v3 06/22] drm/tilcdc: disable the lcd controller/dma engine when suspend invoked

2016-02-23 Thread Jyri Sarha
complete as part of the suspend handler for this driver. Signed-off-by: Darren Etheridge Tested-by: Dave Gerlach Signed-off-by: Jyri Sarha --- drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 3 +-- drivers/gpu/drm/tilcdc/tilcdc_drv.c | 3 +++ drivers/gpu/drm/tilcdc/tilcdc_drv.h | 1 + 3 files changed

[PATCH v3 05/22] drm/tilcdc: make frame_done interrupt active at all times

2016-02-23 Thread Jyri Sarha
always enabled during these operations. Signed-off-by: Darren Etheridge Tested-by: Dave Gerlach Signed-off-by: Jyri Sarha --- drivers/gpu/drm/tilcdc/tilcdc_drv.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.c b/drivers/gpu/drm/tilcdc

[PATCH v3 04/22] drm/tilcdc: fix kernel panic on suspend when no hdmi monitor connected

2016-02-23 Thread Jyri Sarha
the registers on resume if they were saved off during suspend. Signed-off-by: Darren Etheridge Tested-by: Dave Gerlach Acked-by: Felipe Balbi Signed-off-by: Jyri Sarha --- drivers/gpu/drm/tilcdc/tilcdc_drv.c | 23 +-- drivers/gpu/drm/tilcdc/tilcdc_drv.h | 1 + 2 files chan

[PATCH v3 03/22] drm/tilcdc: adopt pinctrl support

2016-02-23 Thread Jyri Sarha
prevent the IP from driving pins output in an uncontrolled manner, which may happen if the power domain drops the domain regulator. Signed-off-by: Dave Gerlach Signed-off-by: Darren Etheridge Signed-off-by: Jyri Sarha --- drivers/gpu/drm/tilcdc/tilcdc_drv.c | 8 1 file changed, 8 inse

[PATCH v3 02/22] drm/tilcdc: verify fb pitch

2016-02-23 Thread Jyri Sarha
with non-32 bpp modes. As modetest always allocated 4 bytes per pixel, it implies a bigger pitch for 16 or 24 bpp modes. This patch adds a check to reject pitches the hardware cannot support. Signed-off-by: Tomi Valkeinen Signed-off-by: Darren Etheridge Signed-off-by: Jyri Sarha --- drivers/gp

[PATCH v3 01/22] drm/tilcdc: rewrite pixel clock calculation

2016-02-23 Thread Jyri Sarha
*2, as the LCD controller has an internal divider which we set to 2. Signed-off-by: Darren Etheridge [Rewrapped description] Signed-off-by: Jyri Sarha --- drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 16 drivers/gpu/drm/tilcdc/tilcdc_drv.c | 11 +-- drivers/gpu/drm/tilcdc

[PATCH v3 00/22] drm/ticdc: Accumulated fixes over the past couple of years

2016-02-23 Thread Jyri Sarha
drm/tilcdc: adopt pinctrl support Grygorii Strashko (1): drm/tilcdc: fix build error when !CONFIG_CPU_FREQ Jyri Sarha (8): drm/tilcdc: Implement dma-buf support for tilcdc drm/tilcdc: Allocate register storage based on the actual number registers drm/tilcdc: Fix interrupt enable/di

[PATCH RFC v5 8/8] ARM: dts: am335x-boneblack: Add HDMI audio support

2016-02-17 Thread Jyri Sarha
Add HDMI audio support. Adds mcasp0_pins, clk_mcasp0_fixed, clk_mcasp0, mcasp0, sound node, and updates the tda19988 node to follow the new binding. Signed-off-by: Jyri Sarha --- arch/arm/boot/dts/am335x-boneblack.dts | 90 -- 1 file changed, 86 insertions(+), 4

[PATCH RFC v5 7/8] drm/i2c: tda998x: Register ASoC HDMI codec for audio functionality

2016-02-17 Thread Jyri Sarha
available sample-rates. Implementation of audio_startup for hdmi_codec_ops would enable tda998x driver to abort ongoing playback if the HDMI cable is unplugged or re-plugged to a device without audio capability. Signed-off-by: Jyri Sarha --- drivers/gpu/drm/i2c/Kconfig | 1 + drivers/gpu

[PATCH RFC v5 6/8] drm/i2c: tda998x: Improve tda998x_configure_audio() audio related pdata

2016-02-17 Thread Jyri Sarha
Declare struct tda998x_audio_params in include/drm/i2c/tda998x.h and use it in pdata and for tda998x_configure_audio() parameters. Also updates tda998x_write_aif() to take struct hdmi_audio_infoframe * directly as a parameter. Signed-off-by: Jyri Sarha --- drivers/gpu/drm/i2c/tda998x_drv.c

[PATCH RFC v5 5/8] drm/i2c: tda998x: Remove include/sound/tda998x.h and fix graph parsing

2016-02-17 Thread Jyri Sarha
Move struct tda998x_audio definition to tda998x_drv.c and remove include/sound/tda998x.h. There is no external use for struct tda998x_audio. Fix graph parsing to allow ports to be inside a separate "ports"-node as specified in Documentation/devicetree/bindings/graph.txt. Signed-of

[PATCH RFC v5 4/8] drm/i2c: tda998x: Add support of a DT graph of ports

2016-02-17 Thread Jyri Sarha
file include/sound/tda998x.h prepares to the definition of a tda998x CODEC. Signed-off-by: Jean-Francois Moine Signed-off-by: Jyri Sarha --- .../devicetree/bindings/display/bridge/tda998x.txt | 51 drivers/gpu/drm/i2c/tda998x_drv.c | 90

[PATCH RFC v5 3/8] ASoC: hdmi-codec: Add audio abort() callback for video side to use

2016-02-17 Thread Jyri Sarha
Add audio abort() callback, that is provided at audio stream start, for video side. This is for video side to use in case there is a pressing need to tear down the audio playback for some reason. Signed-off-by: Jyri Sarha --- include/sound/hdmi-codec.h| 8 ++-- sound/soc/codecs/hdmi

[PATCH RFC v5 2/8] ASoC: hdmi-codec: Add hdmi-codec for external HDMI-encoders

2016-02-17 Thread Jyri Sarha
opies of similar structures in ASoC headers. This is on purpose to avoid direct dependencies to ASoC structures in video side driver. Signed-off-by: Jyri Sarha --- include/sound/hdmi-codec.h| 100 +++ sound/soc/codecs/Kconfig | 6 + sound/soc/codecs/Makefile | 2 + soun

[PATCH RFC v5 1/8] ALSA: pcm: add IEC958 channel status helper for hw_params

2016-02-17 Thread Jyri Sarha
Add IEC958 channel status helper that gets the audio properties from snd_pcm_hw_params instead of snd_pcm_runtime. This is needed to produce the channel status bits already in audio stream configuration phase. Signed-off-by: Jyri Sarha --- include/sound/pcm_iec958.h | 2 ++ sound/core

[PATCH RFC v5 0/8] Implement generic ASoC HDMI codec and use it in tda998x

2016-02-17 Thread Jyri Sarha
ts [1] http://mailman.alsa-project.org/pipermail/alsa-devel/2015-July/095596.html Best regards, Jyri Jean-Francois Moine (1): drm/i2c: tda998x: Add support of a DT graph of ports Jyri Sarha (7): ALSA: pcm: add IEC958 channel status helper for hw_params ASoC: hdmi-codec: Add hdmi-codec for ex

[PATCH v2 21/21] drm/tilcdc: Initialize crtc->port

2016-02-16 Thread Jyri Sarha
Initialize port device node pointer in the tilcdc crtc. Fixes "Falling back to first CRTC" warning from tda998x driver. Signed-off-by: Jyri Sarha --- drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/drivers/gpu/drm/tilcdc/tilcdc

<    5   6   7   8   9   10   11   12   13   >