From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 44CD8C433E0 for ; Thu, 9 Jul 2020 07:34:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1F3B120775 for ; Thu, 9 Jul 2020 07:34:05 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=cerno.tech header.i=@cerno.tech header.b="m9I1Ree4"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="F9FWqgDd" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726575AbgGIHeD (ORCPT ); Thu, 9 Jul 2020 03:34:03 -0400 Received: from new1-smtp.messagingengine.com ([66.111.4.221]:55119 "EHLO new1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726163AbgGIHeD (ORCPT ); Thu, 9 Jul 2020 03:34:03 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailnew.nyi.internal (Postfix) with ESMTP id 41183580381; Thu, 9 Jul 2020 03:34:02 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Thu, 09 Jul 2020 03:34:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:content-transfer-encoding:in-reply-to; s=fm3; bh=k VMfsBuCWfBPkcg9196Rz8HEh2r0kWo4fJ6CfQIqUIM=; b=m9I1Ree4S2pglm4Ur b6OO0a0jzQi+C9PL2IyFc3YdLO2xZ0Va2GNAPwuTjSnB5MzQkUGJY+Vf/voB+101 F8J6bognpsuD4t0qdQeIlsA4BHWrqrTQyet/X+9q4WZ59iQ1FglAl6NGpXiLjQsI 0PcrOEB1nJ0Nnzb6d8yeJV9+hbbTj/YOudpN8Nf807uCoK7rUw/GXxVNsFXV5Hoo bBt15eMOyaakFj34JUyjqr06GCKdfiNr0AGWKYJB4wm2BuFGtbC9QacABR7eIv6V EHmmgjo5CrvydqbqwXg8Gnj2E1ekjLjKeQPw7kMjrsj12a0TuZcRg0psDKibqo+Q 8oiVA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=kVMfsBuCWfBPkcg9196Rz8HEh2r0kWo4fJ6CfQIqU IM=; b=F9FWqgDdlID46ixtQZPcmdSyRXRvBI0Dsyg6Qgj/sKe1fASppZQftudAh f4Rce75Q27x0e47sgzYeu0ClQi7U/Woekw3R2r1qm/27YVhLlVwPegQCw9bJjXLF 1NnJhI5jDKo1Q5Qiurigdt+AjO91MDNn4H6OJPamXboSAXU/uetpMlXC+vQlESwt iQYL2q2LvcWTTGHvRGh149Cx2nPE3qa0qrBc8FlP/w80o8sRVdY9q0f/2gyfudmu TR9E4fewrYIHhyFOD0oe2cS1XVN2aKtpQStC6e1Q2QKvB5DaxRZlEBug3VvWIhDj 7CWNbaWSeL+1K8hujx615CSKO5xfQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedrudekgdduvdefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtugfgjgesthhqredttddtvdenucfhrhhomhepofgrgihi mhgvucftihhprghrugcuoehmrgigihhmvgestggvrhhnohdrthgvtghhqeenucggtffrrg htthgvrhhnpefgjeettdejgffgffdvteeutdehtdehgeehueetkeefgefhtdetjeekledu gedvudenucfkphepledtrdekledrieekrdejieenucevlhhushhtvghrufhiiigvpedtne curfgrrhgrmhepmhgrihhlfhhrohhmpehmrgigihhmvgestggvrhhnohdrthgvtghh X-ME-Proxy: Received: from localhost (lfbn-tou-1-1502-76.w90-89.abo.wanadoo.fr [90.89.68.76]) by mail.messagingengine.com (Postfix) with ESMTPA id 36D2C3280060; Thu, 9 Jul 2020 03:34:01 -0400 (EDT) Date: Thu, 9 Jul 2020 09:33:58 +0200 From: Maxime Ripard To: Eric Anholt Cc: Nicolas Saenz Julienne , DRI Development , linux-rpi-kernel@lists.infradead.org, bcm-kernel-feedback-list@broadcom.com, Linux ARM , LKML , Dave Stevenson , Tim Gover , Phil Elwell , Andrzej Hajda Subject: Re: [PATCH] drm/vc4: dsi: Only register our component once a DSI device is attached Message-ID: <20200709073358.zeeczn6253na36l6@gilmour.lan> References: <20200707101912.571531-1-maxime@cerno.tech> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Eric, On Tue, Jul 07, 2020 at 09:48:45AM -0700, Eric Anholt wrote: > On Tue, Jul 7, 2020 at 3:26 AM Maxime Ripard wrote: > > > > If the DSI driver is the last to probe, component_add will try to run a= ll > > the bind callbacks straight away and return the error code. > > > > However, since we depend on a power domain, we're pretty much guarantee= d to > > be in that case on the BCM2711, and are just lucky on the previous SoCs > > since the v3d also depends on that power domain and is further in the p= robe > > order. > > > > In that case, the DSI host will not stick around in the system: the DSI > > bind callback will be executed, will not find any DSI device attached a= nd > > will return EPROBE_DEFER, and we will then remove the DSI host and ask = to > > be probed later on. > > > > But since that host doesn't stick around, DSI devices like the Raspberr= yPi > > touchscreen whose probe is not linked to the DSI host (unlike the usual= DSI > > devices that will be probed through the call to mipi_dsi_host_register) > > cannot attach to the DSI host, and we thus end up in a situation where = the > > DSI host cannot probe because the panel hasn't probed yet, and the panel > > cannot probe because the DSI host hasn't yet. > > > > In order to break this cycle, let's wait until there's a DSI device that > > attaches to the DSI host to register the component and allow to progress > > further. > > > > Suggested-by: Andrzej Hajda > > Signed-off-by: Maxime Ripard >=20 > I feel like I've written this patch before, but I've thankfully > forgotten most of my battle with DSI probing. As long as this still > lets vc4 probe in the absence of a DSI panel in the DT as well, then > this is enthusiastically acked. I'm not really sure what you mean by that, did you mean vc4 has to probe when the DSI controller is enabled but there's no panel described, or it has to probe when the DSI controller is disabled? Maxime From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5E38CC433E0 for ; Thu, 9 Jul 2020 07:35:31 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2AFD0206A1 for ; Thu, 9 Jul 2020 07:35:31 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="wJpuISmw"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=cerno.tech header.i=@cerno.tech header.b="m9I1Ree4"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="F9FWqgDd" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2AFD0206A1 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=cerno.tech Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=fgeNPndOpMPxj5LpSSBwCSAfdPhTk7aCkyy6rfAkf44=; b=wJpuISmwZ2GQvM0x7rsJ5DJBr DdP1zLllUzK6v/dcFD1ASgJRhUSvS2c41JwDiUmpewoUbyPx1m5azueQwRQiLmXI3HCyoT3/YwRID jY1qnjoFP1ijWx3/lLxm6otn4gtVIUUvB82xO3HMlkjFqLlSODzr3AijmStVVLMXx6r1ILKf5ywZp 1YjAgGDJAtQ8jlaI4RG81vck/aUqW1k8EOd6dgQJwNYcy5EqFKLGZFCUlTvxG14xn/NBZYHjP7k4n bCEAkwoNQIOcAmRkUgPT+bWYeaNUKWiAztZmlH0llXCDW1/ZMQPQFPQ/7elzbZmGvwp5430iYRh59 zm3IZmrfA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jtR4J-0003Rl-Lg; Thu, 09 Jul 2020 07:34:07 +0000 Received: from new1-smtp.messagingengine.com ([66.111.4.221]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jtR4G-0003QO-K9; Thu, 09 Jul 2020 07:34:05 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailnew.nyi.internal (Postfix) with ESMTP id 41183580381; Thu, 9 Jul 2020 03:34:02 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Thu, 09 Jul 2020 03:34:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:content-transfer-encoding:in-reply-to; s=fm3; bh=k VMfsBuCWfBPkcg9196Rz8HEh2r0kWo4fJ6CfQIqUIM=; b=m9I1Ree4S2pglm4Ur b6OO0a0jzQi+C9PL2IyFc3YdLO2xZ0Va2GNAPwuTjSnB5MzQkUGJY+Vf/voB+101 F8J6bognpsuD4t0qdQeIlsA4BHWrqrTQyet/X+9q4WZ59iQ1FglAl6NGpXiLjQsI 0PcrOEB1nJ0Nnzb6d8yeJV9+hbbTj/YOudpN8Nf807uCoK7rUw/GXxVNsFXV5Hoo bBt15eMOyaakFj34JUyjqr06GCKdfiNr0AGWKYJB4wm2BuFGtbC9QacABR7eIv6V EHmmgjo5CrvydqbqwXg8Gnj2E1ekjLjKeQPw7kMjrsj12a0TuZcRg0psDKibqo+Q 8oiVA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=kVMfsBuCWfBPkcg9196Rz8HEh2r0kWo4fJ6CfQIqU IM=; b=F9FWqgDdlID46ixtQZPcmdSyRXRvBI0Dsyg6Qgj/sKe1fASppZQftudAh f4Rce75Q27x0e47sgzYeu0ClQi7U/Woekw3R2r1qm/27YVhLlVwPegQCw9bJjXLF 1NnJhI5jDKo1Q5Qiurigdt+AjO91MDNn4H6OJPamXboSAXU/uetpMlXC+vQlESwt iQYL2q2LvcWTTGHvRGh149Cx2nPE3qa0qrBc8FlP/w80o8sRVdY9q0f/2gyfudmu TR9E4fewrYIHhyFOD0oe2cS1XVN2aKtpQStC6e1Q2QKvB5DaxRZlEBug3VvWIhDj 7CWNbaWSeL+1K8hujx615CSKO5xfQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedrudekgdduvdefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtugfgjgesthhqredttddtvdenucfhrhhomhepofgrgihi mhgvucftihhprghrugcuoehmrgigihhmvgestggvrhhnohdrthgvtghhqeenucggtffrrg htthgvrhhnpefgjeettdejgffgffdvteeutdehtdehgeehueetkeefgefhtdetjeekledu gedvudenucfkphepledtrdekledrieekrdejieenucevlhhushhtvghrufhiiigvpedtne curfgrrhgrmhepmhgrihhlfhhrohhmpehmrgigihhmvgestggvrhhnohdrthgvtghh X-ME-Proxy: Received: from localhost (lfbn-tou-1-1502-76.w90-89.abo.wanadoo.fr [90.89.68.76]) by mail.messagingengine.com (Postfix) with ESMTPA id 36D2C3280060; Thu, 9 Jul 2020 03:34:01 -0400 (EDT) Date: Thu, 9 Jul 2020 09:33:58 +0200 From: Maxime Ripard To: Eric Anholt Subject: Re: [PATCH] drm/vc4: dsi: Only register our component once a DSI device is attached Message-ID: <20200709073358.zeeczn6253na36l6@gilmour.lan> References: <20200707101912.571531-1-maxime@cerno.tech> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200709_033404_707575_91C24EB6 X-CRM114-Status: GOOD ( 20.48 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tim Gover , Dave Stevenson , LKML , DRI Development , Andrzej Hajda , bcm-kernel-feedback-list@broadcom.com, Nicolas Saenz Julienne , Phil Elwell , Linux ARM , linux-rpi-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Eric, On Tue, Jul 07, 2020 at 09:48:45AM -0700, Eric Anholt wrote: > On Tue, Jul 7, 2020 at 3:26 AM Maxime Ripard wrote: > > > > If the DSI driver is the last to probe, component_add will try to run all > > the bind callbacks straight away and return the error code. > > > > However, since we depend on a power domain, we're pretty much guaranteed to > > be in that case on the BCM2711, and are just lucky on the previous SoCs > > since the v3d also depends on that power domain and is further in the probe > > order. > > > > In that case, the DSI host will not stick around in the system: the DSI > > bind callback will be executed, will not find any DSI device attached and > > will return EPROBE_DEFER, and we will then remove the DSI host and ask to > > be probed later on. > > > > But since that host doesn't stick around, DSI devices like the RaspberryPi > > touchscreen whose probe is not linked to the DSI host (unlike the usual DSI > > devices that will be probed through the call to mipi_dsi_host_register) > > cannot attach to the DSI host, and we thus end up in a situation where the > > DSI host cannot probe because the panel hasn't probed yet, and the panel > > cannot probe because the DSI host hasn't yet. > > > > In order to break this cycle, let's wait until there's a DSI device that > > attaches to the DSI host to register the component and allow to progress > > further. > > > > Suggested-by: Andrzej Hajda > > Signed-off-by: Maxime Ripard > > I feel like I've written this patch before, but I've thankfully > forgotten most of my battle with DSI probing. As long as this still > lets vc4 probe in the absence of a DSI panel in the DT as well, then > this is enthusiastically acked. I'm not really sure what you mean by that, did you mean vc4 has to probe when the DSI controller is enabled but there's no panel described, or it has to probe when the DSI controller is disabled? Maxime _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.5 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6ABEFC433DF for ; Fri, 10 Jul 2020 07:53:00 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DA43A2077D for ; Fri, 10 Jul 2020 07:52:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=cerno.tech header.i=@cerno.tech header.b="m9I1Ree4"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="F9FWqgDd" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DA43A2077D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=cerno.tech Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 15F7C6EB75; Fri, 10 Jul 2020 07:52:59 +0000 (UTC) Received: from new1-smtp.messagingengine.com (new1-smtp.messagingengine.com [66.111.4.221]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8E7E06E9AE for ; Thu, 9 Jul 2020 07:34:05 +0000 (UTC) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailnew.nyi.internal (Postfix) with ESMTP id 41183580381; Thu, 9 Jul 2020 03:34:02 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Thu, 09 Jul 2020 03:34:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:content-transfer-encoding:in-reply-to; s=fm3; bh=k VMfsBuCWfBPkcg9196Rz8HEh2r0kWo4fJ6CfQIqUIM=; b=m9I1Ree4S2pglm4Ur b6OO0a0jzQi+C9PL2IyFc3YdLO2xZ0Va2GNAPwuTjSnB5MzQkUGJY+Vf/voB+101 F8J6bognpsuD4t0qdQeIlsA4BHWrqrTQyet/X+9q4WZ59iQ1FglAl6NGpXiLjQsI 0PcrOEB1nJ0Nnzb6d8yeJV9+hbbTj/YOudpN8Nf807uCoK7rUw/GXxVNsFXV5Hoo bBt15eMOyaakFj34JUyjqr06GCKdfiNr0AGWKYJB4wm2BuFGtbC9QacABR7eIv6V EHmmgjo5CrvydqbqwXg8Gnj2E1ekjLjKeQPw7kMjrsj12a0TuZcRg0psDKibqo+Q 8oiVA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=kVMfsBuCWfBPkcg9196Rz8HEh2r0kWo4fJ6CfQIqU IM=; b=F9FWqgDdlID46ixtQZPcmdSyRXRvBI0Dsyg6Qgj/sKe1fASppZQftudAh f4Rce75Q27x0e47sgzYeu0ClQi7U/Woekw3R2r1qm/27YVhLlVwPegQCw9bJjXLF 1NnJhI5jDKo1Q5Qiurigdt+AjO91MDNn4H6OJPamXboSAXU/uetpMlXC+vQlESwt iQYL2q2LvcWTTGHvRGh149Cx2nPE3qa0qrBc8FlP/w80o8sRVdY9q0f/2gyfudmu TR9E4fewrYIHhyFOD0oe2cS1XVN2aKtpQStC6e1Q2QKvB5DaxRZlEBug3VvWIhDj 7CWNbaWSeL+1K8hujx615CSKO5xfQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedrudekgdduvdefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtugfgjgesthhqredttddtvdenucfhrhhomhepofgrgihi mhgvucftihhprghrugcuoehmrgigihhmvgestggvrhhnohdrthgvtghhqeenucggtffrrg htthgvrhhnpefgjeettdejgffgffdvteeutdehtdehgeehueetkeefgefhtdetjeekledu gedvudenucfkphepledtrdekledrieekrdejieenucevlhhushhtvghrufhiiigvpedtne curfgrrhgrmhepmhgrihhlfhhrohhmpehmrgigihhmvgestggvrhhnohdrthgvtghh X-ME-Proxy: Received: from localhost (lfbn-tou-1-1502-76.w90-89.abo.wanadoo.fr [90.89.68.76]) by mail.messagingengine.com (Postfix) with ESMTPA id 36D2C3280060; Thu, 9 Jul 2020 03:34:01 -0400 (EDT) Date: Thu, 9 Jul 2020 09:33:58 +0200 From: Maxime Ripard To: Eric Anholt Subject: Re: [PATCH] drm/vc4: dsi: Only register our component once a DSI device is attached Message-ID: <20200709073358.zeeczn6253na36l6@gilmour.lan> References: <20200707101912.571531-1-maxime@cerno.tech> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Mailman-Approved-At: Fri, 10 Jul 2020 07:52:58 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tim Gover , Dave Stevenson , LKML , DRI Development , Andrzej Hajda , bcm-kernel-feedback-list@broadcom.com, Nicolas Saenz Julienne , Phil Elwell , Linux ARM , linux-rpi-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Hi Eric, On Tue, Jul 07, 2020 at 09:48:45AM -0700, Eric Anholt wrote: > On Tue, Jul 7, 2020 at 3:26 AM Maxime Ripard wrote: > > > > If the DSI driver is the last to probe, component_add will try to run all > > the bind callbacks straight away and return the error code. > > > > However, since we depend on a power domain, we're pretty much guaranteed to > > be in that case on the BCM2711, and are just lucky on the previous SoCs > > since the v3d also depends on that power domain and is further in the probe > > order. > > > > In that case, the DSI host will not stick around in the system: the DSI > > bind callback will be executed, will not find any DSI device attached and > > will return EPROBE_DEFER, and we will then remove the DSI host and ask to > > be probed later on. > > > > But since that host doesn't stick around, DSI devices like the RaspberryPi > > touchscreen whose probe is not linked to the DSI host (unlike the usual DSI > > devices that will be probed through the call to mipi_dsi_host_register) > > cannot attach to the DSI host, and we thus end up in a situation where the > > DSI host cannot probe because the panel hasn't probed yet, and the panel > > cannot probe because the DSI host hasn't yet. > > > > In order to break this cycle, let's wait until there's a DSI device that > > attaches to the DSI host to register the component and allow to progress > > further. > > > > Suggested-by: Andrzej Hajda > > Signed-off-by: Maxime Ripard > > I feel like I've written this patch before, but I've thankfully > forgotten most of my battle with DSI probing. As long as this still > lets vc4 probe in the absence of a DSI panel in the DT as well, then > this is enthusiastically acked. I'm not really sure what you mean by that, did you mean vc4 has to probe when the DSI controller is enabled but there's no panel described, or it has to probe when the DSI controller is disabled? Maxime _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel