All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jagan Teki <jagan@amarulasolutions.com>
To: Alexander Stein <alexander.stein@ew.tq-group.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: RFC: DSI/DRM multiplexer bridge
Date: Wed, 5 Apr 2023 20:09:07 +0530	[thread overview]
Message-ID: <CAMty3ZAQyADGLVcB13qJdEy_BiZEKpyDfCr9QrM-ucFLFPZLcw@mail.gmail.com> (raw)
In-Reply-To: <2991779.e9J7NaK4W3@steina-w>

On Wed, Apr 5, 2023 at 7:39 PM Alexander Stein
<alexander.stein@ew.tq-group.com> wrote:
>
> Hi,
>
> my platform has a DIP switch controlled multiplexer for MIPI DSI output
> signals. One output has a TI SN65DSI84 (LVDS) and the other output has a TI
> SN65DSI86 (eDP) attached to it. The Multiplexer status can be read back from a
> GPIO. The GPIO is also IRQ capable, so it would be possible to support hotplug
> additionally later on.

I have this requirement a year back [1] but my design has i.mx8mq DSI
outputs to SN65DSI84(LVDS) and ADV7533 (HDMI) and GPIO has muxed as
IRQ in order to find the bridge selection. (not confused with HDMI
HPD).

>
> My initial idea was to create a DRM multiplexer bridge driver which (depending
> on the input GPIO) allows only one output to be enabled. Unfortunately ti-
> sn65dsi86.c driver expects a DSI host on remote node 0 (see ti_sn_attach_host
> and ti_sn_bridge_parse_dsi_host), so it does not work. ti-sn65dsi83.c just
> requires a drm_bridge.

Yes, we need to have a finite amount of pipeline changes. assuming
that your mux bridge sits between DSI to Output interfaces the
proposed mux bridge selects which pipeline.

>
> What is the best approach for this? I currently see two approaches:
> * Create an explicit DSI/DRM multiplexer bridge driver which registers itself
> as DSI host
> * Create a DRM multiplexer bridge (only). But this needs to remove the DSI
> device registration from ti-sn65dsi86.c

Based on my experience, having a muxed bridge between in and out would
be proper in order to satisfy the pipeline as well as the design. That
mux bridge has to be a normal bridge doesn't aware of DSI or any other
interface like one of the submissions has done in the recent mailing
list. [2] Things would be complicated when we switch the outputs but
we still use normal static switching of outputs in a proper way.

>
> I am aware that DSI support is suboptimal, so I'm not sure which approach on
> the TI bridge drivers is the correct one and needs to be considered as given.
> Any ideas?

I did implement some complicated things of switching outputs at
runtime but the idea of the switching pipelines would be similar if
you want to implement it in a normal static way. Here are some details
and a demo of how those been worked. [3] [4]

[1] https://lore.kernel.org/all/CAMty3ZD7eFi4o7ZXNtjShoLd5yj3wn85Fm6ZNL89=QpWj44KPw@mail.gmail.com/T/
[2] https://patchwork.kernel.org/project/dri-devel/patch/20230218111712.2380225-6-treapking@chromium.org/
[3] https://indico.freedesktop.org/event/2/contributions/76/
[4] https://www.youtube.com/watch?v=PoYdP9fPn-4&t=624s

Thanks,
Jagan.

  reply	other threads:[~2023-04-05 14:39 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-05 14:09 RFC: DSI/DRM multiplexer bridge Alexander Stein
2023-04-05 14:39 ` Jagan Teki [this message]
2023-04-06  8:33   ` Alexander Stein
2023-04-06  8:37     ` Daniel Vetter
2023-04-06  9:55       ` Jagan Teki
2023-04-11  7:47         ` Alexander Stein
2023-04-12  6:22           ` Jagan Teki

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=CAMty3ZAQyADGLVcB13qJdEy_BiZEKpyDfCr9QrM-ucFLFPZLcw@mail.gmail.com \
    --to=jagan@amarulasolutions.com \
    --cc=alexander.stein@ew.tq-group.com \
    --cc=dri-devel@lists.freedesktop.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 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.