Working tv encoder out (PAL or NTSC) for kernel 4.4

Started by ghrvy, January 31, 2016, 07:42:43 PM

Previous topic - Next topic

ghrvy

I'm going to be along shortly with questions, so I though I'd start with an offering.

I've prepared a TGZ file here:
https://drive.google.com/file/d/0B_f6WM6ITL6uNjZ3WEZOZ1ZZTDA/view?usp=sharing

It contains:
(a) a kernel patch (source and device tree) to set up the frame buffer driver in the correct mode to drive the TV encoder in PAL mode.
(b) a second patch to apply after the first if you prefer NTSC.
(c) a utility to run (as root) to turn on the TV output (for either mode).

It is possible to call the utility automatically on boot (see https://bbs.archlinux.org/viewtopic.php?id=147790).

I've installed the resulting kernel and device tree into an ARCH disk image, an I get a login prompt on the TV out, and it is possible to start X.

lambda

Sounds great! Any plans to get this upstream into the mainline kernel?

swahren

@ghrvy

So the utility manipulate the mx23 registers, too?

ghrvy

Quote from: lambda on January 31, 2016, 09:52:11 PM
Sounds great! Any plans to get this upstream into the mainline kernel?

As it stands - probably not. For a start there are clock lookups by name, which can't be "right".

Quote from: swahren on January 31, 2016, 11:46:35 PM
@ghrvy

So the utility manipulate the mx23 registers, too?

Yes. To enable the clock to tvenc and to set up tvenc itself.

lambda

Quote from: ghrvy on February 02, 2016, 11:44:06 PM
Quote from: lambda on January 31, 2016, 09:52:11 PM
Sounds great! Any plans to get this upstream into the mainline kernel?
As it stands - probably not. For a start there are clock lookups by name, which can't be "right".

I wasn't suggesting that you submit the patches as is ... ;)

Just asking (hoping) if this is a long term goal.

swahren

Quote from: ghrvy on February 02, 2016, 11:44:06 PM
Quote from: lambda on January 31, 2016, 09:52:11 PM
Sounds great! Any plans to get this upstream into the mainline kernel?

As it stands - probably not. For a start there are clock lookups by name, which can't be "right".

I don't think lookup by name is a big problem. I recommend to implement the clock handling in clk-imx23 first.

swahren

As a small step for mainline support i added the necessary clock into the i.MX23 clock tree in my private repo:

https://github.com/lategoodbye/linux-mxs-power/commit/d87966f03e7714cca982bc10933ce9d828c48b25

Maybe this finally works ...