[Letux-kernel] [PATCH 8/8] drm/ingenic: Attach bridge chain to encoders
H. Nikolaus Schaller
hns at goldelico.com
Sat Aug 28 21:09:20 CEST 2021
Hi Paul,
> Am 10.08.2021 um 23:15 schrieb Paul Boddie <paul at boddie.org.uk>:
>
> On Tuesday, 10 August 2021 09:52:36 CEST Paul Cercueil wrote:
>>
>> Le mar., août 10 2021 at 01:17:20 +0200, Paul Boddie <paul at boddie.org.uk> a
> écrit :
>>>
>>> But then the reported error occurs in the DRM driver:
>>>
>>> ingenic-drm 13050000.lcdc0: Unable to init connector
>>> ingenic-drm: probe of 13050000.lcdc0 failed with error -22
>>>
>>> This originates in a call to drm_bridge_connector_init from
>>> ingenic_drm_bind:
>>>
>>> connector = drm_bridge_connector_init(drm, encoder);
>>>
>>> The invoked function iterates over the registered bridges, one of
>>> which seems to be the HDMI peripheral (it has bridge operations defined
>>> identically to those specified in the Synopsys driver), but the type
>>> member of the drm_bridge structure is set to 0
>>> (DRM_MODE_CONNECTOR_Unknown).
>
> Although I had fancy ideas about finding the connector node in the device tree
> and populating the necessary type details on the bridge, I decided to just add
> the following to the Synopsys driver's dw_hdmi_probe function:
>
> hdmi->bridge.type = DRM_MODE_CONNECTOR_HDMIA;
>
> This then lets the above invocation succeed and the Ingenic DRM driver
> initialises. However, I get "Input Not Supported" on my display.
Finally I am back to testing (on top of 5.14-rc7 now) and can confirm the
symptoms and that this line above has a visible influence: I get a green screen.
This seems to indicate that the lcdc is scanning and the hdmi driver core is working.
And there are many drm commit timeouts:
[ 390.947342] [drm:drm_crtc_commit_wait [drm]] *ERROR* flip_done timed out
[ 390.948018] [drm:drm_atomic_helper_wait_for_dependencies [drm_kms_helper]] *ERROR* [CRTC:32:crtc-0] commit wait timed out
[ 401.187362] [drm:drm_crtc_commit_wait [drm]] *ERROR* flip_done timed out
[ 401.188023] [drm:drm_atomic_helper_wait_for_dependencies [drm_kms_helper]] *ERROR* [CONNECTOR:35:HDMI-A-1] commit wait timed out
[ 411.427371] [drm:drm_crtc_commit_wait [drm]] *ERROR* flip_done timed out
[ 411.428029] [drm:drm_atomic_helper_wait_for_dependencies [drm_kms_helper]] *ERROR* [PLANE:31:plane-0] commit wait timed out
[ 411.537372] ------------[ cut here ]------------
Most likely it has something to do with the extended DMA descriptors which I also
had modified as suggested by review.
I tried to fix like Paul C. suggested but with no success. The list of bridge
drivers seems to be empty when calling of_drm_find_bridge() in dw_hdmi_probe().
So the dw-hdmi driver does not find the connector.
The code (fragment) is
ep = of_graph_get_remote_node(dev->of_node, 1, -1);
if (!ep)
return ERR_PTR(-EPROBE_DEFER);
hdmi->next_bridge = of_drm_find_bridge(ep);
of_node_put(ep);
but hdmi->next_bridge == NULL.
So we have to solve two separate issues:
a) no video data (descriptors?)
b) no correct setup of hdmi->bridge.type
But wait - I think I still have to rebase things to v2 of the series of Paul C.
BR,
Nikolaus
More information about the Letux-kernel
mailing list