All of lore.kernel.org
 help / color / mirror / Atom feed
From: Neil Armstrong <narmstrong@baylibre.com>
To: Paul Boddie <paul@boddie.org.uk>
Cc: Jernej Skrabec <jernej.skrabec@siol.net>,
	dri-devel@lists.freedesktop.org, Jonas Karlman <jonas@kwiboo.se>
Subject: Re: drm/bridge: Synopsys DW-HDMI bridge driver for the Ingenic JZ4780 (was Re: Specialising the Synopsys DW-HDMI bridge driver for the Ingenic JZ4780)
Date: Mon, 6 Jul 2020 14:12:24 +0200	[thread overview]
Message-ID: <32cb6f50-1fe1-1484-0512-04590882d35a@baylibre.com> (raw)
In-Reply-To: <7086465.UhkgK7rEtT@jason>

Hi,

On 06/07/2020 01:57, Paul Boddie wrote:
> Hello,
> 
> On Friday, 15 May 2020 09:43:54 CEST Neil Armstrong wrote:
>>
>> On 15/05/2020 00:04, Paul Boddie wrote:
>>>
>>> Well, I've done this but I probably need to know what to look for. One
>>> thing that appears regardless of this debugging output being enabled is a
>>> problem with the vertical blanking functionality:
>>>
>>> WARNING: CPU: 1 PID: 396 at drivers/gpu/drm/drm_atomic_helper.c:1457
>>> drm_atomic_helper_wait_for_vblanks+0x1ec/0x25c
>>> [CRTC:32:crtc-0] vblank wait timed out
>>
>> This means the CRTC didn't start, usually because the Pixel clock didn't go
>> through the pipeline to the pixel generator, thus not generating
>> vblank/vsync interrupts.
>>
>> You may check if there is not muxes to select the clock source/pixel
>> destination.
> 
> It has obviously been a while since I asked about the DW-HDMI functionality. 
> Since then, I have verified the initialisation of the Ingenic JZ4780 LCD 
> controller and the Synopsys HDMI peripheral in the L4 Runtime Environment 
> (running on the Fiasco.OC microkernel), producing a picture and handling 
> display interrupts.
> 
> Having brought the necessary changes back to the Ingenic DRM driver, I can 
> make the driver activate the LCD controller and produce vertical blank 
> interrupts, and these are handled and counted in /proc/interrupts. The 
> previous errors about timeouts are now gone.
> 
> However, the DRM driver can only be made to start if I set the bus format in 
> dw_hdmi_bridge_attach:
> 
>   u32 bus_format[] = { MEDIA_BUS_FMT_RGB888_1X24 };
>   ...
>   (&connector->display_info,
>                                    bus_format, ARRAY_SIZE(bus_format));
> 
> Without this, the DRM driver will test for a bus format on the connector's 
> display_info structure in ingenic_drm_encoder_atomic_check and return EINVAL. 
> There have previously been indications that this should not need to be done, 
> but I see that other drivers do similar things (for example, ti-tfp410.c).

I think this is specific to the ingenic DRM driver, so yeah it may be needed in your case.

> 
> It also seems to be appropriate to set the input_bus_format on the platform-
> specific HDMI driver; otherwise, I doubt that appropriate bus encodings will 
> be chosen in the Synopsys driver.

It does but when not provided, it doesn't use it.

It's handled in drm_atomic_bridge_chain_select_bus_fmts() :
	if (conn->display_info.num_bus_formats &&
		    conn->display_info.bus_formats)
		out_bus_fmts[0] = conn->display_info.bus_formats[0];
	else
		out_bus_fmts[0] = MEDIA_BUS_FMT_FIXED;

> 
> [...]
> 
>>> Attempting to set a mode using...
>>>
>>> modetest -D /dev/dri/card0 -M ingenic-drm -s 34@32:1280x1024-60.02
>>>
>>> ...yields the following:
>>>
>>> failed to set mode: Permission denied
>>> setting mode 1280x1024-60.02Hz@XR24 on connectors 34, crtc 32
>>
>> This is weird, the command line is ok, is it the same for all modes ?
> 
> Testing against 5.8-rc3 with the above changes seems to have moved the needle 
> slightly. Although I still get "Input not supported" from my monitor, running 
> modetest now gives a different error:
> 
> modetest -D /dev/dri/card0 -M ingenic-drm -s 34@32:1280x1024-60.02
> 
> ...now yields this:
> 
> setting mode 1280x1024-60.02Hz@XR24 on connectors 34, crtc 32
> failed to set gamma: Invalid argument

This is because you don't provide the gamma setup ioctl, it's not a fatal error at all.
It should be warning since it's optional.

Did you check all modes ?

> 
> There also seems to be a card1, but I get the same result with that, and they 
> both seem to produce similar output with modetest without the -s option.
> 
> Anyway, progress is rather slow trying to figure out the obstruction here, so 
> any advice would still be appreciated.
> 
> Thanks in advance,
> 
> Paul
> 
> 

Neil
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2020-07-06 12:12 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-12 19:37 Specialising the Synopsys DW-HDMI bridge driver for the Ingenic JZ4780 Paul Boddie
2020-05-13  7:37 ` drm/bridge: Synopsys DW-HDMI bridge driver for the Ingenic JZ4780 (was Re: Specialising the Synopsys DW-HDMI bridge driver for the Ingenic JZ4780) Neil Armstrong
2020-05-13 21:18   ` Paul Boddie
2020-05-14 22:04   ` Paul Boddie
2020-05-15  7:43     ` Neil Armstrong
2020-05-16 17:01       ` Paul Boddie
2020-07-05 23:57       ` Paul Boddie
2020-07-06 12:12         ` Neil Armstrong [this message]
2020-07-06 20:55           ` Paul Boddie
2020-08-19 10:21             ` Ezequiel Garcia
2020-08-19 16:22               ` Paul Boddie
2020-08-19 18:49               ` H. Nikolaus Schaller
2020-08-19 22:26                 ` Ezequiel Garcia
2020-08-20  8:19                   ` H. Nikolaus Schaller
2020-08-20 22:49                     ` Paul Boddie
2020-08-21 13:32                       ` Ezequiel Garcia
2020-08-21 22:11                         ` Paul Boddie
2020-08-21 22:24                           ` Paul Cercueil
2020-08-24 13:46                             ` Ezequiel Garcia
2020-08-24 16:04                               ` H. Nikolaus Schaller
2020-08-24 17:38                                 ` Ezequiel Garcia
2020-08-24 21:11                                   ` Paul Cercueil
2020-08-27  7:21                                   ` H. Nikolaus Schaller
2020-09-10  7:53                                     ` H. Nikolaus Schaller
2020-09-10 12:14                                       ` Ezequiel Garcia
2020-09-10 13:48                                         ` H. Nikolaus Schaller

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=32cb6f50-1fe1-1484-0512-04590882d35a@baylibre.com \
    --to=narmstrong@baylibre.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jernej.skrabec@siol.net \
    --cc=jonas@kwiboo.se \
    --cc=paul@boddie.org.uk \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.