From: Tommaso Merciai <tomm.merciai@gmail.com>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Kieram Bingham <kieran.bingham+renesas@ideasonboard.com>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: hints around rcar_lvds.c :)
Date: Tue, 26 Nov 2024 11:15:28 +0100 [thread overview]
Message-ID: <Z0WfwMJVCQOEZM3c@tom-desktop> (raw)
Hi Laurent, All,
Sorry for bothering.
Looking for some feedback :)
I have a similar rcar_lvds.c IP's to handle but in my case:
I have lvds0 and lvds1 that are sharing some common regs (lvds_cmn).
----------------------
| ------------- |
| |lvds_cmn_regs| |
| ------------- |
| |
| ----------- |
| | lvds0_regs | |-----> ch0
| ------------ |
| |
| ----------- |
| | lvds1_regs | |-----> ch1
| ------------ |
----------------------
So I'm checking 2 drm dts/driver architecture:
1st architecture:
- Using a single lvds driver to handle both lvds0 and lvds1.
----------------------
| |
| |
| |
du_lvds0 ------>| |----> ch0_lvds
| lvds_bridge |
| |
| |
du_lvds1 ------>| |----> ch1_lvds
| |
----------------------
Issue:
Problem here is the 1 single link 2ch mode.
lvds0 and lvds1 can drive 2 display with 2 differents fb (fb0 and fb1).
Having a single drm_bridge to drive both channel give me the following issue:
In single link 2ch mode when for the first time the du encoder drm_attach()
the lvds bridge to the encoder(du) all goes fine and fb0 is created correctly.
Then again the du encoder is trying again to drm_attach() the lvds bridge
but this return -EBUSY obviously because is already attached.
Then I think this is not the way to follow because I need 2 drm_bridges
from the same drm drive, and I think this is not correct.
----------
2nd architecture:
- Follow rcar_lvds.c way using 2 nodes for lvds0 and lvds1:
------------
du_lvds0 -----> |lvds0_bridge|----> ch0_lvds
------------
------------
du_lvds1 -----> |lvds1_bridge|----> ch1_lvds
------------
Issue:
I thinks this is an optimal approach but in my case here
the problem is that lvds0 and lvds1 share a set of common registers
some common clocks and common reset:
My plan is to manipulate those common regs (lvds_cmn) using
compatible = "simple-mfd", "syscon"; as follow:
lvds_cmn: lvds-cmn {
compatible = "simple-mfd", "syscon";
reg = <common_regs>;
lvds0: lvds0-encoder {
ports {
#address-cells = <1>;
#size-cells = <0>;
clocks = <&common_clk>, <&dotclok0>, <&phyclock0>;
resets = <&common_rst>;
port@0 {
reg = <0>;
lvds0_in: endpoint {
remote-endpoint = <&du_out_lvds0>;
};
};
port@1 {
reg = <1>;
lvds_ch0: endpoint {
};
};
};
};
lvds1: lvds1-encoder {
ports {
#address-cells = <1>;
#size-cells = <0>;
clocks = <&common_clk>, <&dotclok1>, <&phyclock1>;
resets = <&common_rst>;
port@0 {
reg = <0>;
lvds1_in: endpoint {
remote-endpoint = <&du_out_lvds1>;
};
};
port@1 {
reg = <1>;
lvds_ch1: endpoint {
};
};
};
};
};
----------
I'm asking to find the best way to represent those IP's.
What do you think?
Any hints/tips would be nice.
Thanks in advance.
Thanks & Regards,
Tommaso
next reply other threads:[~2024-11-26 10:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-26 10:15 Tommaso Merciai [this message]
2024-11-26 10:23 ` hints around rcar_lvds.c :) Biju Das
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=Z0WfwMJVCQOEZM3c@tom-desktop \
--to=tomm.merciai@gmail.com \
--cc=airlied@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=kieran.bingham+renesas@ideasonboard.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=simona@ffwll.ch \
/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