[PATCH 3/3] drm/tilcdc: Add mutex to protect crtc enable and disable routines

2016-09-06 Thread Jyri Sarha
Add mutex to protect crtc enable and disable routines. The tilcdc_crtc_disable() function waits for frame done interrupt, the internal data will get out of sync, should another enable arrive while waiting for the interrupt. Signed-off-by: Jyri Sarha --- drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 15

[PATCH 2/3] drm/tilcdc: Add tilcdc_crtc_set_clk() and cleanup cpufreq_transition()

2016-09-06 Thread Jyri Sarha
Add tilcdc_crtc_set_clk() and cleanup cpufreq_transition(). The new tilcdc_crtc_set_clk() is used in tilcdc_crtc_mode_set_nofb() instead tilcdc_crtc_update_clk(). New tilcdc_crtc_update_clk() is implemented using tilcdc_crtc_set_clk() for cpufreq_transition() alone. Signed-off-by: Jyri Sarha

[PATCH 1/3] drm/tilcdc: Take mode config lock while updating the crtc clock rate

2016-09-06 Thread Jyri Sarha
Take mode config lock while updating the crtc clock rate. To avoid a race in tilcdc_crtc_update_clk(), we do not want the mode to change while we update crtc clock. Signed-off-by: Jyri Sarha --- drivers/gpu/drm/tilcdc/tilcdc_drv.c | 5 + drivers/gpu/drm/tilcdc/tilcdc_drv.h | 2 ++ 2 files

[PATCH 0/3] drm/tilcdc: Fix cpufreq transition related race + cleanup

2016-09-06 Thread Jyri Sarha
Jyri Sarha (3): drm/tilcdc: Take mode config lock while updating the crtc clock rate drm/tilcdc: Add tilcdc_crtc_set_clk() and cleanup cpufreq_transition() drm/tilcdc: Add mutex to protect crtc enable and disable routines drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 93

[PATCH 0/3] drm/tilcdc: Some fixes for LCDC rev1

2016-09-02 Thread Jyri Sarha
On 09/01/16 01:11, Kevin Hilman wrote: > Hi Jyri, > > Jyri Sarha writes: > >> On 08/23/16 15:56, Karl Beldan wrote: >>> Hi, >>> >>> I found some missing bits for rev1 of the LCDC and here are some of the >>> changes I am using to use the DR

[GIT PULL] tilcdc fixes for 4.9

2016-09-02 Thread Jyri Sarha
s for v4.9 ---- Jyri Sarha (4): drm/tilcdc: Remove drm_helper_disable_unused_functions() call drm/tilcdc: Write DMA base and ceiling address with single instruction drm/tilcdc: Add blue-and-red-crossed devicetree property drm/tilc

[PATCH RFC] drm: Fix property handling for mode object without object type

2016-09-01 Thread Jyri Sarha
Fix property handling for mode object without mode object type. drm_property_change_valid_get() crashes if atomic ioctl for mode object does not specify the mode object type. This patch makes drm_property_change_valid_get() to tolerate such requests. Signed-off-by: Jyri Sarha --- This used

[PATCH v4 8/8] ARM: dts: am335x-evmsk: Add blue-and-red-wiring -property to lcdc node

2016-09-01 Thread Jyri Sarha
. Signed-off-by: Jyri Sarha --- arch/arm/boot/dts/am335x-evmsk.dts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/boot/dts/am335x-evmsk.dts b/arch/arm/boot/dts/am335x-evmsk.dts index 23b94e7..034e117 100644 --- a/arch/arm/boot/dts/am335x-evmsk.dts +++ b/arch/arm/boot/dts/am335x

[PATCH v4 7/8] ARM: dts: am335x-evmsk: Whitespace cleanup of lcdc related nodes

2016-09-01 Thread Jyri Sarha
Whitespace cleanup of lcdc related nodes. Do all indentation and alignment with tabs instead of spaces. Signed-off-by: Jyri Sarha --- arch/arm/boot/dts/am335x-evmsk.dts | 40 +++--- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/arch/arm/boot/dts

[PATCH v4 6/8] ARM: dts: am335x-evm: Add blue-and-red-wiring -property to lcdc node

2016-09-01 Thread Jyri Sarha
. Signed-off-by: Jyri Sarha --- arch/arm/boot/dts/am335x-evm.dts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/boot/dts/am335x-evm.dts b/arch/arm/boot/dts/am335x-evm.dts index 5d28712..c3cbce0 100644 --- a/arch/arm/boot/dts/am335x-evm.dts +++ b/arch/arm/boot/dts/am335x-evm.dts

[PATCH v4 5/8] ARM: dts: am335x-boneblack: Add blue-and-red-wiring -property to LCDC node

2016-09-01 Thread Jyri Sarha
supported color formats from 16 bit RGB and 24 bit BGR to 16 bit BGR and 24 bit RGB. Signed-off-by: Jyri Sarha --- arch/arm/boot/dts/am335x-boneblack.dts | 11 +++ 1 file changed, 11 insertions(+) diff --git a/arch/arm/boot/dts/am335x-boneblack.dts b/arch/arm/boot/dts/am335x-boneblack.dts

[PATCH v4 4/8] drm/tilcdc: Choose console BPP that supports RGB

2016-09-01 Thread Jyri Sarha
but RGB formats, so we must choose such bytes per pixel value that supports RGB. Signed-off-by: Jyri Sarha --- drivers/gpu/drm/tilcdc/tilcdc_drv.c | 14 +- drivers/gpu/drm/tilcdc/tilcdc_drv.h | 1 - drivers/gpu/drm/tilcdc/tilcdc_external.c | 7 +++ drivers/gpu/drm/tilcdc

[PATCH v4 3/8] drm/tilcdc: Add blue-and-red-crossed devicetree property

2016-09-01 Thread Jyri Sarha
65, RGB888 and XRGB formats. However, depending on wiring, the red and blue colors are swapped in either 16 or 24-bit color modes. For more details see section 3.1.1 in AM335x Silicon Errata: http://www.ti.com/general/docs/lit/getliterature.tsp?baseLiteratureNumber=sprz360 Signed-off-by:

[PATCH v4 2/8] drm/tilcdc: Write DMA base and ceiling address with single instruction

2016-09-01 Thread Jyri Sarha
ior in LCDC. Signed-off-by: Jyri Sarha --- drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 10 -- drivers/gpu/drm/tilcdc/tilcdc_regs.h | 14 ++ 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c in

[PATCH v4 1/8] drm/tilcdc: Remove drm_helper_disable_unused_functions() call

2016-09-01 Thread Jyri Sarha
drm_helper_disable_unused_functions() should not be called by atomic drivers. Signed-off-by: Jyri Sarha --- drivers/gpu/drm/tilcdc/tilcdc_drv.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.c b/drivers/gpu/drm/tilcdc/tilcdc_drv.c index 3404d24..e45c268

[PATCH v4 0/8] drm/tilcdc: Address LCDC rev 2 color errata + other fixes

2016-09-01 Thread Jyri Sarha
ors output to be in BGR format. With straight wiring the 16 color is RGB and 24 bit is BGR. These patches try to deal with the issue in reasonable manner. For more details see section 3.1.1 in AM335x Silicon Errata: http://www.ti.com/general/docs/lit/getliterature.tsp?baseLiteratureNumber=sprz360 Jy

[PATCH v3 2/8] drm/tilcdc: Write DMA base and ceiling address with single instruction

2016-09-01 Thread Jyri Sarha
On 09/01/16 10:13, Tomi Valkeinen wrote: > On 31/08/16 16:14, Jyri Sarha wrote: >> Write DMA base and ceiling address with a single instruction, if >> available. This should make it more unlikely that LCDC would fetch the >> DMA addresses in the middle of an update. H

[PATCH v3 0/8] drm/tilcdc: Address LCDC rev 2 color errata + other fixes

2016-08-31 Thread Jyri Sarha
On 08/31/16 21:04, Tony Lindgren wrote: > * Jyri Sarha [160831 06:19]: >> ARM: dts: am335x-boneblack: Add blue-and-red-wiring -property to LCDC >> node >> ARM: dts: am335x-evm: Add blue-and-red-wiring -property to lcdc node >> ARM: dts: am335x-evmsk: Whitesp

[PATCH] drm/omapdrm: Remove double gamma table write in omap_crtc_atomic_flush()

2016-08-31 Thread Jyri Sarha
Remove double gamma table write in omap_crtc_atomic_flush(). Fixes commit 492a426a2fc53 ("drm/omapdrm: Implement gamma_lut atomic crtc properties") Signed-off-by: Jyri Sarha --- drivers/gpu/drm/omapdrm/omap_crtc.c | 13 - 1 file changed, 13 deletions(-) diff --git a/drive

[PATCH v3 8/8] ARM: dts: am335x-evmsk: Add blue-and-red-wiring -property to lcdc node

2016-08-31 Thread Jyri Sarha
. Signed-off-by: Jyri Sarha --- arch/arm/boot/dts/am335x-evmsk.dts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/boot/dts/am335x-evmsk.dts b/arch/arm/boot/dts/am335x-evmsk.dts index 23b94e7..034e117 100644 --- a/arch/arm/boot/dts/am335x-evmsk.dts +++ b/arch/arm/boot/dts/am335x

[PATCH v3 7/8] ARM: dts: am335x-evmsk: Whitespace cleanup of lcdc related nodes

2016-08-31 Thread Jyri Sarha
Whitespace cleanup of lcdc related nodes. Do all indentation and alignment with tabs instead of spaces. Signed-off-by: Jyri Sarha --- arch/arm/boot/dts/am335x-evmsk.dts | 40 +++--- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/arch/arm/boot/dts

[PATCH v3 6/8] ARM: dts: am335x-evm: Add blue-and-red-wiring -property to lcdc node

2016-08-31 Thread Jyri Sarha
. Signed-off-by: Jyri Sarha --- arch/arm/boot/dts/am335x-evm.dts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/boot/dts/am335x-evm.dts b/arch/arm/boot/dts/am335x-evm.dts index 5d28712..c3cbce0 100644 --- a/arch/arm/boot/dts/am335x-evm.dts +++ b/arch/arm/boot/dts/am335x-evm.dts

[PATCH v3 5/8] ARM: dts: am335x-boneblack: Add blue-and-red-wiring -property to LCDC node

2016-08-31 Thread Jyri Sarha
supported color formats from 16 bit RGB and 24 bit BGR to 16 bit BGR and 24 bit RGB. Signed-off-by: Jyri Sarha --- arch/arm/boot/dts/am335x-boneblack.dts | 11 +++ 1 file changed, 11 insertions(+) diff --git a/arch/arm/boot/dts/am335x-boneblack.dts b/arch/arm/boot/dts/am335x-boneblack.dts

[PATCH v3 4/8] drm/tilcdc: Choose console BPP that supports RGB

2016-08-31 Thread Jyri Sarha
but RGB formats, so we must choose such bytes per pixel value that supports RGB. Signed-off-by: Jyri Sarha --- drivers/gpu/drm/tilcdc/tilcdc_drv.c | 14 +- drivers/gpu/drm/tilcdc/tilcdc_drv.h | 1 - drivers/gpu/drm/tilcdc/tilcdc_external.c | 7 +++ drivers/gpu/drm/tilcdc

[PATCH v3 3/8] drm/tilcdc: Add blue-and-red-crossed devicetree property

2016-08-31 Thread Jyri Sarha
d XRGB formats. However, depending on wiring, the red and blue colors are swapped in either 16 or 24-bit color modes. For more details see section 3.1.1 in AM335x Silicon Errata: http://www.ti.com/general/docs/lit/getliterature.tsp?baseLiteratureNumber=sprz360 Signed-off-by:

[PATCH v3 2/8] drm/tilcdc: Write DMA base and ceiling address with single instruction

2016-08-31 Thread Jyri Sarha
ior in LCDC. Signed-off-by: Jyri Sarha --- drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 9 +++-- drivers/gpu/drm/tilcdc/tilcdc_regs.h | 14 ++ 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c in

[PATCH v3 1/8] drm/tilcdc: Remove drm_helper_disable_unused_functions() call

2016-08-31 Thread Jyri Sarha
drm_helper_disable_unused_functions() should not be called by atomic drivers. Signed-off-by: Jyri Sarha --- drivers/gpu/drm/tilcdc/tilcdc_drv.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.c b/drivers/gpu/drm/tilcdc/tilcdc_drv.c index 3404d24..e45c268

[PATCH v3 0/8] drm/tilcdc: Address LCDC rev 2 color errata + other fixes

2016-08-31 Thread Jyri Sarha
n reasonable manner. For more details see section 3.1.1 in AM335x Silicon Errata: http://www.ti.com/general/docs/lit/getliterature.tsp?baseLiteratureNumber=sprz360 Jyri Sarha (8): drm/tilcdc: Remove drm_helper_disable_unused_functions() call drm/tilcdc: Write DMA base and ceiling address with

[PATCH v2 2/7] drm/tilcdc: Add blue-and-red-crossed devicetree property

2016-08-30 Thread Jyri Sarha
On 08/30/16 15:46, Tomi Valkeinen wrote: > > > On 26/08/16 20:44, Jyri Sarha wrote: >> On 08/26/16 15:51, Rob Herring wrote: >>>> --- a/Documentation/devicetree/bindings/display/tilcdc/tilcdc.txt >>>>> +++ b/Documentation/devicetree/bindings/disp

[PATCH RFC] drm/tilcdc: Write DMA base and ceiling address with single instruction

2016-08-29 Thread Jyri Sarha
ior in LCDC. Signed-off-by: Jyri Sarha --- I am not sure what would be the least ugly way of utilizing ARM7 strd instruction. Using inline assebler would be the most straight forward way, but this looks less ugly to me. drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 9 +++-- drivers/gpu/drm/til

[PATCH v2 2/7] drm/tilcdc: Add blue-and-red-crossed devicetree property

2016-08-26 Thread Jyri Sarha
On 08/26/16 15:51, Rob Herring wrote: >> --- a/Documentation/devicetree/bindings/display/tilcdc/tilcdc.txt >> > +++ b/Documentation/devicetree/bindings/display/tilcdc/tilcdc.txt >> > @@ -17,6 +17,8 @@ Optional properties: >> > the lcd controller. >> > - max-pixelclock: The maximum pixel

[PATCH v2 7/7] ARM: dts: am335x-evmsk: Add blue-and-red-crossed -property to lcdc node

2016-08-25 Thread Jyri Sarha
Add blue-and-red-crossed -property to lcdc node. The am335x-evmsk has blue and red wires crossed to get 24-bit RGB (and 16-bit BGR) support. See details in Documentation/devicetree/bindings/display/tilcdc/tilcdc.txt. Signed-off-by: Jyri Sarha --- arch/arm/boot/dts/am335x-evmsk.dts | 2 ++ 1

[PATCH v2 6/7] ARM: dts: am335x-evmsk: Whitespace cleanup of lcdc related nodes

2016-08-25 Thread Jyri Sarha
Whitespace cleanup of lcdc related nodes. Do all indentation and alignment with tabs instead of spaces. Signed-off-by: Jyri Sarha --- arch/arm/boot/dts/am335x-evmsk.dts | 40 +++--- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/arch/arm/boot/dts

[PATCH v2 5/7] ARM: dts: am335x-evm: Add blue-and-red-crossed -property to lcdc node

2016-08-25 Thread Jyri Sarha
Add blue-and-red-crossed -property to lcdc node. The am335x-evm has blue and red wires crossed to get 24-bit RGB (and 16-bit BGR) support. See details in Documentation/devicetree/bindings/display/tilcdc/tilcdc.txt. Signed-off-by: Jyri Sarha --- arch/arm/boot/dts/am335x-evm.dts | 2 ++ 1 file

[PATCH v2 4/7] ARM: dts: am335x-boneblack: Add comments on how to support 24 bit RGB mode

2016-08-25 Thread Jyri Sarha
and 24 bit BGR to 16 bit BGR and 24 bit RGB, if the suggested changes are uncommented. Signed-off-by: Jyri Sarha --- arch/arm/boot/dts/am335x-boneblack.dts | 12 1 file changed, 12 insertions(+) diff --git a/arch/arm/boot/dts/am335x-boneblack.dts b/arch/arm/boot/dts/am335x

[PATCH v2 3/7] drm/tilcdc: Choose console BPP that supports RGB

2016-08-25 Thread Jyri Sarha
but RGB formats, so we must choose such bytes per pixel value that supports RGB. Signed-off-by: Jyri Sarha --- drivers/gpu/drm/tilcdc/tilcdc_drv.c | 13 - drivers/gpu/drm/tilcdc/tilcdc_drv.h | 1 - drivers/gpu/drm/tilcdc/tilcdc_external.c | 7 +++ drivers/gpu/drm/tilcdc

[PATCH v2 2/7] drm/tilcdc: Add blue-and-red-crossed devicetree property

2016-08-25 Thread Jyri Sarha
ue and red wires crossed for 24 bit RGB mode and after this patch their LCDC nodes should have this property to get correct colors in the display. For more details see section 3.1.1 in AM335x Silicon Errata: http://www.ti.com/general/docs/lit/getliterature.tsp?baseLiteratureNumber=sprz360 Signed-of

[PATCH v2 1/7] drm/tilcdc: Remove drm_helper_disable_unused_functions() call

2016-08-25 Thread Jyri Sarha
drm_helper_disable_unused_functions() should not be called by atomic drivers. Signed-off-by: Jyri Sarha --- drivers/gpu/drm/tilcdc/tilcdc_drv.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.c b/drivers/gpu/drm/tilcdc/tilcdc_drv.c index 3404d24..e45c268

[PATCH v2 0/7] drm/tilcdc: Address LCDC rev 2 color errata

2016-08-25 Thread Jyri Sarha
ble manner. For more details see section 3.1.1 in AM335x Silicon Errata: http://www.ti.com/general/docs/lit/getliterature.tsp?baseLiteratureNumber=sprz360 Jyri Sarha (7): drm/tilcdc: Remove drm_helper_disable_unused_functions() call drm/tilcdc: Add blue-and-red-crossed devicetree property drm/tilc

[PATCH 0/3] drm/tilcdc: Some fixes for LCDC rev1

2016-08-23 Thread Jyri Sarha
Thanks a lot! This is very helpful as I do not have LCDC rev1 HW my self, but only am335x based boards. On 08/23/16 15:56, Karl Beldan wrote: > Hi, > > I found some missing bits for rev1 of the LCDC and here are some of the > changes I am using to use the DRM driver on an LCDCK (which has a

[PATCH 2/4] drm/tilcdc: Add blue-and-red-wiring -device tree property

2016-08-19 Thread Jyri Sarha
On 08/18/16 22:17, Rob Herring wrote: > On Tue, Aug 16, 2016 at 12:24:28PM +0300, Jyri Sarha wrote: >> Add "blue-and-red-wiring"-device tree property and update devicetree >> binding document. The red and blue components are reversed between 24 >> and 16 bit m

[PATCH 4/4] ARM: dts: am335x-boneblack: Convert BGR from LCDC to RGB in tda19988

2016-08-16 Thread Jyri Sarha
u want to get 16 RGB mode (and 24 BGR mode), set tda19988 video-ports -property to 0x230145 and tilcdc blue-and-red-wiring -property to "straight". Signed-off-by: Jyri Sarha --- arch/arm/boot/dts/am335x-boneblack.dts | 11 +++ 1 file changed, 11 insertions(+) diff --

[PATCH 3/4] drm/tilcdc: Choose console BPP that supports RGB

2016-08-16 Thread Jyri Sarha
but RGB formats, so we must choose such bytes per pixel value that supports RGB. Signed-off-by: Jyri Sarha --- drivers/gpu/drm/tilcdc/tilcdc_drv.c | 13 - drivers/gpu/drm/tilcdc/tilcdc_drv.h | 1 - drivers/gpu/drm/tilcdc/tilcdc_external.c | 7 +++ drivers/gpu/drm/tilcdc

[PATCH 2/4] drm/tilcdc: Add blue-and-red-wiring -device tree property

2016-08-16 Thread Jyri Sarha
not found. For more details see section 3.1.1 in AM335x Silicon Errata: http://www.ti.com/general/docs/lit/getliterature.tsp?baseLiteratureNumber=sprz360 Signed-off-by: Jyri Sarha --- .../devicetree/bindings/display/tilcdc/tilcdc.txt | 12 ++ drivers/gpu/drm/tilcdc/tilcdc_drv.c

[PATCH 1/4] drm/tilcdc: Remove drm_helper_disable_unused_functions() call

2016-08-16 Thread Jyri Sarha
drm_helper_disable_unused_functions() should not be called by atomic drivers. Signed-off-by: Jyri Sarha --- drivers/gpu/drm/tilcdc/tilcdc_drv.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.c b/drivers/gpu/drm/tilcdc/tilcdc_drv.c index 3404d24..e45c268

[PATCH 0/4] drm/tilcdc: Address LCDC rev 2 color errata

2016-08-16 Thread Jyri Sarha
rature.tsp?baseLiteratureNumber=sprz360 Jyri Sarha (4): drm/tilcdc: Remove drm_helper_disable_unused_functions() call drm/tilcdc: Add blue-and-red-wiring -device tree property drm/tilcdc: Choose console BPP that supports RGB ARM: dts: am335x-boneblack: Convert BGR from LCDC to RGB in tda19988 .../devicetre

[PATCH] drm: tilcdc: Fix check for remote port parent

2016-08-15 Thread Jyri Sarha
On 08/15/16 11:16, Teresa Remmet wrote: > In function tilcdc_get_external_components the check for > the remote port parent is not correct. We need a '||' instead of > an '&&'. > > Signed-off-by: Teresa Remmet > --- > There has been send out a different version of this patch about a year ago. >

[GIT PULL] drm/tilcdc atomic modeset support and some non critical fixes

2016-08-09 Thread Jyri Sarha
) Jyri Sarha (29): drm/tilcdc: Restore old dpms state in pm_resume() drm/tilcdc: Move LCDC_SYNC_LOST handling inside if (ver == 2) statement drm/tilcdc: Write to LCDC_END_OF_INT_IND_REG at the end of IRQ function drm/tilcdc: Move waiting of LCDC_FRAME_DONE IRQ

[PATCH v2 3/3] ARM: dts: am335x-boneblack: Add HDMI audio support

2016-08-09 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 v2 2/3] drm/i2c: tda998x: Register ASoC hdmi-codec and add audio DT binding

2016-08-09 Thread Jyri Sarha
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 v2 1/3] drm/i2c: tda998x: Improve tda998x_configure_audio() audio related pdata

2016-08-09 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 | 84

[PATCH v2 0/3] drm/i2c: tda998x ASoC hdmi-codec support + BeagleBoneBlack audio support

2016-08-09 Thread Jyri Sarha
ers from ASoC thread - "dts/am335x-boneblack: SQUASH" - Use corrected macros from dt-bindings/display/tda998x.h [1] https://lists.freedesktop.org/archives/dri-devel/2016-August/114491.html Jyri Sarha (3): drm/i2c: tda998x: Improve tda998x_configure_audio() audio related pdata drm/i2

[PATCH 2/3] drm/i2c: tda998x: Register ASoC hdmi-codec and add audio DT binding

2016-08-08 Thread Jyri Sarha
On 08/06/16 01:19, Russell King - ARM Linux wrote: >> > It'll pick up that as the DT device to hang things off which I'd expect >> > to be the desired outcome given that this is a very similar situation to >> > the MFD situation. I've not been following the full thread so there is >> > probably

[PATCH 2/3] drm/i2c: tda998x: Register ASoC hdmi-codec and add audio DT binding

2016-08-05 Thread Jyri Sarha
On 08/04/16 17:07, Russell King - ARM Linux wrote: > On Tue, Aug 02, 2016 at 03:05:08PM +0300, Jyri Sarha wrote: >> +memcpy(audio.status, params->iec.status, >> + min(sizeof(audio.status), sizeof(params->iec.status))); > > As mentioned in the other p

[PATCH 1/3] drm/i2c: tda998x: Improve tda998x_configure_audio() audio related pdata

2016-08-05 Thread Jyri Sarha
On 08/04/16 16:31, Russell King - ARM Linux wrote: > On Tue, Aug 02, 2016 at 03:05:07PM +0300, Jyri Sarha wrote: >> @@ -787,19 +792,13 @@ tda998x_configure_audio(struct tda998x_priv *priv, >> reg_clear(priv, REG_AIP_CNTRL_0, AIP_CNTRL_0_RST_CTS); >> >>

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

2016-08-02 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 2/3] drm/i2c: tda998x: Register ASoC hdmi-codec and add audio DT binding

2016-08-02 Thread Jyri Sarha
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 1/3] drm/i2c: tda998x: Improve tda998x_configure_audio() audio related pdata

2016-08-02 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 0/3] drm/i2c: tda998x ASoC hdmi-codec support + BeagleBoneBlack audio support

2016-08-02 Thread Jyri Sarha
ch. The first patch changes tda998x pdata, so if there are any out of tree users of tda998x-driver the out of tree code needs to be updated. Jyri Sarha (3): drm/i2c: tda998x: Improve tda998x_configure_audio() audio related pdata drm/i2c: tda998x: Register ASoC hdmi-codec and add audio D

[PATCH v2 21/21] drm/tilcdc: Change tilcdc_crtc_page_flip() to tilcdc_crtc_update_fb()

2016-06-28 Thread Jyri Sarha
Change tilcdc_crtc_page_flip() to tilcdc_crtc_update_fb(). The function is not used as a page_flip() callback anymore so it is only confusing to call it that anymore. The function should only be used by dummy primary plane commit() callback. Signed-off-by: Jyri Sarha --- drivers/gpu/drm/tilcdc

[PATCH v2 20/21] drm/tilcdc: Remove unnecessary pm_runtime_get() and *_put() calls

2016-06-28 Thread Jyri Sarha
Remove unnecessary pm_runtime_get() and *_put() calls from commit phase callbacks. Those calls are not needed since we have the whole commit phase between pm_runtime_get_sync() and pm_runtime_put_sync(). Signed-off-by: Jyri Sarha --- drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 8 1 file

[PATCH v2 19/21] drm/tilcdc: Get rid of legacy dpms mechanism

2016-06-28 Thread Jyri Sarha
() and disable() callbacks. Signed-off-by: Jyri Sarha --- drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 109 ++- drivers/gpu/drm/tilcdc/tilcdc_drv.c | 8 ++- drivers/gpu/drm/tilcdc/tilcdc_drv.h | 3 +- 3 files changed, 50 insertions(+), 70 deletions(-) diff --git

[PATCH v2 18/21] drm/tilcdc: Use drm_atomic_helper_resume/suspend()

2016-06-28 Thread Jyri Sarha
Use drm_atomic_helper_resume/suspend() and get rid off all obsolete code register level context restoring code. Signed-off-by: Jyri Sarha --- drivers/gpu/drm/tilcdc/tilcdc_drv.c | 56 + drivers/gpu/drm/tilcdc/tilcdc_drv.h | 6 ++-- 2 files changed, 9

[PATCH v2 17/21] drm/tilcdc: Enable and disable interrupts in crtc start() and stop()

2016-06-28 Thread Jyri Sarha
Enable and disable interrupts in crtc start() and stop(). None of the interrupts can fire if CRTC is disabled, so it is cleaner - when considering suspend/resume code etc. - to enable the interrupts in when CRTC is turned on and to disable them when CRTC is turned off. Signed-off-by: Jyri Sarha

[PATCH v2 16/21] drm/tilcdc: tfp410: Add atomic modeset helpers to connector funcs

2016-06-28 Thread Jyri Sarha
Add atomic modeset helpers to tfp410 connector funcs. Property handling related helpers, atomic reset helper, and new dpms helper is needed in connector for atomic modeseting to work. The default helper functions are enough. Signed-off-by: Jyri Sarha --- drivers/gpu/drm/tilcdc/tilcdc_tfp410.c

[PATCH v2 15/21] drm/tilcdc: tfp410: Set crtc panel info at init phase

2016-06-28 Thread Jyri Sarha
Set crtc panel info at init phase. Setting it at prepare callback does it multiple times for no good reason and it also too late when atomic modeset is used. Signed-off-by: Jyri Sarha --- drivers/gpu/drm/tilcdc/tilcdc_tfp410.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH v2 14/21] drm/tilcdc: panel: Add atomic modeset helpers to connector funcs

2016-06-28 Thread Jyri Sarha
Add atomic modeset helpers to panel connector funcs. Property handling related helpers, atomic reset helper, and new dpms helper is needed in connector for atomic modeseting to work. The default helper functions are enough. Signed-off-by: Jyri Sarha --- drivers/gpu/drm/tilcdc/tilcdc_panel.c | 6

[PATCH v2 13/21] drm/tilcdc: panel: Set crtc panel info at init phase

2016-06-28 Thread Jyri Sarha
Set crtc panel info at init phase. Setting it at prepare callback does it multiple times for no good reason and it also too late when atomic modeset is used. Signed-off-by: Jyri Sarha --- drivers/gpu/drm/tilcdc/tilcdc_panel.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff

[PATCH v2 12/21] drm/tilcdc: Remove tilcdc_verify_fb()

2016-06-28 Thread Jyri Sarha
Remove tilcdc_verify_fb(). The tilcdc_verify_fb() function is not needed because the same checks are implemented in tilcdc_plane_atomic_check(). Signed-off-by: Jyri Sarha --- drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 21 - 1 file changed, 21 deletions(-) diff --git a/drivers

[PATCH v2 11/21] drm/tilcdc: Remove obsolete crtc helper functions

2016-06-28 Thread Jyri Sarha
ncs atomic_check() callback, it would get over written by the extra drm_atomic_helper_check_modeset() call. Signed-off-by: Jyri Sarha --- drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 208 --- 1 file changed, 208 deletions(-) diff --git a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c

[PATCH v2 10/21] drm/tilcdc: Set DRIVER_ATOMIC and use atomic crtc helpers

2016-06-28 Thread Jyri Sarha
Set DRIVER_ATOMIC and use atomic helpers and rename commit and prepare crtc helpers to enable and disable. This makes the final jump to mode setting, but there is lot of obsolete code to clean up. Signed-off-by: Jyri Sarha --- drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 20

[PATCH v2 09/21] drm/tilcdc: Add drm_mode_config_reset() call to tilcdc_load()

2016-06-28 Thread Jyri Sarha
Add drm_mode_config_reset() call to tilcdc_load(). This is need to initialize atomic state variables at load time. Signed-off-by: Jyri Sarha --- drivers/gpu/drm/tilcdc/tilcdc_drv.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.c b/drivers/gpu/drm

[PATCH v2 08/21] drm/tilcdc: Add atomic mode config funcs

2016-06-28 Thread Jyri Sarha
see drm_atomic_helper_check_modeset() documentation). Signed-off-by: Jyri Sarha --- drivers/gpu/drm/tilcdc/tilcdc_drv.c | 71 + 1 file changed, 71 insertions(+) diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.c b/drivers/gpu/drm/tilcdc/tilcdc_drv.c index 10fd

[PATCH v2 07/21] drm/tilcdc: Add tilcdc_crtc_atomic_check()

2016-06-28 Thread Jyri Sarha
led drm_atomic_helper_check_planes(). If the fixing of the adjusted_mode would be done in drm_crtc_helper_funcs atomic_check() callback, it would get over written by the extra drm_atomic_helper_check_modeset() call. Signed-off-by: Jyri Sarha --- drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 27 +++

[PATCH v2 06/21] drm/tilcdc: Add tilcdc_crtc_mode_set_nofb()

2016-06-28 Thread Jyri Sarha
Add tilcdc_crtc_mode_set_nofb(). The mode_set_nofb() semantics do not fit well to LCDC, because of the mandatory framebuffer. However, when the primary plane is required in the check phase, it and the framebuffer can be found from the atomic state struct. Signed-off-by: Jyri Sarha --- drivers

[PATCH v2 05/21] drm/tilcdc: Initialize dummy primary plane from crtc init

2016-06-28 Thread Jyri Sarha
Initialize dummy primary plane from crtc init. Signed-off-by: Jyri Sarha --- drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c index deb4f96..998ef10

[PATCH v2 04/21] drm/tilcdc: Add dummy primary plane implementation

2016-06-28 Thread Jyri Sarha
relies on a CRTC side function. Signed-off-by: Jyri Sarha --- drivers/gpu/drm/tilcdc/Makefile | 1 + drivers/gpu/drm/tilcdc/tilcdc_drv.h | 2 + drivers/gpu/drm/tilcdc/tilcdc_plane.c | 133 ++ 3 files changed, 136 insertions(+) create mode 100644 drivers

[PATCH v2 03/21] drm/tilcdc: Make tilcdc_crtc_page_flip() work if crtc is not yet on

2016-06-28 Thread Jyri Sarha
Make tilcdc_crtc_page_flip() work if crtc is not yet on. The plane commit sometimes comes before crtc is turned on. The new framebuffer should be set to scanout also in that case, so that it is there when crtc is turned on at the end of the commit phase. Signed-off-by: Jyri Sarha --- drivers

[PATCH v2 02/21] drm/tilcdc: Make tilcdc_crtc_page_flip() public

2016-06-28 Thread Jyri Sarha
Make tilcdc_crtc_page_flip() public for dummy plane implementation to use. Signed-off-by: Jyri Sarha --- drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 2 +- drivers/gpu/drm/tilcdc/tilcdc_drv.h | 4 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c

[PATCH v2 01/21] drm/tilcdc: Fix tilcdc component master unloading

2016-06-28 Thread Jyri Sarha
and the check if the drm_put_dev() has been called must be in component_master_ops unbind() callback, not in platform_driver remove() callback. Signed-off-by: Jyri Sarha --- drivers/gpu/drm/tilcdc/tilcdc_drv.c | 22 +- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git

[PATCH v2 00/21] drm/tilcdc: Atomic modeset support

2016-06-28 Thread Jyri Sarha
hes - Add mechanism to update crtc state's mode_changed if plane fb pixel_format changes - Add tilcdc_atomic_check() for mode_config_funcs - Leave tilcdc_crtc_mode_fixup() connected to drm_crtc_helper_funcs [1] https://lists.freedesktop.org/archives/dri-devel/2016-June/111258.html Jyri

Calling drm_atomic_helper_check_modeset() after drm_atomic_helper_check_planes()

2016-06-19 Thread Jyri Sarha
Hi, The documentation of drm_atomic_helper_check_modeset() says: "Drivers which update ->mode_changed (e.g. in their ->atomic_check hooks if a plane update can't be done without a full modeset) _must_ call this function afterwards after that change. It is permitted to call this function multiple

[PATCH v5 8/8] drm/tilcdc: Avoid error print by of_graph_get_next_endpoint()

2016-06-17 Thread Jyri Sarha
Avoid error print by of_graph_get_next_endpoint() if there is no ports present. Signed-off-by: Jyri Sarha --- drivers/gpu/drm/tilcdc/tilcdc_external.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/tilcdc/tilcdc_external.c b/drivers/gpu/drm

[PATCH v5 7/8] drm/tilcdc: Refer to panel.txt and tfp410.txt bindings in tilcdc.txt

2016-06-17 Thread Jyri Sarha
The legacy panel.txt and tfp410.txt bindings are still the only supported way to connect lcd panel and tfp410 DVI encoder to tilcdc. Signed-off-by: Jyri Sarha --- Documentation/devicetree/bindings/display/tilcdc/tilcdc.txt | 4 1 file changed, 4 insertions(+) diff --git a/Documentation

[PATCH v5 6/8] drm/tilcdc: Call drm_crtc_vblank_on() and *_off() in start() and stop()

2016-06-17 Thread Jyri Sarha
Add drm_crtc_vblank_on() and *_off() calls to start() and stop() functions, to make sure any vblank waits etc. gets properly cleaned up. Signed-off-by: Jyri Sarha --- drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/tilcdc

[PATCH v5 5/8] drm/tilcdc: Increase time out for waiting frame done interrupt

2016-06-17 Thread Jyri Sarha
Increase time out for waiting frame done interrupt. 50ms is long enough for the usual display modes (50 Hz or higher refresh rate), but it may be a bit tight for some unusual mode. Signed-off-by: Jyri Sarha --- drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH v5 4/8] drm/tilcdc: Move waiting of LCDC_FRAME_DONE IRQ into stop()

2016-06-17 Thread Jyri Sarha
Move wait queue waiting of LCDC_FRAME_DONE IRQ from tilcdc_crtc_dpms() into stop() function. This is just a cleanup and enables independent use of stop() function. Signed-off-by: Jyri Sarha --- drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 31 --- 1 file changed, 16

[PATCH v5 3/8] drm/tilcdc: Write to LCDC_END_OF_INT_IND_REG at the end of IRQ function

2016-06-17 Thread Jyri Sarha
interrupts. Signed-off-by: Jyri Sarha --- drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c index 6309d3c..65284e9 100644 --- a/drivers/gpu/drm/tilcdc

[PATCH v5 2/8] drm/tilcdc: Move LCDC_SYNC_LOST handling inside if (ver == 2) statement

2016-06-17 Thread Jyri Sarha
Move LCDC_SYNC_LOST handling inside if (ver == 2) statement. LCDC_SYNC_LOST interrupt status bit is only defined for version 2 silicon. Signed-off-by: Jyri Sarha --- drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 21 ++--- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git

[PATCH v5 2/8] drm/tilcdc: Move LCDC_SYNC_LOST handling in side if (ver == 2) statement

2016-06-17 Thread Jyri Sarha
Move LCDC_SYNC_LOST handling in side if (ver == 2) statement. LCDC_SYNC_LOST interrupt status bit is only defined for version 2 silicon. Signed-off-by: Jyri Sarha --- drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 21 ++--- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git

[PATCH v5 1/8] drm/tilcdc: Restore old dpms state in pm_resume()

2016-06-17 Thread Jyri Sarha
ngine when suspend invoked") Signed-off-by: Jyri Sarha --- drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 7 +++ drivers/gpu/drm/tilcdc/tilcdc_drv.c | 3 +++ drivers/gpu/drm/tilcdc/tilcdc_drv.h | 2 ++ 3 files changed, 12 insertions(+) diff --git a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c b/drive

[PATCH v5 0/8] drm/tilcdc Fixes and cleanups

2016-06-17 Thread Jyri Sarha
d "drm/tilcdc: Increase time out for waiting frame done interrupt" Changes since first version: - "drm/tilcdc: Restore old dpms state in pm_resume()" - Fix typos from description and subject - Add "drm/tilcdc: Call drm_crtc_vblank_on() and *_off() in start() and stop(

[PATCH v4 7/7] drm/tilcdc: Avoid error print by of_graph_get_next_endpoint()

2016-06-17 Thread Jyri Sarha
Avoid error print by of_graph_get_next_endpoint() if there is no ports present. Signed-off-by: Jyri Sarha --- drivers/gpu/drm/tilcdc/tilcdc_external.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/tilcdc/tilcdc_external.c b/drivers/gpu/drm

[PATCH v4 6/7] drm/tilcdc: Refer to panel.txt and tfp410.txt bindings in tilcdc.txt

2016-06-17 Thread Jyri Sarha
The legacy panel.txt and tfp410.txt bindings are still the only supported way to connect lcd panel and tfp410 DVI encoder to tilcdc. Signed-off-by: Jyri Sarha --- Documentation/devicetree/bindings/display/tilcdc/tilcdc.txt | 4 1 file changed, 4 insertions(+) diff --git a/Documentation

[PATCH v4 5/7] drm/tilcdc: Call drm_crtc_vblank_on() and *_off() in start() and stop()

2016-06-17 Thread Jyri Sarha
Add drm_crtc_vblank_on() and *_off() calls to start() and stop() functions, to make sure any vblank waits etc. gets properly cleaned up. Signed-off-by: Jyri Sarha --- drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/tilcdc

[PATCH v4 4/7] drm/tilcdc: Increase time out for waiting frame done interrupt

2016-06-17 Thread Jyri Sarha
Increase time out for waiting frame done interrupt. 50ms is long enough for the usual display modes (50 Hz or higher refresh rate), but it may be a bit tight for some unusual mode. Signed-off-by: Jyri Sarha --- drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH v4 3/7] drm/tilcdc: Move waiting of LCDC_FRAME_DONE IRQ into stop()

2016-06-17 Thread Jyri Sarha
Move wait queue waiting of LCDC_FRAME_DONE IRQ from tilcdc_crtc_dpms() into stop() function. This is just a cleanup and enables independent use of stop() function. Signed-off-by: Jyri Sarha --- drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 31 --- 1 file changed, 16

[PATCH v4 2/7] drm/tilcdc: Write to LCDC_END_OF_INT_IND_REG at the end of IRQ function

2016-06-17 Thread Jyri Sarha
interrupts. Signed-off-by: Jyri Sarha --- drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 36 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c index 4d8f9a5..65284e9 100644

[PATCH v4 1/7] drm/tilcdc: Restore old dpms state in pm_resume()

2016-06-17 Thread Jyri Sarha
ngine when suspend invoked") Signed-off-by: Jyri Sarha --- drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 7 +++ drivers/gpu/drm/tilcdc/tilcdc_drv.c | 3 +++ drivers/gpu/drm/tilcdc/tilcdc_drv.h | 2 ++ 3 files changed, 12 insertions(+) diff --git a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c b/drive

[PATCH v4 0/7] drm/tilcdc Fixes and cleanups

2016-06-17 Thread Jyri Sarha
IRQ into stop()" - Improve description - Add "drm/tilcdc: Increase time out for waiting frame done interrupt" Changes since first version: - "drm/tilcdc: Restore old dpms state in pm_resume()" - Fix typos from description and subject - Add "drm/tilcdc: Call

<    3   4   5   6   7   8   9   10   11   12   >