Re: [PATCH v6 2/3] drm: bridge: Add support for Cadence MHDP DPI/DP bridge

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Laurent,

On 12/03/2020 00:20, Laurent Pinchart wrote:
+	ret = load_firmware(mhdp);
+	if (ret)
+		goto phy_exit;
+
+	drm_bridge_add(&mhdp->bridge);
What if someone starts using the bridge before the firmware is
operational ? It seems that you should delay bridge registration until
the firmware is loaded. It may make it possible to remove
bridge_attached and solve the problem you mention in mhdp_fw_cb().

Handling the fw has been a bit of a pain... This is what we came up with to support all the combinations (built-in/module, fw-userspace-helper/direct load, single-output/multiple-outputs).

The idea is that when the driver is loaded and probed (with or without fw), the DP is "ready". If we don't have fw yet, everything looks fine, but the connector stays in disconnected state. When we get the fw, connector will get connected (only if there's a cable connected, of course).

If we register the bridge only when we have fw, two things can happen:

- If we get the fw only rather late (in case userspace fw helper), a userspace app (e.g. weston) could already have been started, and failed due to there being no DRM card.

- If we have two displays from the same display controller, say, DP and HDMI, the HDMI will only be available when the DP is available. If the DP fw, for some reason, cannot be loaded, we never get HDMI.

 Tomi

--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux