mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Neil Armstrong <narmstrong@baylibre.com>
To: Dmitry Osipenko <digetx@gmail.com>,
	andrzej.hajda@intel.com, robert.foss@linaro.org,
	Linus Walleij <linus.walleij@linaro.org>,
	Rob Herring <robh+dt@kernel.org>
Cc: jernej.skrabec@gmail.com, jonas@kwiboo.se,
	linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
	Laurent.pinchart@ideasonboard.com
Subject: Re: [PATCH] drm/bridge: sii902x: add support for DRM_BRIDGE_ATTACH_NO_CONNECTOR
Date: Wed, 17 Aug 2022 15:31:00 +0200	[thread overview]
Message-ID: <3725619d-72c5-5c9d-513b-80bbc727dd07@baylibre.com> (raw)
In-Reply-To: <5a1df5ce-a497-760b-8e2c-130a0e659c0b@gmail.com>

On 15/08/2022 02:15, Dmitry Osipenko wrote:
> 08.08.2022 12:51, Neil Armstrong пишет:
>> On 08/08/2022 11:15, Neil Armstrong wrote:
>>> Hi Dmitry,
>>>
>>> On 31/07/2022 22:07, Dmitry Osipenko wrote:
>>>> 13.01.2022 17:43, Neil Armstrong пишет:
>>>>> This adds support for DRM_BRIDGE_ATTACH_NO_CONNECTOR by adding the
>>>>> bridge get_edid() and detect() callbacks after refactoring the
>>>>> connector
>>>>> get_modes() and connector_detect() callbacks.
>>>>>
>>>>> In order to keep the bridge working, extra code in get_modes() has been
>>>>> moved to more logical places.
>>>>>
>>>>> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
>>>>> ---
>>>>>    drivers/gpu/drm/bridge/sii902x.c | 129
>>>>> ++++++++++++++++++++++++-------
>>>
>>> 1 file changed, 99 insertions(+), 30 deletions(-)
>>>>>
>>>>> diff --git a/drivers/gpu/drm/bridge/sii902x.c
>>>>> b/drivers/gpu/drm/bridge/sii902x.c
>>>>> index 89558e581530..65549fbfdc87 100644
>>>>> --- a/drivers/gpu/drm/bridge/sii902x.c
>>>>> +++ b/drivers/gpu/drm/bridge/sii902x.c
>>
>> [...]
>>
>>>>>        }
>>>>> +    endpoint = of_graph_get_endpoint_by_regs(dev->of_node, 1, -1);
>>>>> +    if (endpoint) {
>>>>> +        struct device_node *remote =
>>>>> of_graph_get_remote_port_parent(endpoint);
>>>>> +
>>>>> +        of_node_put(endpoint);
>>>>> +        if (!remote) {
>>>>> +            dev_err(dev, "Endpoint in port@1 unconnected\n");
>>>>> +            return -ENODEV;
>>>>> +        }
>>>>> +
>>>>> +        if (!of_device_is_available(remote)) {
>>>>> +            dev_err(dev, "port@1 remote device is disabled\n");
>>>>> +            of_node_put(remote);
>>>>> +            return -ENODEV;
>>>>> +        }
>>>>> +
>>>>> +        sii902x->next_bridge = of_drm_find_bridge(remote);
>>>>> +        of_node_put(remote);
>>>>> +        if (!sii902x->next_bridge)
>>>>> +            return -EPROBE_DEFER;
>>>>
>>>> Hi,
>>>>
>>>> This patch broke ARM/QEMU vexpress display because of_drm_find_bridge()
>>>> always fail with -EPROBE_DEFER. Reverting this patch returns display
>>>> back. Please fix or revert, thanks in advance.
>>>
>>> Can you share a QEMU cmdline to reproduce ?
>>
>> Actually the vexpress DT has multiple input ports instead of a single
>> input port at @0
>> and an output port at @1 like documented in the bindings:
>>
>> vexpress-v2m.dtsi#L303-L307:
>> ports {
>>      #address-cells = <1>;
>>      #size-cells = <0>;
>>
>>      /*
>>       * Both the core tile and the motherboard routes their output
>>       * pads to this transmitter. The motherboard system controller
>>       * can select one of them as input using a mux register in
>>       * "arm,vexpress-muxfpga". The Vexpress with the CA9 core tile is
>>       * the only platform with this specific set-up.
>>       */
>>      port@0 {
>>          reg = <0>;
>>          dvi_bridge_in_ct: endpoint {
>>              remote-endpoint = <&clcd_pads_ct>;
>>          };
>>      };
>>      port@1 {
>>          reg = <1>;
>>          dvi_bridge_in_mb: endpoint {
>>              remote-endpoint = <&clcd_pads_mb>;
>>          };
>>      };
>> };
>>
>> bindings:
>>    ports:
>>      $ref: /schemas/graph.yaml#/properties/ports
>>
>>      properties:
>>        port@0:
>>          $ref: /schemas/graph.yaml#/properties/port
>>          description: Parallel RGB input port
>>
>>        port@1:
>>          $ref: /schemas/graph.yaml#/properties/port
>>          description: HDMI output port
>>
>>        port@3:
>>          $ref: /schemas/graph.yaml#/properties/port
>>          description: Sound input port
>>
>> The patch is conform to the bindings, the DT was working but is actually
>> not valid.
> 
> I haven't looked closely at how to fix this properly, but if we can fix
> it using of_machine_is_compatible("arm,vexpress") workaround in the
> driver, then it will be good enough at least as a temporal fix, IMO.

If other maintainers are ok with that, it can be temporary fix until the DT gets fixed.

Neil


  reply	other threads:[~2022-08-17 13:33 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-13 14:43 Neil Armstrong
2022-01-17  9:53 ` Robert Foss
2022-07-31 20:07 ` Dmitry Osipenko
2022-08-08  9:15   ` Neil Armstrong
2022-08-08  9:51     ` Neil Armstrong
2022-08-15  0:15       ` Dmitry Osipenko
2022-08-17 13:31         ` Neil Armstrong [this message]
2022-08-25 12:48           ` Linus Walleij
2022-08-29 13:36             ` Neil Armstrong
2022-08-31 12:34               ` Linus Walleij
2022-08-15  0:18     ` Dmitry Osipenko

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=3725619d-72c5-5c9d-513b-80bbc727dd07@baylibre.com \
    --to=narmstrong@baylibre.com \
    --cc=Laurent.pinchart@ideasonboard.com \
    --cc=andrzej.hajda@intel.com \
    --cc=digetx@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jernej.skrabec@gmail.com \
    --cc=jonas@kwiboo.se \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robert.foss@linaro.org \
    --cc=robh+dt@kernel.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

all inboxes | Powered by JetHome®