linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: moinejf@free.fr (Jean-Francois Moine)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC 0/8] rmk's Dove DRM/TDA19988 Cubox driver
Date: Fri, 17 May 2013 19:40:23 +0200	[thread overview]
Message-ID: <20130517194023.0c385ea0@armhf> (raw)
In-Reply-To: <20130517120115.GF18614@n2100.arm.linux.org.uk>

On Fri, 17 May 2013 13:01:15 +0100
Russell King - ARM Linux <linux@arm.linux.org.uk> wrote:

> I already said - I don't support DT.  I don't run any DT based ARM
> devices, so I have no experience with DT.  What I care more about
> is a working cubox platform, which afaik DT still can't offer yet.

I like the DT concept. All the job I did on the Cubox is based on DT,
even when I was still using the aweful Marvell and NXP drivers. I have
nothing which is Cubox specific in my kernel, but the driver modules.

> > - CMA helper
> > 
> >   You don't use DRM_KMS_CMA_HELPER and DRM_GEM_CMA_HELPER which would
> >   simplify some code.  
> 
> Possibly, but the biggest win for me is having cacheable gem objects.
> CMA will be a retrograde step for those.

I did not think yet about the possible problems which could be raised
when the output of the video decoding engine, vMeta, will be the LCD
overlay plane.

> > - device tree
> > 
> >   Our driver depends on the DT and, by this way, it may be used for
> >   various boards (Cubox, DB-MV88AP510 Development Board, CompuLab
> >   CM-A510 Board..). Especially, in the Cubox, only a HDMI screen may be
> >   connected, while the display controller permits connection of a smart
> >   panel (port A) and a VGA screen (port B).   
> 
> I only have a Cubox, so I can't test anything but HDMI.

Sebastian has other Dove based machine(s).

> Given that there's big questions about the polarity of signals coming
> out of the Armada 510 (with the invert bits 0, are the syncs positive
> or negative?) I wouldn't like to lead anyone up the path of thinking
> that this driver supports anything but the tested HDMI scenario yet.
> 
> As that information is not in any of the Armada 510 TRMs, and can only
> be discovered by physically probing the signals with a scope... that's
> on my todo list when I feel like dismantling the Cubox and getting the
> soldering iron out to separate the two boards so I can get access to
> the signals.

Yes, from the beginning, Solidrun did not give us any information about
their hardware..., nor about their software! It seems Rabeeh is only
interested by a closed XBMC.

> I've already tried to explain this to Sebastian on IRC, and kept getting
> nonsense back from him.  "You need to program the whole chain".  Yes,
> but that makes no sense to the question I was asking.
> 
> The reason is this:
> +-----------------------------+      +------------------------+
> | Armada510                   |      |   TDA19988             |
> | LCD controller ---> switch ---------> switch --> processing |
> |   VSYNC/HSYNC               |      |                        |
> +-----------------------------+      +------------------------+
> 
> The issue is that each 'switch' point is capable of inverting the sync
> signal.  If you program both identically then you end up with inversion
> following another inversion.  Which means no inversion.  That's why
> I've found Sebastian's answers to be much less than helpful on this
> point.
> 
> What I have found with the NXP TDA19988 driver is that you need to get
> the input syncs to the TDA19988 set to the correct polarity for the
> TDA19988, which _isn't_ what is advertised in the EDID.  The TDA19988
> then has its own processing internally which places the appropriate
> sync codes onto the output data stream.
> 
> In some cases, getting this wrong shifts the displayed image by a few
> pixels/lines.  In other cases you get no output or invalid output which
> isn't recognised by the connected device.

Right. But I found that using Rob's tda988x driver gives me a full
image on my TV set while with NXP's driver, I had more than 20 pixels
lost on each side (left, right, top and bottom).

	[snip]
> > - module loading (si5351, tda998x)
> > 
> >   As our driver is loaded by the Cubox DT, and as the auxilliary drivers
> >   (external clock, HDMI transmitter) may also be modules, a
> >   synchronization mechanism (inspired by the tegra drm driver) permits
> >   the driver to start when all the other drivers are also started.  
> 
> The lack of Si5351 already gets tested on every cubox boot I do.  That
> causes probe deferal, which allows the driver to properly start when
> it becomes ready.
	[snip]

That's what we have. I added an escape mechanism in case the si5351 is
not present (I was waiting for the driver to be in the kernel). In this
case, after a first -EPROBEDEFER, the LCD works with either AXI or the
LCD PLL (both work fine with my TV set at 1920x1080p).

	[snip]
> > - hardware cursor
> > 
> >   Our driver always proposes the HWC 32 (RGBA 64x64).  
> 
> Hardware cursor support is pretty useless.
> 
> In RGBA mode, it's not 64x64 but you get the choice of either 64x32 or
> 32x64.  This is useless for Xorg's purposes, where it really wants a
> 64x64 cursor.  And the XF86 Xorg backend really wants RGBA for hardware
> cursor, not 2bpp.  So my conclusion is that hardware cursor is not worth
> any effort and I've a good mind to strip that out from my driver (which
> will simplify a few places.)
> 
> I've played with the idea of reducing a RGBA cursor down to 2bpp mode
> where we can fit the required size in, but that doesn't work very well.
> 
> Just because the hardware does something doesn't mean you should write
> code for it! :)

Maybe I did not explain correctly: the colored cursor maybe RGB888 +
transparency (64x64) or full ARGB (64x32 or 32x64). I coded the first
case. And, yes, I better like a hardware cursor: it asks for less
computation, and I get it immediately at graphic starting time!

	[snip]
> > - video overlay
> > 
> >   Same as above: the code is in our driver (overlay plane), but it is
> >   not tested.  
> 
> We as a family, have watched many hours of video on mine. :)

I wrote the drm driver because there was no easy way to use the video
decoding engine with vlc and the Marvell's drivers. Now that the driver
runs, the next step was to extend the 'modesetting' X server module to
handle the overlay planes (I wonder why nobody did it yet). But, if you
already have something running, I'd be glad to get it...

	[snip]
> > What do you think about merging?  
> 
> Yes, I think merging the two together would probably be sane. :)

OK.

The first step is "DT or not DT"? For me, the DT is more flexible
(one or two LCDs, smart panel definition, display controller or not..)
and permits easy inclusion of out of tree drivers as the private VPU
and GPU ones.

-- 
Ken ar c'henta?	|	      ** Breizh ha Linux atav! **
Jef		|		http://moinejf.free.fr/

  reply	other threads:[~2013-05-17 17:40 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-16 19:25 [RFC 0/8] rmk's Dove DRM/TDA19988 Cubox driver Russell King - ARM Linux
2013-05-16 19:25 ` [RFC 1/8] DRM: Add Dove DRM driver Russell King
2013-05-16 19:25 ` [RFC 2/8] drm/i2c: nxp-tda998x: fix EDID reading on TDA19988 devices Russell King
2013-05-16 19:26 ` [RFC 3/8] drm/i2c: nxp-tda998x: ensure VIP output mux is properly set Russell King
2013-05-18  6:56   ` Jean-Francois Moine
2013-05-19 10:30     ` Russell King - ARM Linux
2013-05-16 19:26 ` [RFC 4/8] drm/i2c: nxp-tda998x: fix npix/nline programming Russell King
2013-05-16 19:26 ` [RFC 5/8] drm/i2c: nxp-tda998x: prepare for video input configuration Russell King
2013-05-16 19:27 ` [RFC 6/8] drm/i2c: nxp-tda998x: add video and audio " Russell King
2013-05-22 21:08   ` Rob Clark
2013-05-16 19:27 ` [RFC 7/8] DRM: Dove: add support for drm tda19988 driver Russell King
2013-05-16 19:27 ` [RFC 8/8] DRM: dove: provide a couple of generic slave encoder helpers Russell King
2013-05-17 11:33 ` [RFC 0/8] rmk's Dove DRM/TDA19988 Cubox driver Jean-Francois Moine
2013-05-17 11:58   ` Sebastian Hesselbarth
2013-05-17 12:01   ` Russell King - ARM Linux
2013-05-17 17:40     ` Jean-Francois Moine [this message]
2013-05-17 18:00       ` Russell King - ARM Linux
2013-05-17 18:05         ` Russell King - ARM Linux
2013-05-17 18:57         ` Jean-Francois Moine
2013-05-19  8:59       ` Russell King - ARM Linux
2013-05-20 13:36         ` Alex Deucher
2013-05-20 20:15           ` Russell King - ARM Linux
2013-05-20 20:23             ` Alex Deucher
2013-05-21  6:30               ` Jean-Francois Moine
2013-05-19 11:25   ` Russell King - ARM Linux
     [not found] ` <1368897139-25485-1-git-send-email-sebastian.hesselbarth@gmail.com>
     [not found]   ` <1368897139-25485-3-git-send-email-sebastian.hesselbarth@gmail.com>
2013-05-18 17:33     ` [RFC 2/4] ARM: dove: add video card node for SolidRun CuBox Jean-Francois Moine
2013-05-18 18:33       ` Sebastian Hesselbarth
     [not found]   ` <1368897139-25485-4-git-send-email-sebastian.hesselbarth@gmail.com>
2013-05-18 17:45     ` [RFC 3/4] DRM: add OF support for Dove DRM driver Jean-Francois Moine
2013-05-18 18:20       ` Sebastian Hesselbarth
2013-05-18 19:18         ` Jean-Francois Moine
2013-05-20 10:16           ` Russell King - ARM Linux
2013-05-18 20:46       ` Russell King - ARM Linux
     [not found]   ` <1368897139-25485-5-git-send-email-sebastian.hesselbarth@gmail.com>
2013-05-18 17:46     ` [RFC 4/4] DRM: tda998x: add missing include Jean-Francois Moine
2013-05-18 18:21       ` Sebastian Hesselbarth
2013-05-18 18:23       ` Rob Clark
2013-05-18 18:58         ` Jean-Francois Moine
2013-05-18 19:11           ` Rob Clark
2013-05-18 19:30           ` Sebastian Hesselbarth
2013-05-18 20:26             ` Russell King - ARM Linux
2013-05-18 20:50               ` Sebastian Hesselbarth
2013-05-19  6:01             ` Jean-Francois Moine
2013-05-19  8:30               ` Sebastian Hesselbarth
2013-05-19 16:49                 ` Jean-Francois Moine

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=20130517194023.0c385ea0@armhf \
    --to=moinejf@free.fr \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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;
as well as URLs for NNTP newsgroup(s).