All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Tomi Valkeinen <tomi.valkeinen@ti.com>, daniel@ffwll.ch
Cc: Yuti Amonkar <yamonkar@cadence.com>,
	linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
	devicetree@vger.kernel.org, robh+dt@kernel.org,
	maxime@cerno.tech, airlied@linux.ie, mark.rutland@arm.com,
	a.hajda@samsung.com, narmstrong@baylibre.com, jonas@kwiboo.se,
	jernej.skrabec@siol.net, praneeth@ti.com, jsarha@ti.com,
	mparab@cadence.com, sjakhade@cadence.com
Subject: Re: [PATCH v6 2/3] drm: bridge: Add support for Cadence MHDP DPI/DP bridge
Date: Tue, 11 Aug 2020 05:43:08 +0300	[thread overview]
Message-ID: <20200811024308.GE13513@pendragon.ideasonboard.com> (raw)
In-Reply-To: <ef6a6e31-425f-c402-83ab-886221b4a0c3@ti.com>

Hi Tomi, Daniel,

On Thu, Mar 12, 2020 at 09:13:06AM +0200, Tomi Valkeinen wrote:
> 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.

These seem to me to be deficiencies in the graphics stack. We don't have
to solve them now, but I'm curious to know if anyone would have ideas on
how this should ideally be addressed. Daniel, what do you think ?

-- 
Regards,

Laurent Pinchart

WARNING: multiple messages have this Message-ID (diff)
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Tomi Valkeinen <tomi.valkeinen@ti.com>, daniel@ffwll.ch
Cc: mark.rutland@arm.com, devicetree@vger.kernel.org,
	jernej.skrabec@siol.net, Yuti Amonkar <yamonkar@cadence.com>,
	narmstrong@baylibre.com, airlied@linux.ie, jonas@kwiboo.se,
	jsarha@ti.com, linux-kernel@vger.kernel.org,
	dri-devel@lists.freedesktop.org, a.hajda@samsung.com,
	robh+dt@kernel.org, maxime@cerno.tech, praneeth@ti.com,
	sjakhade@cadence.com, mparab@cadence.com
Subject: Re: [PATCH v6 2/3] drm: bridge: Add support for Cadence MHDP DPI/DP bridge
Date: Tue, 11 Aug 2020 05:43:08 +0300	[thread overview]
Message-ID: <20200811024308.GE13513@pendragon.ideasonboard.com> (raw)
In-Reply-To: <ef6a6e31-425f-c402-83ab-886221b4a0c3@ti.com>

Hi Tomi, Daniel,

On Thu, Mar 12, 2020 at 09:13:06AM +0200, Tomi Valkeinen wrote:
> 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.

These seem to me to be deficiencies in the graphics stack. We don't have
to solve them now, but I'm curious to know if anyone would have ideas on
how this should ideally be addressed. Daniel, what do you think ?

-- 
Regards,

Laurent Pinchart
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2020-08-11  2:43 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-26 10:22 [PATCH v6 0/3] drm: Add support for Cadence MHDP DPI/DP bridge and J721E wrapper Yuti Amonkar
2020-02-26 10:22 ` Yuti Amonkar
2020-02-26 10:22 ` [PATCH v6 1/3] dt-bindings: drm/bridge: Document Cadence MHDP bridge bindings Yuti Amonkar
2020-02-26 10:22   ` Yuti Amonkar
2020-02-26 10:22 ` [PATCH v6 2/3] drm: bridge: Add support for Cadence MHDP DPI/DP bridge Yuti Amonkar
2020-02-26 10:22   ` Yuti Amonkar
2020-03-11 22:20   ` Laurent Pinchart
2020-03-11 22:20     ` Laurent Pinchart
2020-03-12  7:13     ` Tomi Valkeinen
2020-03-12  7:13       ` Tomi Valkeinen
2020-08-11  2:43       ` Laurent Pinchart [this message]
2020-08-11  2:43         ` Laurent Pinchart
2020-05-01  7:32     ` Yuti Suresh Amonkar
2020-05-01  7:32       ` Yuti Suresh Amonkar
2020-08-11  0:00       ` Laurent Pinchart
2020-08-11  0:00         ` Laurent Pinchart
2020-08-26 15:38         ` Yuti Suresh Amonkar
2020-08-26 15:38           ` Yuti Suresh Amonkar
2020-02-26 10:22 ` [PATCH v6 3/3] drm: bridge: cdns-mhdp: add j721e wrapper Yuti Amonkar
2020-02-26 10:22   ` Yuti Amonkar
2020-03-11 20:52   ` Laurent Pinchart
2020-03-11 20:52     ` Laurent Pinchart
2020-03-12  7:01     ` Tomi Valkeinen
2020-03-12  7:01       ` Tomi Valkeinen

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=20200811024308.GE13513@pendragon.ideasonboard.com \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=a.hajda@samsung.com \
    --cc=airlied@linux.ie \
    --cc=daniel@ffwll.ch \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jernej.skrabec@siol.net \
    --cc=jonas@kwiboo.se \
    --cc=jsarha@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=maxime@cerno.tech \
    --cc=mparab@cadence.com \
    --cc=narmstrong@baylibre.com \
    --cc=praneeth@ti.com \
    --cc=robh+dt@kernel.org \
    --cc=sjakhade@cadence.com \
    --cc=tomi.valkeinen@ti.com \
    --cc=yamonkar@cadence.com \
    /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.