On Mon, Mar 03, 2025 at 01:02:44PM +0800, Yongbang Shi wrote:
Yes.On Sat, 1 Mar 2025 at 11:54, Yongbang Shi <shiyongbang@xxxxxxxxxx> wrote:Okay, Thank you for your guidance. So I need to disconnect VGA when I get the HPD (plugged in) , then
I think registering a single CRTC is a correct way. Then it is logicalOn Sat, Mar 01, 2025 at 04:45:40PM +0800, Yongbang Shi wrote:Our hardware cannot support two outputs with different timing, so I used the one crtc and one plane that DP and VGA share. And just add a new DP connector
Unless your hardware can not manage two outputs at the same time, no,On Thu, Feb 27, 2025 at 09:46:10PM +0800, Yongbang Shi wrote:Thank you for your advice!
You can go to the display settings in GDM. It would be interesting toOn Tue, Feb 25, 2025 at 09:57:17PM +0800, Yongbang Shi wrote:Thanks for your answering. I'm not very good understanding about userspace in framework. In my opinion, when I call
- Is HPD even properly delivered to userspace? What kind of compsitorOn Mon, 24 Feb 2025 at 16:03, Yongbang Shi <shiyongbang@xxxxxxxxxx> wrote:Right, I knew it. When I insmode my driver firstly (or restart display service), it will call disable, modeset and enable,
It should be userspace, who triggers the enable/disable (or it shouldOn Sat, Feb 22, 2025 at 06:35:48PM +0800, Yongbang Shi wrote:Hi Dmitry,
Why? The link training and mode programming should happen duringThanks for your asking, there are cfg/reset process when the connector 's pluging in/out.+static int hibmc_dp_hpd_event(struct drm_client_dev *client)If I understand this correctly, you are using a separate drm_client to
+{
+ struct hibmc_dp *dp = container_of(client, struct hibmc_dp, client);
+ struct hibmc_drm_private *priv = to_hibmc_drm_private(dp->drm_dev);
+ struct drm_display_mode *mode = &priv->crtc.state->adjusted_mode;
+ int ret;
+
+ if (dp->hpd_status) {
+ hibmc_dp_hpd_cfg(&priv->dp);
+ ret = hibmc_dp_prepare(dp, mode);
+ if (ret)
+ return ret;
+
+ hibmc_dp_display_en(dp, true);
+ } else {
+ hibmc_dp_display_en(dp, false);
+ hibmc_dp_reset_link(&priv->dp);
+ }
enable and disable the link & display. Why is it necessary? Existing
drm_clients and userspace compositors use drm framework, they should be
able to turn the display on and off as required.
We want to cfg DP registers again when the connector changes. Not only dp link training, but also cfg
the different video modes into DP registers.
pre_enable / enable stage (legacy or atomic).
Right, that's what I'm curious about. It won't call encoder enble/disable functions when I triggered HPD.
And I'm sure the drm_connector_helper_hpd_irq_event() is called. So I add a drm_client for it.I
be the in-kernel fbdev / fbcon, which interface through the generic
drm_fbdev client).
by user, but it won't call when HPD triggered .
are you using? Is .detect working properly and reporting a correct
plug-in state?
this drm_connector_helper_hpd_irq_event(), the HPD will deliver to userspace.
I use Xorg, and the display service is GDM.
The .detect is called and the getting modes info is correct.
I find that it would only trigger(disable, modeset and enable), when I changed resolutions, restart display service and insmod driver.
observe if it notes the second monitor or not. Last, but not least, you
can use a simple tool like 'xrandr' under your XOrg session to set the
display resolution.
Right, there are DP and VGA two monitors. I tried to totally remove the vga connector in driver, the problem is gone.
So do I need to clear the vga connector, if dp is plugged in?
you don't have to. Just check how it behaves on x86 systems. Ideally
your driver should have the same behaviour.
with a encoder, just like the previous VGA's code logic. But the HPD problem makes me feel confused, should I change the framwork structure to slove this problem?
that there is no mode set on the DP when you connect it. The userspace
can not output any data. However if you disconnect VGA and connect DP
then it should become active and should output your desktop
environment.
userapce will active and enanble DP, right?
And also, I will check whether this driver works good on the x86 server. Right now, I'm testing on arm64 server.
Okay!And also, I used xrandr to set modes after 'startx'. Changing resolutions works,That's a separate topic, most likely related to timing or to some other
but there are errs when set some low resolutions.
issues. You can fix that separately (but please do, switching modes
should work).