Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp209381ybh; Thu, 12 Mar 2020 00:15:04 -0700 (PDT) X-Google-Smtp-Source: ADFU+vubaorHv2ghQcVut637t+Tn6utUcmreRW2eCjbNio4cgtKeP2ntQztUT9V0vPZuYedN5Ajb X-Received: by 2002:a9d:2215:: with SMTP id o21mr5046620ota.113.1583997304415; Thu, 12 Mar 2020 00:15:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583997304; cv=none; d=google.com; s=arc-20160816; b=jH1t6EBXxP+qi2bPGw9OrAxne7vaGcS73D7NQVAXWUDLLkLSWgXpUaSHQzHPpWf3rn dpQtMxHoubSN611crdwxKVZm20tvQ4fmDhok3r2Z8Q2SEY26IK9mP3429IwBKCJ11IHY eLqpWd5g6DWgt8U1FASNxf5exBUMz9J7XsoVYg1dd5MSUUCoFmMBxwxlxEQ5dhU/k8SX O9xFdPrqIEmr/Xvg7wXF0wDxSJoep4gFJWNEkhK9/sIlAz/0LPxlTzP4moXkDC/htOgt doXjkApRHK/f5E6dXpjaGuJD7e0LJxCNIrDXmx2xly6OGyJe4jkwd0Q+zyXU+BIgbLir M70w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=fjYERfZUgQqc0nG8FGAu3JPItUIvc/HLycHoB+1dJS8=; b=EW+jiTuan61lEvYW8Jn+UlpPI+GcWuFGpSBijThaJxeAPea5WRsMJw8+PnNdGghK+c mRN0RPwlnesy020MdLusE/Shjiqn3j5IeP1Fwd0k1RpVlPldu3TUpacOMC9x9JlDf2MK S2qsQZ0vVnX8uRyO25XZMKFwSgk9gA1iD3QLQDqMpW4AiyhRnwAI8AkaqkzrjgZUPdVO 1qD8FvmVDKXNZuKTCbUM0ZlP29F37PzTjUQQn+bVkfhTOZriWbuOvkW60TIRD3HJd+KV yF3n34aSSHY5jP7y7UoIT+Xjn/xgQLkt9eWMeCmxMu9yjGp95b8gYz3eGPtMGIXia+SX 2qAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=MAnsAHWY; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b204si1689885oif.69.2020.03.12.00.14.51; Thu, 12 Mar 2020 00:15:04 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=MAnsAHWY; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388051AbgCLHNe (ORCPT + 99 others); Thu, 12 Mar 2020 03:13:34 -0400 Received: from fllv0015.ext.ti.com ([198.47.19.141]:49904 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387957AbgCLHNd (ORCPT ); Thu, 12 Mar 2020 03:13:33 -0400 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 02C7DBoM010246; Thu, 12 Mar 2020 02:13:11 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1583997191; bh=fjYERfZUgQqc0nG8FGAu3JPItUIvc/HLycHoB+1dJS8=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=MAnsAHWYbQnl4E2RuhyzfPrYoPjmkJH9TNu0ubI5w9NKRTidri1yub5+zuWeLobIX iTP0fnFNo6/zLgplDh7cqHidhgLj0RewxcvJKQZLntJz2uvrukxUPIb5Xqk4d0P0HL R9cUaOUohdncf6stuJl910WmUtchTJmg0unByiJc= Received: from DFLE114.ent.ti.com (dfle114.ent.ti.com [10.64.6.35]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 02C7DBFD079960 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 12 Mar 2020 02:13:11 -0500 Received: from DFLE103.ent.ti.com (10.64.6.24) by DFLE114.ent.ti.com (10.64.6.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3; Thu, 12 Mar 2020 02:13:10 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DFLE103.ent.ti.com (10.64.6.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3 via Frontend Transport; Thu, 12 Mar 2020 02:13:10 -0500 Received: from [192.168.2.6] (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id 02C7D6DT060795; Thu, 12 Mar 2020 02:13:07 -0500 Subject: Re: [PATCH v6 2/3] drm: bridge: Add support for Cadence MHDP DPI/DP bridge To: Laurent Pinchart , Yuti Amonkar CC: , , , , , , , , , , , , , , , References: <1582712579-28504-1-git-send-email-yamonkar@cadence.com> <1582712579-28504-3-git-send-email-yamonkar@cadence.com> <20200311222053.GE4863@pendragon.ideasonboard.com> From: Tomi Valkeinen Message-ID: Date: Thu, 12 Mar 2020 09:13:06 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: <20200311222053.GE4863@pendragon.ideasonboard.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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