Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp89222pxa; Mon, 10 Aug 2020 19:46:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwu6YjexTjlSBsoAWS1iMS07aBl2Eoj/RgTsjd8hX7gixrppuRxpFW/JdfEwykaz1QShbqp X-Received: by 2002:a17:906:d8b6:: with SMTP id qc22mr25667114ejb.468.1597113998221; Mon, 10 Aug 2020 19:46:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597113998; cv=none; d=google.com; s=arc-20160816; b=fh2kshI/uJmHS0Vmry3yLXxJ03csXbVfepoiXeAIHcDbetqBo6+MGvPwEA92Za9khz CLR92XFx4k8BbF9pATcBI3aYhiipKkxD9rrohdM1Wt/K/lutOnlmMp5WnFzSYaC3mTM/ tSJ+2SfPCyahsXCPo05QQkKj6+RBC5n2Y2cCnrK7++fbLPdEnHpgOZhJX2KikBxV07zp 4EzugDO2TTnR6+rKwjpAFXKWlb0uD3QqWGTafG2GQAEc8tS+5OFMz/fL9QJEVGi8l64l NJ2YWCoGnUCylJ9zDArDyGD/dO7vPbMAsBDx9YWB2wrECbt+puXctWFh7HU7VdTF6vLP kGJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=rB8EqCYFRMY9Qr1lqbuxD57l/W9rQtnkt0cX0xgM5c8=; b=WCpQymZnXbfbVrsT/D0h6nVqbhKTG8ccxaZQAylF/7znqoMVfRFJNWUmpAyhPIJBKa LMPorEihiAYeJ7kdDOrDceShjw8pzX/9k7p7Xq91Wscl0HYc4uLqFRlYpWxhFYs1pJWt bG3VOYhiwmj4uXKDkfRS++D/gtAyN884vJYMYX61eGvBQBByspA57rL/8G0PXVV7pVmi wlcsE3yjyXG7nGSc9GX02/lz+6WTzWGt/PKJhsD+mNczO8dIckojDoPKxlyJaWsHut+l MR9qYKI1uGk7VTTw3lc4r9YiNcXRi7aW8R72xgWpdfvCB7lSls/Wpi6onKHf63WBIUQb GemQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=AvcnLevq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f1si12631251edc.157.2020.08.10.19.46.15; Mon, 10 Aug 2020 19:46:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=AvcnLevq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728224AbgHKCnY (ORCPT + 99 others); Mon, 10 Aug 2020 22:43:24 -0400 Received: from perceval.ideasonboard.com ([213.167.242.64]:49214 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726831AbgHKCnX (ORCPT ); Mon, 10 Aug 2020 22:43:23 -0400 Received: from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 6460858; Tue, 11 Aug 2020 04:43:21 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1597113801; bh=WW5T77cfFpWObOoCK4Jd1gjvAgx5wXNgpO1aG1KQAGo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=AvcnLevqsm+75glXW8u0IeEaT4/SPDcX+tRt01nszuRleIHWVqP/1zGNKhPdeBtwQ Rl4lNNNYSdi+4OxLFhJ3rzoHDVNBTshZjfwVsj+lNybDvr8CE2mUlW5SH1e3s9zW72 f/j9m4qvpu4MYOpl+jw/rDfGzRp/8Ev4jngdT+BE= Date: Tue, 11 Aug 2020 05:43:08 +0300 From: Laurent Pinchart To: Tomi Valkeinen , daniel@ffwll.ch Cc: Yuti Amonkar , 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 Message-ID: <20200811024308.GE13513@pendragon.ideasonboard.com> References: <1582712579-28504-1-git-send-email-yamonkar@cadence.com> <1582712579-28504-3-git-send-email-yamonkar@cadence.com> <20200311222053.GE4863@pendragon.ideasonboard.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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