From: "Jernej Škrabec" <jernej.skrabec@siol.net>
To: u-boot@lists.denx.de
Subject: [U-Boot] [RFC PATCH 2/3] sunxi: video: Add video driver for H3 SoC
Date: Tue, 13 Dec 2016 21:13:11 +0100 [thread overview]
Message-ID: <7717654.dmGkNqhmZr@jernej-laptop> (raw)
In-Reply-To: <20161213154055.isfot7v4jqzxxo5l@lukather>
Hi,
On Tue, Dec 13, 2016 at 16:40:55 CET, Maxime Ripard wrote:
> Hi,
>
> On Tue, Dec 13, 2016 at 01:36:29AM +0100, Jernej Skrabec wrote:
> > This patch adds support for hdmi output. It is designed in the same
> > way as video driver for older Allwinner SoCs.
> >
> > First it checks if monitor is attached. If it is, recommended
> > timings are read from EDID. After that, DE2, TCON and HDMI are
> > configured according to this timings.
> >
> > 32MB of RAM is used for framebuffer. This is just enough to support
> > 4K resolution.
> >
> > SimpleFB is also supported by this driver.
> >
> > Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
>
> From the linux discussion, I recall that you said that the TCON was
> still the same, and the HDMI was something that could be shared with
> the Rockchip implementation. Did you look into sharing the TCON code
> (for example using a small "library" to share the functions) and to
> reuse Rockchip's HDMI code?
For now, I only reused one TCON function and some defines. I tought that split
would be better done a bit later, when the driver will get support for LCD
screens (A64, for example). At that time TCON code would also be refactored to
be more generic and properly tested that it can be used with both drivers.
Unfortunatelly, I don't have any board with older SoC for testing.
While I took Rockchip HDMI code for reference, it can't be easily reused.
First of, it uses DT nodes. I guess I could write DT binding or modify
existing driver to work without it. Second issue here is same as in Linux, PHY
code is tightly coupled with controller code, so it needs to be decoupled
first. Thirdly, and in my opinion most annoying, Rockchip driver uses 32 bit
aligned registers, but H3 does not. This also means a lot of work to make it
more generic. Actually, H3 is more similar to i.MX6 HDMI in this regard, but
driver's code is scattered throughout multiple files (search for mxc_hdmi.h
inclusion). It is certainly doable, but it will take much more time.
Basically, U-Boot already has two drivers for DWC HDMI and with this patch it
will get third. Merging all three implementations into one would be very
tedious, but very desirable goal. I must state that I didn't really try to
understand i.MX6 HDMI code at all, so I don't now how hard it would be to pull
it out.
By the way, did you get cover letter?
Best regards,
Jernej Skrabec
>
> Thanks,
> Maxime
>
> --
> Maxime Ripard, Free Electrons
> Embedded Linux and Kernel engineering
> http://free-electrons.com
next prev parent reply other threads:[~2016-12-13 20:13 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-13 0:36 [U-Boot] [RFC PATCH 0/3] sunxi: video: Add support for HDMI output on H3 Jernej Skrabec
2016-12-13 0:36 ` [U-Boot] [RFC PATCH 1/3] sunxi: Add clocks for DE2/HDMI/TCON Jernej Skrabec
2016-12-13 15:18 ` Maxime Ripard
2016-12-13 19:20 ` Jernej Škrabec
2016-12-14 2:39 ` Chen-Yu Tsai
2016-12-13 0:36 ` [U-Boot] [RFC PATCH 2/3] sunxi: video: Add video driver for H3 SoC Jernej Skrabec
2016-12-13 15:40 ` Maxime Ripard
2016-12-13 16:33 ` Chen-Yu Tsai
2016-12-13 20:13 ` Jernej Škrabec [this message]
2016-12-14 10:28 ` Maxime Ripard
2016-12-14 22:11 ` Jernej Škrabec
2016-12-19 13:28 ` Maxime Ripard
2017-02-05 22:23 ` Rask Ingemann Lambertsen
2016-12-13 0:36 ` [U-Boot] [RFC PATCH 3/3] sunxi: Enable H3 video driver in defconfigs Jernej Skrabec
2016-12-13 20:28 ` [U-Boot] [RFC PATCH 0/3] sunxi: video: Add support for HDMI output on H3 Simon Glass
2016-12-13 21:16 ` [U-Boot] [linux-sunxi] " Icenowy Zheng
2016-12-14 3:02 ` Chen-Yu Tsai
2016-12-14 9:25 ` Maxime Ripard
2016-12-14 9:37 ` Alexander Graf
2016-12-14 9:51 ` Emmanuel Vadot
2016-12-20 10:47 ` Maxime Ripard
2016-12-14 8:37 ` [U-Boot] " Hans de Goede
2016-12-14 9:24 ` Maxime Ripard
2016-12-17 22:47 ` Simon Glass
2017-02-05 22:14 ` Rask Ingemann Lambertsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7717654.dmGkNqhmZr@jernej-laptop \
--to=jernej.skrabec@siol.net \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox