Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3361235pxb; Mon, 17 Jan 2022 18:35:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJzRivc9uFnbWuB1RXTdFoWpn+s2iJPYQSkK82mhLvTx1YhElf/WZ6bzxTRZXVKaSwu6A04/ X-Received: by 2002:a63:5d59:: with SMTP id o25mr6339553pgm.7.1642473354232; Mon, 17 Jan 2022 18:35:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642473354; cv=none; d=google.com; s=arc-20160816; b=FlT848mZZIBxDz0WB3ErC2KVF3M5wZ4VzsEYwvg9DKmq6A8Dl+IpTsJwhcej+p+4IW lIP8Cqz0eOKeqKkcPV8zoUkdD3BLnuZurf9tQohfvHy9wR31BrKOeRcpszsXRXLtHQxN TTEs81xK+gSsXLuIiNRI+2En1bnbXc90EYxXll7dxytbkRtV3SisI0BFLBndkxRrZlQq RE0AFZskw67X9DG6aihHIuPcsMZUc1yAIMHTtMjeGhJ8WhcHYvwoSj2wXOH8rjyJpKNc xXstusv9QXZdFNfBO5AkQECTdcRkXM+X1Ojq3PWbnSIieZgr0l3OhruxV5/r15Xx5JcY 0H+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=mBse3TDhMT3P1QzjpmTykdxb+O3mXQF8X49QrJGnK9w=; b=C0sFfNlXOR3e3JLstvBaPOUdEA3jnKstiMIXqVWbPUG95OlEnC6BMeEuAKIbeN+1FK OxtXoww2Sn61CLSxDCRqZpO41smypSx3BywIJFH6WsTM70+TRZHHoPx3IR5dwuvvASaC CV77dxI5bxPI5/EP0sHObVvQrHUi5Sdgl9xiNDqm32F1hm56Yk1LCWDkoyOEo5gSaUyF GfMJ81u7vNg4/mdxRDKqgNsyLiiGsuhTV5BwDi9AH/ZG2d2B+xnM7WReN34OMvH7YQJl yjxaqEXKL/WHaONHvUcjf5vvMELSlF29Vj2aPiwFGIh/jJ5zTemKv0R/MJcjf9Zjr/RG 1hjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=LZTP5w65; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l191si15875925pge.497.2022.01.17.18.35.42; Mon, 17 Jan 2022 18:35:54 -0800 (PST) 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 header.i=@linaro.org header.s=google header.b=LZTP5w65; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240589AbiAQPml (ORCPT + 99 others); Mon, 17 Jan 2022 10:42:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55108 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240590AbiAQPmk (ORCPT ); Mon, 17 Jan 2022 10:42:40 -0500 Received: from mail-pf1-x436.google.com (mail-pf1-x436.google.com [IPv6:2607:f8b0:4864:20::436]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3CCF5C061574 for ; Mon, 17 Jan 2022 07:42:40 -0800 (PST) Received: by mail-pf1-x436.google.com with SMTP id p37so10521493pfh.4 for ; Mon, 17 Jan 2022 07:42:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=mBse3TDhMT3P1QzjpmTykdxb+O3mXQF8X49QrJGnK9w=; b=LZTP5w65jwgoJGxqEXUMQBhGqnjlbTs84KuPFBpRzYEx0DwsSeJeLBikEqHqkrSW9g VSpBlg/Cogu47PGexznErP70Sr0aY7rxPv5bhtOLPGVsqRDI4CQFxo1/MTfyCWUNYQew UWHrktQHee2IMNUM2nvKprXbyMXe4Dc7lflFtBpUDqWW4OCum5RU2Vk0pHf0sT1wfHM3 Usl/QhE1XVbcgXSbXL4IM9B7aEqPuZb8f+SzqBwnNiSi30/ryHWQKDvGlHZkLWhH/5XB aWjmgRDVAn8TCiUosMZQNjwfgAG8+SC0xnypzhxkf6TIGcn3v5jCcBjJ4vCGsBaOrrjt gKhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=mBse3TDhMT3P1QzjpmTykdxb+O3mXQF8X49QrJGnK9w=; b=OxRCxDju38NdcgV/zIBhFtVic6JVdFB04tYV9KrifXUwD2RVc1d38ELYlPTCuCaC4i VfrcDyfzUMu1z2ncr9uIOaZvfmBS+gm9OGUWx0WWLhwEaouSsIzbbDPGku7WEWvQKyuY f5DqyRIJ2+orX9fIr5tw/IVaw/3nJLYBqANnP7Kc1L4PO6bu7P220xEpyTalauk1tLB5 ++vCziq7KmJCPOS2nz1eUglIkh9l4Y8ctzem7T5ROc3H9tfNIs8F5iRx9Y6Es4jorj19 F3keGZrsE8TN5WO/SUl++4j8nV9CuuKu5BFHhgwWnoLFPIQwsQcfj6N7dUNad++J3F8d 4PVA== X-Gm-Message-State: AOAM530Np1vorCIDtKmuFoyeX2C12N+Hxneoqv60zvh6CpkdqyusT6ln ujRX11c2IdhLDXDrUmcEGOaIW8g6XRFf0CVvsvm1eA== X-Received: by 2002:a63:2b03:: with SMTP id r3mr19439606pgr.201.1642434159652; Mon, 17 Jan 2022 07:42:39 -0800 (PST) MIME-Version: 1.0 References: <20220117100949.9542-1-qwt9588@gamil.com> In-Reply-To: <20220117100949.9542-1-qwt9588@gamil.com> From: Robert Foss Date: Mon, 17 Jan 2022 16:42:28 +0100 Message-ID: Subject: Re: [PATCH v5] drm/bridge: anx7625: Return -EPROBE_DEFER if the dsi host was not found To: owen Cc: Andrzej Hajda , Neil Armstrong , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , David Airlie , Daniel Vetter , Xin Ji , Sam Ravnborg , Pi-Hsun Shih , Tzung-Bi Shih , Hsin-Yi Wang , Maxime Ripard , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Owen On Mon, 17 Jan 2022 at 11:10, owen wrote: > > From: owen > > It will connect to the mipi dsi host and find the corresponding > mipi dsi host node, but the node registered by the mipi dsi host > has not been loaded yet. of_find_mipi_dsi_host_by_node() returns -EINVAL > which causes the calling driver to fail. > > If the anx7625 driver is loaded afterwards the driver requesting > the mipi dsi host will not notice this. > > Better approach is to return -EPROBE_DEFER in such case. > Then when the anx7625 driver appears the driver requesting > the mipi dsi host will be probed again. > > Signed-off-by: owen > --- > drivers/gpu/drm/bridge/analogix/anx7625.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/bridge/analogix/anx7625.c b/drivers/gpu/drm/bridge/analogix/anx7625.c > index 2346dbcc505f..297bbeb5aae0 100644 > --- a/drivers/gpu/drm/bridge/analogix/anx7625.c > +++ b/drivers/gpu/drm/bridge/analogix/anx7625.c > @@ -1660,7 +1660,7 @@ static int anx7625_attach_dsi(struct anx7625_data *ctx) > host = of_find_mipi_dsi_host_by_node(ctx->pdata.mipi_host_node); > if (!host) { > DRM_DEV_ERROR(dev, "fail to find dsi host.\n"); > - return -EINVAL; > + return -EPROBE_DEFER; > } > > dsi = devm_mipi_dsi_device_register_full(dev, host, &info); > -- > 2.31.0 > Reviewed-by: Robert Foss Applied to drm-misc-next.